(tar)Characteristics
Next:
Selection Options Prev:
Changing the Archive Name Up:
Specifying Names to tar
Selecting Files by Characteristic
=================================
To avoid crossing file system boundaries when archiving parts of a
directory tree, use `--one-file-system' (`-l'). This option only
affects files that are archived because they are in a directory that is
being archived; files explicitly named on the command line are archived
regardless of where they reside.
This option is useful for making full or incremental archival backups
of a file system.
If this option is used in conjunction with `--verbose' (`-v'), files
that are excluded are mentioned by name on the standard error.
`--one-file-system'
`-l'
Prevents `tar' from crossing file system boundaries when
archiving. Use in conjunction with any write operation.
To avoid operating on files whose names match a particular pattern,
use the `--exclude=PATTERN' or `--exclude-from=FILE-OF-PATTERNS' (`-X
FILE-OF-PATTERNS') options.
When you specify the `--exclude=PATTERN' option, `tar' ignores files
which match the PATTERN, which can be a single file name or a more
complex expression. Thus, if you invoke `tar' with `tar --create
--exclude=*.o', no files whose names end in `.o' are included in the
archive.
FIXME: what other things can you use besides "*"?
`--exclude-from=FILE-OF-PATTERNS' (`-X FILE-OF-PATTERNS') acts like
`--exclude=PATTERN', but specifies a file FILE containing a list of
patterns. `tar' ignores files with names that fit any of these
patterns.
You can use either option more than once in a single command.
`--exclude=PATTERN'
Causes `tar' to ignore files that match the PATTERN.
`--exclude-from=FILE'
Causes `tar' to ignore files that match the patterns listed in
FILE.
FIXME: --exclude-from used to be "--exclude", --exclude didn't used to
FIXME: exist.
To operate only on files with modification or status-change times
after a particular date, use `--after-date=DATE' (`-N DATE'). You can
use this option with `--create' (`-c') or `--append' (`-r') to insure
only new files are archived, or with `--extract' (`-x') to insure only
recent files are resurrected.
FIXME: or --newer DATE
`--newer-mtime=DATE' acts like `--after-date=DATE' (`-N DATE') but
tests just the modification times of the files, ignoring status-change
times.
FIXME: need example of --newer-mtime with quoted argument
Remember that the entire date argument should be quoted if it
contains any spaces.
*Please Note:* `--after-date=DATE' (`-N DATE') and
`--newer-mtime=DATE' should not be used for incremental backups. Some
files (such as those in renamed directories) are not selected up
properly by these options.
FIXME: xref to incremental backup chapter when node name is decided.
`--after-date=DATE'
`--newer=DATE'
`-N DATE'
Acts on files only if their modification or inode-changed times are
later than DATE. Use in conjunction with any operation.
`--newer-mtime=DATE'
Acts like `--after-date=DATE' (`-N DATE'), but only looks at
modification times.
FIXME: following is the getdate date format --- needs to be re-written,
FIXME: made a sub-node:
Time/Date Formats Accepted by getdate (omitting obscure
constructions)
The input consists of one or more of: time zone day date year in any
order.
Those in turn consist of (`|' and `/' mean `or', `[]' means
`optional'):
time: H am/pm | H:M [am/pm] | H:M:S [am/pm] zone: timezone-name |
timezone-name dst day: day-name | day-name, | N day-name date: M/D |
M/D/Y | month-name D | month-name D, Y | D month-name | D month-name Y
year: Y
am can also be a.m., pm can also be p.m. case and spaces around
punctuation are not significant.
FIXME: month and day names can be abbreviated.
Reading Names from a File-
Excluding Some Files-
Operating Only on New Files-
Crossing Filesystem Boundaries-
automatically generated by info2www version 1.2