GNU Info

Info Node: (tar.info)after

(tar.info)after


Next: recurse Prev: Wildcards Up: Choosing
Enter node , (file) or (file)node

Operating Only on New Files
===========================

     _(This message will disappear, once this node revised.)_

   The `--after-date=DATE' (`--newer=DATE', `-N DATE') option causes
`tar' to only work on files whose modification or inode-changed times
are newer than the DATE given.  If DATE starts with `/' or `.', it is
taken to be a file name; the last-modified time of that file is used as
the date.  If you use this option when creating or appending to an
archive, the archive will only include new files.  If you use
`--after-date' when extracting an archive, `tar' will only extract
files newer than the DATE you specify.

   If you only want `tar' to make the date comparison based on
modification of the actual contents of the file (rather than inode
changes), then use the `--newer-mtime=DATE' option.

   You may use these options with any operation.  Note that these
options differ from the `--update' (`-u') operation in that they allow
you to specify a particular date against which `tar' can compare when
deciding whether or not to archive the files.

`--after-date=DATE'
`--newer=DATE'
`-N DATE'
     Only store files newer than DATE.

     Acts on files only if their modification or inode-changed times are
     later than DATE.  Use in conjunction with any operation.

     If DATE starts with `/' or `.', it is taken to be a file name; the
     last-modified time of that file is used as the date.

`--newer-mtime=DATE'
     Acts like `--after-date=DATE' (`--newer=DATE', `-N DATE'), but
     only looks at modification times.

   These options limit `tar' to only operating on files which have been
modified after the date specified.  A file is considered to have
changed if the contents have been modified, or if the owner,
permissions, and so forth, have been changed.  (For more information on
how to specify a date, see Note: Date input formats; remember that the
entire date argument must be quoted if it contains any spaces.)

   Gurus would say that `--after-date=DATE' (`--newer=DATE', `-N DATE')
tests both the `mtime' (time the contents of the file were last
modified) and `ctime' (time the file's status was last changed: owner,
permissions, etc) fields, while `--newer-mtime=DATE' tests only `mtime'
field.

   To be precise, `--after-date=DATE' (`--newer=DATE', `-N DATE')
checks _both_ `mtime' and `ctime' and processes the file if either one
is more recent than DATE, while `--newer-mtime=DATE' only checks
`mtime' and disregards `ctime'.  Neither uses `atime' (the last time the
contents of the file were looked at).

   Date specifiers can have embedded spaces.  Because of this, you may
need to quote date arguments to keep the shell from parsing them as
separate arguments.

     *Please Note:* `--after-date=DATE' (`--newer=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
     properly by these options.  Note: incremental and
     listed-incremental.


automatically generated by info2www version 1.2.2.9