@set xref-blocking-factor @xref{Blocking Factor}
@set pxref-blocking-factor @pxref{Blocking Factor}
-@set op-bzip2 @kbd{--bzip2} (@kbd{--bunzip2})
+@set op-bzip2 @kbd{--bzip2} (@kbd{-I})
@set ref-bzip2 @ref{gzip}
@set xref-bzip2 @xref{gzip}
@set pxref-bzip2 @pxref{gzip}
@set xref-no-recursion @xref{recurse}
@set pxref-no-recursion @pxref{recurse}
+@set op-no-same-owner @kbd{--no-same-owner}
+@set ref-no-same-owner @ref{Attributes}
+@set xref-no-same-owner @xref{Attributes}
+@set pxref-no-same-owner @pxref{Attributes}
+
+@set op-no-same-permissions @kbd{--no-same-permissions}
+@set ref-no-same-permissions @ref{Attributes}
+@set xref-no-same-permissions @xref{Attributes}
+@set pxref-no-same-permissions @pxref{Attributes}
+
@set op-null @kbd{--null}
@set ref-null @ref{files}
@set xref-null @xref{files}
This file documents GNU @code{tar}, a utility used to store, backup, and
transport files.
-Copyright (C) 1992, 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+Copyright 1992, 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
* General date syntax:: Common rules.
* Calendar date item:: 19 Dec 1994.
* Time of day item:: 9:20pm.
-* Timezone item:: EST, DST, BST, UCT, AHST, ...
+* Time zone item:: EST, GMT, UTC, ...
* Day of week item:: Monday and others.
* Relative item in date strings:: next tuesday, 2 years ago.
* Pure numbers in date strings:: 19931219, 1440.
the archive. You may also @dfn{list} the members in a given archive
(this is often thought of as ``printing'' them to the standard output,
or the command line), or @dfn{append} members to a pre-existing archive.
-All of these operations can be peformed using @code{tar}.
+All of these operations can be performed using @code{tar}.
@node What tar Does, Naming tar Archives, Definitions, Introduction
@section What @code{tar} Does
Jay Fenlason put together a draft of a GNU @code{tar} manual,
borrowing notes from the original man page from John Gilmore. This
-draft has been distributed in @code{tar} versions 1.04 (or even
-before?) @FIXME{huh? IMO, either we know or we don't; the
-parenthetical is confusing.} through 1.10, then withdrawn in version
+was withdrawn in version
1.11. Thomas Bushnell, n/BSG and Amy Gorin worked on a tutorial and
manual for GNU @code{tar}. Fran@,{c}ois Pinard put version 1.11.8
of the manual together by taking information from all these sources
@cindex bug reports
@cindex reporting bugs
If you find problems or have suggestions about this program or manual,
-please report them to @file{tar-bugs@@gnu.org}.
+please report them to @file{bug-tar@@gnu.org}.
@node Tutorial, tar invocation, Introduction, Top
@chapter Tutorial Introduction to @code{tar}
filesystem. You should have some basic understanding of directory
structure and how files are named according to which directory they are
in. You should understand concepts such as standard output and standard
-input, what various definitions of the term ``argument'' mean, the
-differences between relative and absolute path names, and @FIXME{what
-else?}.
+input, what various definitions of the term ``argument'' mean, and the
+differences between relative and absolute path names. @FIXME{and what
+else?}
@item
This manual assumes that you are working from your own home directory
the tutorial and next chapter will not work on tape drives.
Additionally, working with tapes is much more complicated than working
with hard disks. For these reasons, the tutorial does not cover working
-with tape drives. @xref{Media} for complete information on using
+with tape drives. @xref{Media}, for complete information on using
@code{tar} archives with tape drives.
@FIXME{this is a cop out. need to add some simple tape drive info.}
the operations and options have no short or ``old'' forms; however, the
operations and options which we will cover in this tutorial have
corresponding abbreviations. @FIXME{make sure this is still the case,
-at the end} We will indicate those abbreviations appropriately to get
+at the end}We will indicate those abbreviations appropriately to get
you used to seeing them. (Note that the ``old style'' option forms
exist in GNU @code{tar} for compatibility with Unix @code{tar}. We
present a full discussion of this way of writing options and operations
@end example
@noindent
-To avoid confusion, we recommend that you always specfiy an archive file
+To avoid confusion, we recommend that you always specify an archive file
name by using @value{op-file} when writing your @code{tar} commands.
For more information on using the @value{op-file} option, see
@ref{file}.
Whenever you use @samp{create}, @code{tar} will erase the current
contents of the file named by @value{op-file} if it exists. @code{tar}
will not tell you if you are about to overwrite a file unless you
-specify an option which does this @FIXME{xref to the node for
---backup!}. To add files to an existing archive, you need to use a
+specify an option which does this. @FIXME{xref to the node for
+--backup!}To add files to an existing archive, you need to use a
different option, such as @value{op-append}; see @ref{append} for
information on how to do this.
(even if you type them correctly in all other ways), you may end up with
results you don't expect. For this reason, it is a good idea to get
into the habit of typing options in the order that makes inherent sense.
-@xref{short create} for more information on this.
+@xref{short create}, for more information on this.
In this example, you type the command as shown above: @samp{--create}
is the operation which creates the new archive
(@file{collection.tar}), and @samp{--file} is the option which lets
you give it the name you chose. The files, @file{blues}, @file{folk},
and @file{jazz}, are now members of the archive, @file{collection.tar}
-(they are @dfn{file name arguments} to the @samp{--create} operation)
-@FIXME{xref here to the discussion of file name args?}. Now that they
-are are in the archive, they are called @emph{archive members}, not
-files @FIXME{xref to definitions?}.
+(they are @dfn{file name arguments} to the @samp{--create} operation).
+@FIXME{xref here to the discussion of file name args?}Now that they are
+in the archive, they are called @emph{archive members}, not files.
+@FIXME{xref to definitions?}
When you create an archive, you @emph{must} specify which files you want
placed in the archive. If you do not specify any archive members, GNU
@end example
@noindent
-@code{tar} will report @samp{tar: foo.tar is the archive; not dumped}.
+@code{tar} will report @samp{tar: ./foo.tar is the archive; not dumped}.
This happens because @code{tar} creates the archive @file{foo.tar} in
the current directory before putting any files into it. Then, when
@code{tar} attempts to add all the files in the directory @file{.} to
-the archive, it notices that the file @file{foo.tar} is the same as the
-archive, and skips it. (It makes no sense to put an archive into
-itself.) GNU @code{tar} will continue in this case, and create the
+the archive, it notices that the file @file{./foo.tar} is the same as the
+archive @file{foo.tar}, and skips it. (It makes no sense to put an archive
+into itself.) GNU @code{tar} will continue in this case, and create the
archive normally, except for the exclusion of that one file.
(@emph{Please note:} Other versions of @code{tar} are not so clever;
they will enter an infinite loop when this happens, so you should not
depend on this behavior unless you are certain you are running GNU
-@code{tar}. @FIXME{bob doesn't like this sentence, since he does it
+@code{tar}.) @FIXME{bob doesn't like this sentence, since he does it
all the time, and we've been doing it in the editing passes for this
manual: In general, make sure that the archive is not inside a
-directory being dumped.})
+directory being dumped.}
@node list, extract, create, Tutorial
@section How to List Archives
@noindent
If you list the files in the directory again, you will see that the file
@file{blues} has been restored, with its original permissions, creation
-times, and owner. @FIXME{This is only accidentally true, but not in
+times, and owner.@FIXME{This is only accidentally true, but not in
general. In most cases, one has to be root for restoring the owner, and
use a special option for restoring permissions. Here, it just happens
that the restoring user is also the owner of the archived members, and
"mnemonic" with "long", or *ugh* vice versa.}
Each option has at least one long (or mnemonic) name starting with two
-dashes in a row, e.g. @samp{list}. The long names are more clear than
+dashes in a row, e.g.@: @samp{--list}. The long names are more clear than
their corresponding short or old names. It sometimes happens that a
single mnemonic option has many different different names which are
synonymous, such as @samp{--compare} and @samp{--diff}. In addition,
@subsection Short Option Style
Most options also have a short option name. Short options start with
-a single dash, and are followed by a single character, e.g. @samp{-t}
+a single dash, and are followed by a single character, e.g.@: @samp{-t}
(which is equivalent to @samp{--list}). The forms are absolutely
identical in function; they are interchangeable.
Short options' letters may be clumped together, but you are not
required to do this (as compared to old options; see below). When short
-options are clumped as a set, use one (single) dash for them all, e.g.
+options are clumped as a set, use one (single) dash for them all, e.g.@:
@w{@samp{@code{tar} -cvf}}. Only the last option in such a set is allowed
to have an argument@footnote{Clustering many options, the last of which
has an argument, is a rather opaque way to write options. Some wonder if
with a dash, you are announcing the short option style instead of the
old option style; short options are decoded differently.}. This set
of letters must be the first to appear on the command line, after the
-@code{tar} program name and some whitespace; old options cannot appear
+@code{tar} program name and some white space; old options cannot appear
anywhere else. The letter of an old option is exactly the same letter as
the corresponding short option. For example, the old option @samp{t} is
the same as the short option @samp{-t}, and consequently, the same as the
modern styles of options may be mixed within a single @code{tar} command.
However, old style options must be introduced as the first arguments only,
following the rule for old options (old options must appear directly
-after the @code{tar} command and some whitespace). Modern options may
+after the @code{tar} command and some white space). Modern options may
be given only after all arguments to the old options have been collected.
If this rule is not respected, a modern option might be falsely interpreted
as the value of the argument to one of the old style options.
@itemx -P
Normally when creating an archive, @code{tar} strips an initial @samp{/} from
-member names. This option disables that behavior. @FIXME-xref{}.
+member names. This option disables that behavior. @FIXME-xref{}
@item --after-date
-(See @samp{--newer}; @FIXME-pxref{}.)
+(See @samp{--newer}.) @FIXME-pxref{}
@item --atime-preserve
Tells @code{tar} to preserve the access time field in a file's inode when
-dumping it. @FIXME-xref{}.
+dumping it. @FIXME-xref{}
@item --backup=@var{backup-type}
Rather than deleting files from the file system, @code{tar} will back them up
using simple or numbered backups, depending upon @var{backup-type}.
-@FIXME-xref{}.
+@FIXME-xref{}
@item --block-number
@itemx -R
With this option present, @code{tar} prints error messages for read errors
-with the block number in the archive file. @FIXME-xref{}.
+with the block number in the archive file. @FIXME-xref{}
@item --blocking-factor=@var{blocking}
@itemx -b @var{blocking}
Sets the blocking factor @code{tar} uses to @var{blocking} x 512 bytes per
-record. @FIXME-xref{}.
-
-@item --bunzip2
-
-(See @samp{--bzip2}; @FIXME-pxref{}.)
+record. @FIXME-xref{}
@item --bzip2
-@itemx --bunzip2
-@itemx --unbzip2
+@itemx -I
This option tells @code{tar} to read or write archives through @code{bzip2}.
-@FIXME-xref{}.
+@FIXME-xref{}
@item --checkpoint
This option directs @code{tar} to print periodic checkpoint messages as it
reads through the archive. Its intended for when you want a visual
indication that @code{tar} is still running, but don't want to see
-@samp{--verbose} output. @FIXME-xref{}.
+@samp{--verbose} output. @FIXME-xref{}
@item --compress
@itemx --uncompress
@code{tar} will use the @code{compress} program when reading or writing the
archive. This allows you to directly act on archives while saving
-space. @FIXME-xref{}.
+space. @FIXME-xref{}
@item --confirmation
-(See @samp{--interactive}; @FIXME-pxref{}.)
+(See @samp{--interactive}.) @FIXME-pxref{}
@item --dereference
@itemx -h
When creating a @code{tar} archive, @code{tar} will archive the file that a symbolic
-link points to, rather than archiving the symlink. @FIXME-xref{}.
+link points to, rather than archiving the symlink. @FIXME-xref{}
@item --directory=@var{dir}
@itemx -C @var{dir}
When this option is specified, @code{tar} will change its current directory
to @var{dir} before performing any operations. When this option is used
-during archive creation, it is order sensitive. @FIXME-xref{}.
+during archive creation, it is order sensitive. @FIXME-xref{}
@item --exclude=@var{pattern}
When performing operations, @code{tar} will skip files that match
-@var{pattern}. @FIXME-xref{}.
+@var{pattern}. @FIXME-xref{}
@item --exclude-from=@var{file}
@itemx -X @var{file}
Similar to @samp{--exclude}, except @code{tar} will use the list of patterns
-in the file @var{file}. @FIXME-xref{}.
+in the file @var{file}. @FIXME-xref{}
@item --file=@var{archive}
@itemx -f @var{archive}
@code{tar} will use the file @var{archive} as the @code{tar} archive it
performs operations on, rather than @code{tar}'s compilation dependent
-default. @FIXME-xref{}.
+default. @FIXME-xref{}
@item --files-from=@var{file}
@itemx -T @var{file}
@code{tar} will use the contents of @var{file} as a list of archive members
or files to operate on, in addition to those specified on the
-command-line. @FIXME-xref{}.
+command-line. @FIXME-xref{}
@item --force-local
Forces @code{tar} to interpret the filename given to @samp{--file} as a local
-file, even if it looks like a remote tape drive name. @FIXME-xref{}.
+file, even if it looks like a remote tape drive name. @FIXME-xref{}
@item --group=@var{group}
Files added to the @code{tar} archive will have a group id of @var{group},
rather than the group from the source file. @var{group} is first decoded
as a group symbolic name, but if this interpretation fails, it has to be
-a decimal numeric group ID. @FIXME-xref{}.
+a decimal numeric group ID. @FIXME-xref{}
Also see the comments for the @value{op-owner} option.
@item --gunzip
-(See @samp{--gzip}; @FIXME-pxref{}.)
+(See @samp{--gzip}.) @FIXME-pxref{}
@item --gzip
@itemx --gunzip
This option tells @code{tar} to read or write archives through @code{gzip},
allowing @code{tar} to directly operate on several kinds of compressed
-archives transparently. @FIXME-xref{}.
+archives transparently. @FIXME-xref{}
@item --help
@code{tar} will print out a short message summarizing the operations and
-options to @code{tar} and exit. @FIXME-xref{}.
+options to @code{tar} and exit. @FIXME-xref{}
@item --ignore-failed-read
Used to inform @code{tar} that it is working with an old GNU-format
incremental backup archive. It is intended primarily for backwards
-compatibility only. @FIXME-xref{}.
+compatibility only. @FIXME-xref{}
@item --info-script=@var{script-file}
@itemx --new-volume-script=@var{script-file}
@itemx -F @var{script-file}
When @code{tar} is performing multi-tape backups, @var{script-file} is run
-at the end of each tape. @FIXME-xref{}.
+at the end of each tape. @FIXME-xref{}
@item --interactive
@itemx --confirmation
Specifies that @code{tar} should ask the user for confirmation before
performing potentially destructive options, such as overwriting files.
-@FIXME-xref{}.
+@FIXME-xref{}
@item --keep-old-files
@itemx -k
When creating an archive, instructs @code{tar} to write @var{name} as a name
record in the archive. When extracting or listing archives, @code{tar} will
only operate on archives that have a label matching the pattern
-specified in @var{name}. @FIXME-xref{}.
+specified in @var{name}. @FIXME-xref{}
@item --listed-incremental=@var{snapshot-file}
@itemx -g @var{snapshot-file}
@code{tar} creates is a new GNU-format incremental backup, using
@var{snapshot-file} to determine which files to backup.
With other operations, informs @code{tar} that the archive is in incremental
-format. @FIXME-xref{}.
+format. @FIXME-xref{}
@item --mode=@var{permissions}
for the archive members, rather than the permissions from the files.
The program @code{chmod} and this @code{tar} option share the same syntax
for what @var{permissions} might be. @xref{File permissions, Permissions,
-File permissions, filetutils, GNU file utilities}. This reference also
+File permissions, fileutils, GNU file utilities}. This reference also
has useful information for those not being overly familiar with the Unix
permission system.
@itemx -M
Informs @code{tar} that it should create or otherwise operate on a
-multi-volume @code{tar} archive. @FIXME-xref{}.
+multi-volume @code{tar} archive. @FIXME-xref{}
@item --new-volume-script
@itemx -N
When creating an archive, @code{tar} will only add files that have changed
-since @var{date}. @FIXME-xref{}.
+since @var{date}. @FIXME-xref{}
@item --newer-mtime
@item --no-recursion
With this option, @code{tar} will not recurse into directories unless a
-directory is explicitly named as an argument to @code{tar}. @FIXME-xref{}.
+directory is explicitly named as an argument to @code{tar}. @FIXME-xref{}
+
+@item --no-same-owner
+
+When extracting an archive, do not attempt to preserve the owner
+specified in the @code{tar} archive. This the default behavior
+for ordinary users; this option has an effect only for the superuser.
+
+@item --no-same-permissions
+
+When extracting an archive, subtract the user's umask from files from
+the permissions specified in the archive. This is the default behavior
+for ordinary users; this option has an effect only for the superuser.
@item --null
When @code{tar} is using the @samp{--files-from} option, this option
instructs @code{tar} to expect filenames terminated with @kbd{NUL}, so
@code{tar} can correctly work with file names that contain newlines.
-@FIXME-xref{}.
+@FIXME-xref{}
@item --numeric-owner
This option will notify @code{tar} that it should use numeric user and group
-IDs when creating a @code{tar} file, rather than names. @FIXME-xref{}.
+IDs when creating a @code{tar} file, rather than names. @FIXME-xref{}
@item --old-archive
-(See @samp{--portability}; @FIXME-pxref{}.)
+(See @samp{--portability}.) @FIXME-pxref{}
@item --one-file-system
@itemx -l
Used when creating an archive. Prevents @code{tar} from recursing into
directories that are on different file systems from the current
-directory. @FIXME-xref{}.
+directory. @FIXME-xref{}
@item --owner=@var{user}
when creating archives, instead of the user associated with the source
file. @var{user} is first decoded as a user symbolic name, but if
this interpretation fails, it has to be a decimal numeric user ID.
-@FIXME-xref{}.
+@FIXME-xref{}
There is no value indicating a missing number, and @samp{0} usually means
@code{root}. Some people like to force @samp{0} as the value to offer in
@itemx -o
Tells @code{tar} to create an archive that is compatible with Unix V7
-@code{tar}. @FIXME-xref{}.
+@code{tar}. @FIXME-xref{}
@item --posix
-Instructs @code{tar} to create a POSIX compliant @code{tar} archive. @FIXME-xref{}.
+Instructs @code{tar} to create a POSIX compliant @code{tar} archive. @FIXME-xref{}
@item --preserve
Synonymous with specifying both @samp{--preserve-permissions} and
-@samp{--same-order}. @FIXME-xref{}.
+@samp{--same-order}. @FIXME-xref{}
@item --preserve-order
@item --record-size=@var{size}
Instructs @code{tar} to use @var{size} bytes per record when accessing the
-archive. @FIXME-xref{}.
+archive. @FIXME-xref{}
@item --recursive-unlink
@item --remove-files
Directs @code{tar} to remove the source file from the file system after
-appending it to an archive. @FIXME-xref{}.
+appending it to an archive. @FIXME-xref{}
@item --rsh-command=@var{cmd}
Notifies @code{tar} that is should use @var{cmd} to communicate with remote
-devices. @FIXME-xref{}.
+devices. @FIXME-xref{}
@item --same-order
@itemx --preserve-order
@item --same-owner
When extracting an archive, @code{tar} will attempt to preserve the owner
-specified in the @code{tar} archive with this option present. @FIXME-xref{}.
+specified in the @code{tar} archive with this option present.
+This is the default behavior for the superuser; this option has an
+effect only for ordinary users. @FIXME-xref{}
@item --same-permissions
@item --show-omitted-dirs
Instructs @code{tar} to mention directories its skipping over when operating
-on a @code{tar} archive. @FIXME-xref{}.
+on a @code{tar} archive. @FIXME-xref{}
@item --sparse
@itemx -S
Invokes a GNU extension when adding files to an archive that handles
-sparse files efficiently. @FIXME-xref{}.
+sparse files efficiently. @FIXME-xref{}
@item --starting-file=@var{name}
@itemx -K @var{name}
@item --suffix=@var{suffix}
Alters the suffix @code{tar} uses when backing up files from the default
-@samp{~}. @FIXME-xref{}.
+@samp{~}. @FIXME-xref{}
@item --tape-length=@var{num}
@itemx -L @var{num}
Specifies the length of tapes that @code{tar} is writing as being
-@w{@var{num} x 1024} bytes long. @FIXME-xref{}.
+@w{@var{num} x 1024} bytes long. @FIXME-xref{}
@item --to-stdout
@itemx -O
@item --totals
Displays the total number of bytes written after creating an archive.
-@FIXME-xref{}.
+@FIXME-xref{}
@item --touch
@itemx -m
rather than the modification time stored in the archive.
@xref{Writing}.
-@item --unbzip2
-
-(See @samp{--bzip2}; @FIXME-pxref{}.)
-
@item --uncompress
-(See @samp{--compress}; @FIXME-pxref{}.)
+(See @samp{--compress}.) @FIXME-pxref{}
@item --ungzip
-(See @samp{--gzip}; @FIXME-pxref{}.)
+(See @samp{--gzip}.) @FIXME-pxref{}
@item --unlink-first
@itemx -U
@item --use-compress-program=@var{prog}
Instructs @code{tar} to access the archive through @var{prog}, which is
-presumed to be a compression program of some sort. @FIXME-xref{}.
+presumed to be a compression program of some sort. @FIXME-xref{}
@item --verbose
@itemx -v
Specifies that @code{tar} should be more verbose about the operations its
performing. This option can be specified multiple times for some
-operations to increase the amount of information displayed. @FIXME-xref{}.
+operations to increase the amount of information displayed. @FIXME-xref{}
@item --verify
@itemx -W
Verifies that the archive was correctly written when creating an
-archive. @FIXME-xref{}.
+archive. @FIXME-xref{}
@item --version
@code{tar} will print an informational message about what version it is and a
-copyright message, some credits, and then exit. @FIXME-xref{}.
+copyright message, some credits, and then exit. @FIXME-xref{}
@item --volno-file=@var{file}
Used in conjunction with @samp{--multi-volume}. @code{tar} will keep track
of which volume of a multi-volume archive its working in @var{file}.
-@FIXME-xref{}.
+@FIXME-xref{}
@end table
@node Short Option Summary, , Option Summary, All Options
@samp{--incremental}
+@item -I
+
+@samp{--bzip2}
+
@item -K
@samp{--starting-file}
fact, they cannot ignore each other, and one of them has to win. We do
not specify which is stronger, here; experiment if you really wonder!
-The short help output is quite succint, and you might have to get back
+The short help output is quite succinct, and you might have to get back
to the full documentation for precise points. If you are reading this
paragraph, you already have the @code{tar} manual in some form. This
manual is available in printed form, as a kind of small book. It may
@cindex Status information
@cindex Information on progress and status of operations
@cindex Verbose operation
-@cindex Block number where error occured
+@cindex Block number where error occurred
@cindex Error message, block number of
@cindex Version of the @code{tar} program
choose among several backup tapes when retrieving a file later, in
favor of the tape where the file appears earliest (closest to the
front of the tape). @FIXME-xref{when the node name is set and the
-backup section written}.
+backup section written.}
@node interactive, , verbose, tar invocation
@section Asking for Confirmation During Operations
GNU @code{tar} now shows dates as @samp{1996-11-09}, while it used to
show them as @samp{Nov 11 1996}. (One can revert to the old behavior by
defining @code{USE_OLD_CTIME} in @file{src/list.c} before reinstalling.)
-But preferrably, people you should get used to ISO 8601 dates. Local
-American dates should be made available again with full date localisation
-support, once ready. In the meantime, programs not being localisable
+But preferably, people should get used to ISO 8601 dates. Local
+American dates should be made available again with full date localization
+support, once ready. In the meantime, programs not being localizable
for dates should prefer international dates, that's really the way to go.
Look up @url{http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html} if you
MMwtSN node; not sure. i didn't know how to make it simpler...}
There are a few ways to get around this. @FIXME-xref{Multiple Members
-with the Same Name}.
+with the Same Name.}
@cindex Members, replacing with other members
@cindex Replacing members with other members
delete the member you want to remove from the archive, , and then use
@samp{--append} to add the member you want to be in the archive. Note
that you can not change the order of the archive; the most recently
-added member will still appear last. In this sense, you cannot truely
+added member will still appear last. In this sense, you cannot truly
``replace'' one member with another. (Replacing one member with another
will not work on certain types of media, such as tapes; see @ref{delete}
and @ref{Media}, for more information.)
like to admit to, specifically the last sentence. On the other hand, i
don't think it's a good idea to be saying that re explicitly don't
recommend using something, but i can't see any better way to deal with
-the situation.} When you extract the archive, the older version will be
+the situation.}When you extract the archive, the older version will be
effectively lost. This works because files are extracted from an
archive in the order in which they were archived. Thus, when the
archive is extracted, a file archived later in time will overwrite a
(note the different creation dates and file sizes). If you extract
the archive, the older version of the file @file{blues} will be
overwritten by the newer version. You can confirm this by extracting
-the archive and running @samp{ls} on the directory. @xref{Writing}
+the archive and running @samp{ls} on the directory. @xref{Writing},
for more information. (@emph{Please note:} This is the case unless
-you employ the @value{op-backup} option; @FIXME-ref{Multiple Members
+you employ the @value{op-backup} option. @FIXME-ref{Multiple Members
with the Same Name}.)
@node update, concatenate, append, Advanced tar
Both @samp{--update} and @samp{--append} work by adding to the end
of the archive. When you extract a file from the archive, only the
version stored last will wind up in the file system, unless you use
-the @value{op-backup} option (@FIXME-ref{Multiple Members with the
-Same Name}).
+the @value{op-backup} option. @FIXME-ref{Multiple Members with the
+Same Name}
@menu
* how to update::
(The reason @code{tar} does not overwrite the older file when updating
it is because writing to the middle of a section of tape is a difficult
-process. Tapes are not designed to go backward. @xref{Media} for more
+process. Tapes are not designed to go backward. @xref{Media}, for more
information about tapes.
@value{op-update} is not suitable for performing backups for two
command line. (Nothing happens if you don't list any.) The members,
and their member names, will be copied verbatim from those archives. If
this causes multiple members to have the same name, it does not delete
-any members; all the members with the same name coexist. For
-information on how this affects reading the archive, @FIXME-ref{Multiple
-Members with the Same Name}.
+any members; all the members with the same name coexist. @FIXME-ref{For
+information on how this affects reading the archive, Multiple
+Members with the Same Name.}
To demonstrate how @samp{--concatenate} works, create two small archives
called @file{bluesrock.tar} and @file{folkjazz.tar}, using the relevant
@end example
When you use @samp{--concatenate}, the source and target archives must
-already exist and must have been created using compatable format
-parameters (@FIXME-pxref{Matching Format Parameters}). The new,
+already exist and must have been created using compatible format
+parameters. @FIXME-pxref{Matching Format Parameters}The new,
concatenated archive will be called by the same name as the first
archive listed on the command line. @FIXME{is there a way to specify a
new name?}
@code{cat} to combine the archives, the result will not be a valid
@code{tar} format archive. If you need to retrieve files from an
archive that was added to using the @code{cat} utility, use the
-@value{op-ignore-zeros} option. @xref{Ignore Zeros} for further
+@value{op-ignore-zeros} option. @xref{Ignore Zeros}, for further
information on dealing with archives improperly combined using the
@code{cat} shell utility.
versions of @code{tar} write garbage after the end-of-archive entry,
since that part of the media is never supposed to be read. GNU
@code{tar} does not write after the end of an archive, but seeks to
-maintain compatablity among archiving utilities.
+maintain compatiblity among archiving utilities.
@table @kbd
@item --ignore-zeros
files with other files when extracting. When extracting a @code{tar}
archive, they expect to see a faithful copy of the state of the filesystem
when the archive was created. It is debatable that this would always
-be a proper behaviour. For example, suppose one has an archive in
+be a proper behavior. For example, suppose one has an archive in
which @file{usr/local} is a link to @file{usr/local2}. Since then,
maybe the site removed the link and renamed the whole hierarchy from
@file{/usr/local2} to @file{/usr/local}. Such things happen all the time.
@emph{also} simultaneously restores the full @file{/usr/local2}, of course!
GNU @code{tar} is indeed able to remove a whole hierarchy to reestablish a
symbolic link, for example, but @emph{only if} @value{op-recursive-unlink}
-is specified to allow this behaviour. In any case, single files are
+is specified to allow this behavior. In any case, single files are
silently removed.
@node Modification Times, Setting Access Permissions, Recursive Unlink, Writing
@unnumberedsubsubsec Setting Access Permissions
To set the modes (access permissions) of extracted files to those
-recorded for those files in the archive, use @samp{--same-persmissions}
+recorded for those files in the archive, use @samp{--same-permissions}
in conjunction with the @value{op-extract} operation. @FIXME{Should be
aliased to ignore-umask.}
@value{op-extract}.
@end table
-@FIXME{Following paragraph needs to be rewritten: why doesnt' this cat
+@FIXME{Following paragraph needs to be rewritten: why doesn't this cat
files together, why is this useful. is it really useful with
more than one file?}
Some people express the desire to @emph{always} use the @var{op-backup}
option, by defining some kind of alias or script. This is not as easy
as one may thing, due to the fact old style options should appear first
-and consume arguments a bit inpredictably for an alias or script. But,
+and consume arguments a bit unpredictably for an alias or script. But,
if you are ready to give up using old style options, you may resort to
using something like (a Bourne shell function here):
explains how to choose and change file and archive names, how to use
files to store names of other files which you can then call as
arguments to @code{tar} (this can help you save time if you expect to
-archive the same list of files a number of times), and how to
+archive the same list of files a number of times), and so forth.
@FIXME{in case it's not obvious, i'm making this up in some sense
based on my imited memory of what the next chapter *really* does. i
just wanted to flesh out this final section a little bit so i'd
To @dfn{back up} a file system means to create archives that contain
all the files in that file system. Those archives can then be used to
restore any or all of those files (for instance if a disk crashes or a
-file is accidently deleted). File system @dfn{backups} are also
+file is accidentally deleted). File system @dfn{backups} are also
called @dfn{dumps}.
@menu
same effect as @value{op-incremental}, but also the time when the dump
is done and the list of directories dumped is written to the given
@var{file}. When restoring, only files newer than the saved time are
-restored, and the direcotyr list is used to speed up operations.
+restored, and the directory list is used to speed up operations.
@value{op-listed-incremental} acts like @value{op-incremental}, but when
used in conjunction with @value{op-create} will also cause @code{tar} to
Performing incremental dumps is similar to performing full dumps,
although a few more options will usually be needed.
-You will need to use the @samp{-N @var{date}} option to tell @code{tar}
-to only store files that have been modified since @var{date}.
-@var{date} should be the date and time of the last full/incremental
-dump.
-
A standard scheme is to do a @emph{monthly} (full) dump once a month,
a @emph{weekly} dump once a week of everything since the last monthly
and a @emph{daily} every day of everything since the last (weekly or
monthly) dump.
-Here is a copy of the script used to dump the filesystems of the
-machines here at the Free Software Foundation. This script is run via
-@code{cron} late at night when people are least likely to be using the
-machines. This script dumps several filesystems from several machines
-at once (via NFS). The operator is responsible for ensuring that all
-the machines will be up at the time the dump happens. If a machine is
-not running, its files will not be dumped, and the next day's
-incremental dump will @emph{not} store files that would have gone onto
-that dump.
+Here is a sample script to dump the directory hierarchies @samp{/usr}
+and @samp{/var}.
@example
-#!/bin/csh
-# Dump thingie
-set now = `date`
-set then = `cat date.nfs.dump`
-/u/hack/bin/tar -c -G -v\
- -f /dev/rtu20\
- -b 126\
- -N "$then"\
- -V "Dump from $then to $now"\
- /alpha-bits/gp\
- /gnu/hack\
- /hobbes/u\
- /spiff/u\
- /sugar-bombs/u
-echo $now > date.nfs.dump
-mt -f /dev/rtu20 rew
+#! /bin/sh
+tar --create \
+ --blocking-factor=126 \
+ --file=/dev/rmt/0 \
+ --label="`hostname` /usr /var `date +%Y-%m-%d`" \
+ --listed-incremental=/var/log/usr-var.snar \
+ --verbose \
+ /usr /var
@end example
-Output from this script is stored in a file, for the operator to
-read later.
+This script uses the file @file{/var/log/usr-var.snar} as a snapshot to
+store information about the previous tar dump.
-This script uses the file @file{date.nfs.dump} to store the date/time
-of the last dump.
-
-Since this is a streaming tape drive, no attempt to verify the archive
-is done. This is also why the high blocking factor (126) is used.
-The tape drive must also be rewound by the @code{mt} command after
-the dump is made.
+The blocking factor 126 is an attempt to make the tape drive stream.
+Some tape devices cannot handle 64 kB blocks or larger, and require the
+block size to be a multiple of 1 kB; for these devices, 126 is the
+largest blocking factor that can be used.
@node incremental and listed-incremental, Backup Levels, Inc Dumps, Backups
@section The Incremental Options
Before you use these scripts, you need to edit the file
@file{backup-specs}, which specifies parameters used by the backup
scripts and by the restore script. @FIXME{There is no such restore
-script!}. @FIXME-xref{Script Syntax}. Once the backup parameters
+script!}@FIXME-xref{Script Syntax}Once the backup parameters
are set, you can perform backups or restoration by running the
appropriate script.
The name of the restore script is @code{restore}. @FIXME{There is
-no such restore script!}. The names of the level one and full backup
+no such restore script!}The names of the level one and full backup
scripts are, respectively, @code{level-1} and @code{level-0}.
The @code{level-0} script also exists under the name @code{weekly}, and
the @code{level-1} under the name @code{daily}---these additional names
can be changed according to your backup schedule. @FIXME-xref{Scripted
-Restoration}, for more information on running the restoration script.
-@FIXME-xref{Scripted Backups}, for more information on running the
-backup scripts.
+Restoration, for more information on running the restoration script.}
+@FIXME-xref{Scripted Backups, for more information on running the
+backup scripts.}
@emph{Please Note:} The backup scripts and the restoration scripts are
designed to be used together. While it is possible to restore files by
hand from an archive which was created using a backup script, and to create
an archive by hand which could then be extracted using the restore script,
-it is easier to use the scripts. @FIXME{There is no such restore script!}.
+it is easier to use the scripts.@FIXME{There is no such restore script!}
@value{xref-incremental}, and @value{xref-listed-incremental},
before making such an attempt.
@FIXME{This about backup scripts needs to be written: BS is a shell
script .... thus ... @file{backup-specs} is in shell script syntax.}
-@FIXME-xref{Script Syntax}, for an explanation of this syntax.
+@FIXME-xref{Script Syntax, for an explanation of this syntax.}
@FIXME{Whats a parameter .... looked at by the backup scripts
... which will be expecting to find ... now syntax ... value is linked
where @var{time-to-be-run} can be a specific system time, or can be
@kbd{now}. If you do not specify a time, the script runs at the time
-specified in @file{backup-specs} (@FIXME-pxref{Script Syntax}).
+specified in @file{backup-specs}. @FIXME-pxref{Script Syntax}
You should start a script with a tape or disk mounted. Once you
start a script, it prompts you for new tapes or disks as it
The @code{restore} script prompts for media by its archive volume,
so to avoid an error message you should keep track of which tape
(or disk) contains which volume of the archive. @FIXME{There is
-no such restore script!}. @FIXME-xref{Scripted Restoration}.
+no such restore script!} @FIXME-xref{Scripted Restoration}
@FIXME{Have file names changed?}
The backup scripts write two files on the file system. The first is a
record file in @file{/etc/tar-backup/}, which is used by the scripts
to store and retrieve information about which files were dumped. This
file is not meant to be read by humans, and should not be deleted by
-them. @FIXME-xref{incremental and listed-incremental}, for a more
-detailed explanation of this file.
+them. @FIXME-xref{incremental and listed-incremental, for a more
+detailed explanation of this file.}
The second file is a log file containing the names of the file systems
and files dumped, what time the backup was made, and any error
volumes as they are needed. If the archive is on tape, you don't need
to rewind the tape to to its beginning---if the tape head is
positioned past the beginning of the archive, the script will rewind
-the tape as needed. @FIXME-xref{Media}, for a discussion of tape
-positioning.
+the tape as needed. @FIXME-xref{Media, for a discussion of tape
+positioning.}
If you specify @samp{--all} as the @var{files} argument, the
@code{restore} script extracts all the files in the archived file
By default, @code{tar} takes file names from the command line. However,
there are other ways to specify file or member names, or to modify the
manner in which @code{tar} selects the files or members upon which to
-operate; @FIXME{add xref here}. In general, these methods work both for
+operate. @FIXME{add xref here}In general, these methods work both for
specifying the names of files and archive members.
@node files, exclude, Selecting Archive Members, Choosing
@end table
@findex exclude
-The @value{op-exclude} option will prevent any file or member which
-matches the shell wildcards (@var{pattern}) from being operated on
-(@var{pattern} can be a single file name or a more complex expression).
-For example, if you want to create an archive with all the contents of
-@file{/tmp} except the file @file{/tmp/foo}, you can use the command
-@samp{tar --create --file=arch.tar --exclude=foo}. You may give
-multiple @samp{--exclude} options.
+The @value{op-exclude} option prevents any file or member whose name
+matches the shell wildcard (@var{pattern}) from being operated on.
+For example, to create an archive with all the contents of the directory
+@file{src} except for files whose names end in @file{.o}, use the
+command @samp{tar -cf src.tar --exclude='*.o' src}.
+
+A @var{pattern} containing @samp{/} excludes a name if an initial
+subsequence of the name's components matches @var{pattern}; a
+@var{pattern} without @samp{/} excludes a name if it matches any of its
+name components. For example, the pattern @samp{*b/RCS} contains
+@samp{/}, so it excludes @file{blob/RCS} and @file{.blob/RCS/f} but not
+@file{blob/RCSit/RCS} or @file{/blob/RCS}, whereas the pattern
+@samp{RCS} excludes all these names. Conversely, the pattern @samp{*.o}
+lacks @samp{/}, so it excludes @file{.f.o}, @file{d/f.o}, and
+@file{d.o/f}.
+
+Other than optionally stripping leading @samp{/} from names
+(@pxref{absolute}), patterns and candidate names are used as-is. For
+example, trailing @samp{/} is not trimmed from a user-specified name
+before deciding whether to exclude it.
+
+You may give multiple @samp{--exclude} options.
@table @kbd
@item --exclude-from=@var{file}
@node problems with exclude, , exclude, exclude
@unnumberedsubsec Problems with Using the @code{exclude} Options
-@FIXME{put in for the editor's/editors' amusement, but should be taken
-out in the final draft, just in case! : }
-
-@ignore
-subtitled: getting screwed using exclewed
-@end ignore
-
Some users find @samp{exclude} options confusing. Here are some common
pitfalls:
@itemize @bullet
@item
-The main operating mode of @code{tar} will always act on file names
-listed on the command line, no matter whether or not there is an
-exclusion which would otherwise affect them. In the example above, if
+The main operating mode of @code{tar} does not act on a path name
+explicitly listed on the command line if one of its file name
+components is excluded. In the example above, if
you create an archive and exclude files that end with @samp{*.o}, but
-explicitly name the file @samp{catc.o} after all the options have been
-listed, @samp{catc.o} @emph{will} be included in the archive.
+explicitly name the file @samp{dir.o/foo} after all the options have been
+listed, @samp{dir.o/foo} will be excluded from the archive.
@item
You can sometimes confuse the meanings of @value{op-exclude} and
For example, write:
@example
-$ @kbd{tar -c -f @var{archive.tar} -X '*/tmp/*' @var{directory}}
+$ @kbd{tar -c -f @var{archive.tar} --exclude '*.o' @var{directory}}
@end example
@noindent
rather than:
@example
-$ @kbd{tar -c -f @var{archive.tar} -X */tmp/* @var{directory}}
+$ @kbd{tar -c -f @var{archive.tar} --exclude *.o @var{directory}}
@end example
@item
To select files newer than the modification time of a file that already
exists, you can use the @samp{--reference} (@samp{-r}) option of GNU
@code{date}, available in GNU shell utilities 1.13 or later. It returns
-the timestamp of that already existing file; this timestamp expands to
+the time stamp of the already-existing file; this time stamp expands to
become the referent date which @samp{--newer} uses to determine which
files to archive. For example, you could say,
@end example
@noindent
-which tells @FIXME{need to fill this in!}.
+@FIXME{which tells -- need to fill this in!}
@node recurse, one, after, Choosing
@section Descending into Directories
@code{find} for locating files they want to back up, and since
@code{tar} @emph{usually} recursively descends on directories, they have
to use the @samp{@w{! -d}} option to @code{find} @FIXME{needs more
-explanation or a cite to another info file} as they usually do not want
+explanation or a cite to another info file}as they usually do not want
all the files in a directory. They then use the @value{op-file-from}
option to archive the files located via @code{find}.
@end table
By default, GNU @code{tar} drops a leading @samp{/} on input or output.
-This option turns off this behavior; it is equivalent to changing to the
+This option turns off this behavior.
+Tt is roughly equivalent to changing to the
root directory before running @code{tar} (except it also turns off the
usual warning message).
@table @kbd
@item --absolute-names
-Preserves full file names (inclusing superior dirctory names) when
+Preserves full file names (including superior directory names) when
archiving files. Preserves leading slash when extracting files.
@end table
* General date syntax:: Common rules.
* Calendar date item:: 19 Dec 1994.
* Time of day item:: 9:20pm.
-* Timezone item:: EST, DST, BST, UCT, AHST, ...
+* Time zone item:: EST, GMT, UTC, ...
* Day of week item:: Monday and others.
* Relative item in date strings:: next tuesday, 2 years ago.
* Pure numbers in date strings:: 19931219, 1440.
@cindex items in date strings
A @dfn{date} is a string, possibly empty, containing many items
-separated by whitespace. The whitespace may be omitted when no
+separated by white space. The white space may be omitted when no
ambiguity arises. The empty string means the beginning of today (i.e.,
midnight). Order of the items is immaterial. A date string may contain
many flavors of items:
@end example
-@node Time of day item, Timezone item, Calendar date item, Date input formats
+@node Time of day item, Time zone item, Calendar date item, Date input formats
@section Time of day item
@cindex time of day item
20:02:0
20:02
8:02pm
-20:02-0500 # In EST (Eastern U.S. Standard Time).
+20:02-0500 # In EST (U.S. Eastern Standard Time).
@end example
More generally, the time of the day may be given as
as opposed to the old tradition derived from Latin
which uses @samp{12m} for noon and @samp{12pm} for midnight.)
-@cindex timezone correction
-@cindex minutes, timezone correction by
-The time may alternatively be followed by a timezone correction,
+@cindex time zone correction
+@cindex minutes, time zone correction by
+The time may be followed by a time zone correction,
expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+}
or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number
-of zone minutes. When a timezone correction is given this way, it
+of zone minutes. When a time zone correction is given this way, it
forces interpretation of the time in UTC, overriding any previous
-specification for the timezone or the local timezone. The @var{minute}
-part of the time of the day may not be elided when a timezone correction
-is used. This is the only way to specify a timezone correction by
-fractional parts of an hour.
+specification for the time zone or the local time zone. The @var{minute}
+part of the time of the day may not be elided when a time zone correction
+is used.
-Either @samp{am}/@samp{pm} or a timezone correction may be specified,
+Either @samp{am}/@samp{pm} or a time zone correction may be specified,
but not both.
-@node Timezone item, Day of week item, Time of day item, Date input formats
-@section Timezone item
-
-@cindex timezone item
-
-A @dfn{timezone item} specifies an international timezone, indicated by
-a small set of letters. Any included period is ignored. Military
-timezone designations use a single letter. Currently, only integral
-zone hours may be represented in a timezone item. See the previous
-section for a finer control over the timezone correction.
+@node Time zone item, Day of week item, Time of day item, Date input formats
+@section Time zone item
-Here are many non-daylight-savings-time timezones, indexed by the zone
-hour value.
+@cindex time zone item
-@table @asis
-@item +000
-@cindex Greenwich Mean Time
-@cindex Universal Coordinated Time
-@cindex Western European Time
-@samp{GMT} for Greenwich Mean, @samp{UT} or @samp{UTC} for Universal
-(Coordinated), @samp{WET} for Western European and @samp{Z} for
-militaries.
-@item +100
-@cindex West African Time
-@samp{WAT} for West Africa and
-@samp{A} for militaries.
-@item +200
-@cindex Azores Time
-@samp{AT} for Azores and @samp{B} for militaries.
-@item +300
-@samp{C} for militaries.
-@item +400
-@cindex Atlantic Standard Time
-@samp{AST} for Atlantic Standard and @samp{D} for militaries.
-@item +500
-@cindex Eastern Standard Time
-@samp{E} for militaries and @samp{EST} for Eastern Standard.
-@item +600
-@cindex Central Standard Time
-@samp{CST} for Central Standard and @samp{F} for militaries.
-@item +700
-@cindex Mountain Standard Time
-@samp{G} for militaries and @samp{MST} for Mountain Standard.
-@item +800
-@cindex Pacific Standard Time
-@samp{H} for militaries and @samp{PST} for Pacific Standard.
-@item +900
-@cindex Yukon Standard Time
-@samp{I} for militaries and @samp{YST} for Yukon Standard.
-@item +1000
-@cindex Alaska-Hawaii Time
-@cindex Central Alaska Time
-@cindex Hawaii Standard Time
-@samp{AHST} for Alaska-Hawaii Standard, @samp{CAT} for Central Alaska,
-@samp{HST} for Hawaii Standard and @samp{K} for militaries.
-@item +1100
-@cindex Nome Standard Time
-@samp{L} for militaries and @samp{NT} for Nome.
-@item +1200
-@cindex International Date Line West
-@samp{IDLW} for International Date Line West and @samp{M} for
-militaries.
-@item -100
-@cindex Central European Time
-@cindex Middle European Time
-@cindex Middle European Winter Time
-@cindex French Winter Time
-@cindex Swedish Winter Time
-@samp{CET} for Central European, @samp{FWT} for French Winter,
-@samp{MET} for Middle European, @samp{MEWT} for Middle European
-Winter, @samp{N} for militaries and @samp{SWT} for Swedish Winter.
-@item -200
-@cindex Eastern European Time
-@cindex USSR Zone
-@samp{EET} for Eastern European, USSR Zone 1 and @samp{O} for militaries.
-@item -300
-@cindex Baghdad Time
-@samp{BT} for Baghdad, USSR Zone 2 and @samp{P} for militaries.
-@item -400
-@samp{Q} for militaries and @samp{ZP4} for USSR Zone 3.
-@item -500
-@samp{R} for militaries and @samp{ZP5} for USSR Zone 4.
-@item -600
-@samp{S} for militaries and @samp{ZP6} for USSR Zone 5.
-@item -700
-@cindex West Australian Standard Time
-@samp{T} for militaries and @samp{WAST} for West Australian Standard.
-@item -800
-@cindex China Coast Time
-@samp{CCT} for China Coast, USSR Zone 7 and @samp{U} for militaries.
-@item -900
-@cindex Japan Standard Time
-@samp{JST} for Japan Standard, USSR Zone 8 and @samp{V} for militaries.
-@item -1000
-@cindex East Australian Standard Time
-@cindex Guam Standard Time
-@samp{EAST} for East Australian Standard, @samp{GST} for Guam
-Standard, USSR Zone 9 and @samp{W} for militaries.
-@item -1100
-@samp{X} for militaries.
-@item -1200
-@cindex International Date Line East
-@cindex New Zealand Standard Time
-@samp{IDLE} for International Date Line East, @samp{NZST} for
-New Zealand Standard, @samp{NZT} for New Zealand and @samp{Y} for
-militaries.
-@end table
+A @dfn{time zone item} specifies an international time zone, indicated
+by a small set of letters, e.g.@: @samp{UTC} for Coordinated Universal
+Time. Any included period is ignored. By following a non-DST time zone
+by the string @samp{DST} in a separate word (that is, separated by some
+white space), the corresponding DST time zone may be specified.
-@cindex daylight savings time
-Here are many DST timezones, indexed by the zone hour value. Also, by
-following a non-DST timezone by the string @samp{DST} in a separate word
-(that is, separated by some whitespace), the corresponding DST timezone
-may be specified.
+Time zone items are obsolescent and are not recommended, because they
+are ambiguous; for example, @samp{EST} has a different meaning in
+Australia than in the United States. Instead, it's better to use
+unambiguous numeric time zone corrections like @samp{-0500}, as
+described in the previous section.
-@table @asis
-@item 0
-@samp{BST} for British Summer.
-@item +400
-@samp{ADT} for Atlantic Daylight.
-@item +500
-@samp{EDT} for Eastern Daylight.
-@item +600
-@samp{CDT} for Central Daylight.
-@item +700
-@samp{MDT} for Mountain Daylight.
-@item +800
-@samp{PDT} for Pacific Daylight.
-@item +900
-@samp{YDT} for Yukon Daylight.
-@item +1000
-@samp{HDT} for Hawaii Daylight.
-@item -100
-@samp{MEST} for Middle European Summer, @samp{MESZ} for Middle European
-Summer, @samp{SST} for Swedish Summer and @samp{FST} for French Summer.
-@item -700
-@samp{WADT} for West Australian Daylight.
-@item -1000
-@samp{EADT} for Eastern Australian Daylight.
-@item -1200
-@samp{NZDT} for New Zealand Daylight.
-@end table
-
-
-@node Day of week item, Relative item in date strings, Timezone item, Date input formats
+@node Day of week item, Relative item in date strings, Time zone item, Date input formats
@section Day of week item
@cindex day of week item
signed number. Unsigned numbers are taken as positively signed. No
number at all implies 1 for a multiplier. Following a relative item by
the string @samp{ago} is equivalent to preceding the unit by a
-multiplicator with value @math{-1}.
+multiplier with value @math{-1}.
@findex day @r{in date strings}
@findex tomorrow @r{in date strings}
@cindex pure numbers in date strings
-The precise intepretation of a pure decimal number is dependent of
+The precise interpretation of a pure decimal number depends on
the context in the date string.
If the decimal number is of the form @var{yyyy}@var{mm}@var{dd} and no
useful later on many other machines and with other versions of @code{tar}
is more challenging than you might think. @code{tar} archive formats
have been evolving since the first versions of Unix. Many such formats
-are around, and are not always comptible with each other. This section
+are around, and are not always compatible with each other. This section
discusses a few problems, and gives some advice about making @code{tar}
archives more portable.
before this whole area stabilizes@dots{}
There are plans to raise this 100 limit to 256, and yet produce POSIX
-conformant archives. Past 256, I do not know yet if GNU @code{tar}
+conforming archives. Past 256, I do not know yet if GNU @code{tar}
will go non-POSIX again, or merely refuse to archive the file.
There are plans so GNU @code{tar} support more fully the latest POSIX
@FIXME{ach; these two bits orig from "compare" (?). where to put?} Some
format parameters must be taken into consideration when modifying an
-archive: @FIXME{???}. Compressed archives cannot be modified.
+archive.@FIXME{???} Compressed archives cannot be modified.
You can use @samp{--gzip} and @samp{--gunzip} on physical devices
(tape drives, etc.) and remote files as well as on normal files; data
redundancy, for maximum compression. The adaptive nature of the
compression scheme means that the compression tables are implicitly
spread all over the archive. If you lose a few blocks, the dynamic
-construction of the compression tables becomes unsychronized, and there
+construction of the compression tables becomes unsynchronized, and there
is little chance that you could recover later in the archive.
There are pending suggestions for having a per-volume or per-file
compression in GNU @code{tar}. This would allow for viewing the
contents without decompression, and for resynchronizing decompression at
every volume or file, in case of corrupted archives. Doing so, we might
-loose some compressibility. But this would have make recovering easier.
+lose some compressibility. But this would have make recovering easier.
So, there are pros and cons. We'll see!
@table @kbd
+@item -I
@itemx --bzip2
-@itemx --unbzip2
Filter the archive through @code{bzip2}. Otherwise like @value{op-gzip}.
@item -Z
To use the older, obsolete, @code{compress} program, use the
@value{op-compress} option. The GNU Project recommends you not use
@code{compress}, because there is a patent covering the algorithm it
-uses. You could be sued for patent infringment merely by running
+uses. You could be sued for patent infringement merely by running
@code{compress}.
I have one question, or maybe it's a suggestion if there isn't a way
By the way, I like @code{ecc} but if (as the comments say) it can't
deal with loss of block sync, I'm tempted to throw some time at adding
that capability. Supposing I were to actually do such a thing and
-get it (apparantly) working, do you accept contributed changes to
+get it (apparently) working, do you accept contributed changes to
utilities like that? (Leigh Clayton @file{loc@@soliton.com}, May 1995).
Isn't that exactly the role of the @value{op-use-compress-prog} option?
large (sparse) file, even though the resulting tar archive may be small.
(One user reports that dumping a @file{core} file of over 400 megabytes,
but with only about 3 megabytes of actual data, took about 9 minutes on
-a Sun Sparstation ELC, with full CPU utilisation.)
+a Sun Sparcstation ELC, with full CPU utilization.)
This reading is required in all cases and is not related to the fact
the @value{op-sparse} option is used or not, so by merely @emph{not}
Create extracted files with the same ownership they have in the
archive.
-When using super-user at extraction time, ownership is always restored.
-So, this option is meaningful only for non-root users, when @code{tar}
+This is the default behavior for the superuser,
+so this option is meaningful only for non-root users, when @code{tar}
is executed on those systems able to give files away. This is
considered as a security flaw by many people, at least because it
makes quite difficult to correctly account users for the disk space
When writing an archive, @code{tar} writes the user id and user name
separately. If it can't find a user name (because the user id is not
in @file{/etc/passwd}), then it does not write one. When restoring,
-and doing a @code{chmod} like when you use @value{op-same-permissions}
-(@FIXME{same-owner?}), it tries to look the name (if one was written)
+and doing a @code{chmod} like when you use @value{op-same-permissions},
+@FIXME{same-owner?}it tries to look the name (if one was written)
up in @file{/etc/passwd}. If it fails, then it uses the user id
stored in the archive instead.
+@item --no-same-owner
+Do not attempt to restore ownership when extracting. This is the
+default behavior for ordinary users, so this option has an effect
+only for the superuser.
+
@item --numeric-owner
The @value{op-numeric-owner} option allows (ANSI) archives to be written
without user/group name information or such information to be ignored
Archives are permitted to have more than one member with the same
member name. One way this situation can occur is if more than one
version of a file has been stored in the archive. For information
-about adding new versions of a file to an archive, see @ref{update},
-and to learn more about having more than one archive member with the
-same name, see @FIXME-xref{-backup node, when it's written}.
+about adding new versions of a file to an archive, see @ref{update}.
+@FIXME-xref{To learn more about having more than one archive member with the
+same name, see -backup node, when it's written.}
In addition to entries describing archive members, an archive may
contain entries which @code{tar} itself uses to store information.
permissions, the mode bit(s) specifying those special permissions
are ignored. Modes which are not supported by the operating system
restoring files from the archive will be ignored. Unsupported modes
-should be faked up when creating or updating an archive; e.g. the
+should be faked up when creating or updating an archive; e.g.@: the
group permission could be copied from the @emph{other} permission.
The @code{uid} and @code{gid} fields are the numeric user and group
not support numeric user or group IDs, these fields should be ignored.
The @code{size} field is the size of the file in bytes; linked files
-are archived with this field specified as zero. @FIXME-xref{Modifiers}, in
-particular the @value{op-incremental} option.
+are archived with this field specified as zero. @FIXME-xref{Modifiers, in
+particular the @value{op-incremental} option.}
The @code{mtime} field is the modification time of the file at the time
it was archived. It is the ASCII representation of the octal value of
is needed to deal with a file. Note that this means that this flag
can only be set when dealing with a sparse file, and it is only set
in the event that the description of the file will not fit in the
-alloted room for sparse structures in the header. In other words,
+allotted room for sparse structures in the header. In other words,
an extended_header is needed.
The @code{extended_header} structure is used for sparse files which
lets you find a header with some variation of @samp{dd skip=@var{nn}}.
However, modern @code{cpio}'s and variations have an option to just
search for the next file header after an error with a reasonable chance
-of re-syncing. However, lots of tape driver software won't allow you to
+of resyncing. However, lots of tape driver software won't allow you to
continue past a media error which should be the only reason for getting
out of sync unless a file changed sizes while you were writing the
archive.
The amount of data a tape or disk holds depends not only on its size,
but also on how it is formatted. A 2400 foot long reel of mag tape
-holds 40 megabytes of data when formated at 1600 bits per inch. The
+holds 40 megabytes of data when formatted at 1600 bits per inch. The
physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.
Magnetic media are re-usable---once the archive on a tape is no longer
needed, the archive can be erased and the tape or disk used over.
Media quality does deteriorate with use, however. Most tapes or disks
-should be disgarded when they begin to produce data errors. EXABYTE
-tape cartridges should be disgarded when they generate an @dfn{error
+should be discarded when they begin to produce data errors. EXABYTE
+tape cartridges should be discarded when they generate an @dfn{error
count} (number of non-usable bits) of more than 10k.
Magnetic media are written and erased using magnetic fields, and
supporting automatic device detection at installation time. This was
failing really in too many cases, it was hopeless. This is now
completely left to the installer to override standard input and standard
-output for default device, if this seems preferrable to him/her.
+output for default device, if this seems preferable.
Further, I think @emph{most} actual usages of @code{tar} are done with
pipes or disks, not really tapes, cartridges or diskettes.
the @code{tar} program was installed is used instead. This is
the first found of @file{/usr/ucb/rsh}, @file{/usr/bin/remsh},
@file{/usr/bin/rsh}, @file{/usr/bsd/rsh} or @file{/usr/bin/nsh}.
-The installer may have overriden this by defining the environment
+The installer may have overridden this by defining the environment
variable @code{RSH} @emph{at installation time}.
@item -[0-7][lmh]
to fit more data on a tape (because there are fewer gaps). If you are
archiving on cartridge, a very large blocking factor (say 126 or more)
greatly increases performance. A smaller blocking factor, on the other
-hand, may be usefull when archiving small files, to avoid archiving lots
+hand, may be useful when archiving small files, to avoid archiving lots
of nulls as @code{tar} fills out the archive to the end of the record.
In general, the ideal record size depends on the size of the
inter-record gaps on the tape you are using, and the average size of the
the archive is directly handled to a local disk, instead of any special
device,
@item
-@value{op-blocking-factor} is not explicitely specified on the @code{tar}
+@value{op-blocking-factor} is not explicitly specified on the @code{tar}
invocation.
@end itemize
succeed in recovering the information. So, blocking should not be too
low, nor it should be too high. @code{tar} uses by default a blocking of
20 for historical reasons, and it does not really matter when reading or
-writing to disk. Current tape technology would easily accomodate higher
+writing to disk. Current tape technology would easily accommodate higher
blockings. Sun recommends a blocking of 126 for Exabytes and 96 for DATs.
We were told that for some DLT drives, the blocking should be a multiple
of 4Kb, preferably 64Kb (@w{@kbd{-b 128}}) or 256 for decent performance.
If you want to put more than one @code{tar} archive on a given tape, you
will need to avoid using the rewinding version of the tape device. You
will also have to pay special attention to tape positioning. Errors in
-positionning may overwrite the valuable data already on your tape. Many
+positioning may overwrite the valuable data already on your tape. Many
people, burnt by past experiences, will only use rewinding devices and
limit themselves to one file per tape, precisely to avoid the risk of
such errors. Be fully aware that writing at the wrong position on a
Before reading an archive, you should make sure the tape head is at
the beginning of the archive you want to read. (The @code{restore}
script will find the archive automatically. @FIXME{There is no such
-restore script!}. @FIXME-xref{Scripted Restoration}). @xref{mt}, for
+restore script!}@FIXME-xref{Scripted Restoration}@xref{mt}, for
an explanation of the tape moving utility.
If you want to add new archive file entries to a tape, you should
on it) and print an error if the archive label doesn't match the
@var{archive-name} specified. @var{archive-name} can be any regular
expression. If the labels match, @code{tar} extracts the archive.
-@value{xref-label}. @FIXME-xref{Matching Format Parameters}.
-@FIXME{fix cross references} @samp{tar --list --label} will cause
-@code{tar} to print the label.
+@value{xref-label}.
+@FIXME-xref{Matching Format Parameters}@FIXME{fix cross
+references}@samp{tar --list --label} will cause @code{tar} to print the
+label.
@FIXME{Program to list all the labels on a tape?}
volumes, specify @value{op-label} again in conjunction with the
@value{op-append}, @value{op-update} or @value{op-concatenate} operation.
-@cindex Labelling multi-volume archives
+@cindex Labeling multi-volume archives
@FIXME{example}
@FIXME{There should be a sample program here, including an exit
@value{op-label} option. This will write a special block identifying
@var{volume-label} as the name of the archive to the front of the archive
which will be displayed when the archive is listed with @value{op-list}.
-If you are creating a multi-volume archive with @value{op-multi-volume}
-(@FIXME-pxref{Using Multiple Tapes}), then the volume label will have
+If you are creating a multi-volume archive with
+@value{op-multi-volume}@FIXME-pxref{Using Multiple Tapes}, then the
+volume label will have
@samp{Volume @var{nnn}} appended to the name you give, where @var{nnn} is
the number of the volume of the archive. (If you use the @value{op-label}
option when reading an archive, it checks to make sure the label on the
@value{op-multi-volume}, each volume of the archive will have an
archive label of the form @samp{@var{archive-label} Volume @var{n}},
where @var{n} is 1 for the first volume, 2 for the next, and so on.
-@FIXME-xref{Multi-Volume Archives}, for information on creating multiple
-volume archives.
+@FIXME-xref{Multi-Volume Archives, for information on creating multiple
+volume archives.}
If you list or extract an archive using @value{op-label}, @code{tar} will
print an error if the archive label doesn't match the @var{archive-label}
after the operator launches @code{tar} or types the carriage return
telling that the next tape is ready. Comparing date labels does give
an idea of tape throughput only if the delays for rewinding tapes
-and the operator switching them were negligible, which is ususally
+and the operator switching them were negligible, which is usually
not the case.
@FIXME{was --volume}
errors on some tapes. Archives written to pipes, some cartridge tape
drives, and some other devices cannot be verified.
-One can explicitely compare an already made archive with the file system
+One can explicitly compare an already made archive with the file system
by using the @value{op-compare} option, instead of using the more automatic
@value{op-verify} option. @value{xref-compare}.
Almost all tapes and diskettes, and in a few rare cases, even disks can
be @dfn{write protected}, to protect data on them from being changed.
Once an archive is written, you should write protect the media to prevent
-the archive from being accidently overwritten or deleted. (This will
+the archive from being accidentally overwritten or deleted. (This will
protect the archive from being changed with a tape or floppy drive---it
will not protect it from magnet fields or other physical hazards).