Home Explore Blog CI



man-pages

4th chunk of `tar.man`
58c3361effc268580f65f9b63cd7705275005bc457b07cf30000000100000fba
 contents of FILE is not inspected, it is needed only due to syntactical requirements.  It is therefore common practice to use /dev/null in its place.

       --hole-detection=METHOD
              Use METHOD to detect holes in sparse files.  This option implies --sparse.  Valid values for METHOD are seek and raw.  Default is seek with fallback to raw when not applicable.

       -G, --incremental
              Handle old GNU‐format incremental backups.

       --ignore-failed-read
              Do not exit with nonzero on unreadable files.

       --level=NUMBER
              Set dump level for created listed‐incremental archive.  Currently only --level=0 is meaningful: it instructs tar to truncate the snapshot file before dumping, thereby forcing a level 0 dump.

       -n, --seek
              Assume  the  archive is seekable.  Normally tar determines automatically whether the archive can be seeked or not.  This option is intended for use in cases when such recognition fails.  It takes effect only if
              the archive is open for reading (e.g. with --list or --extract options).

       --no-check-device
              Do not check device numbers when creating incremental archives.

       --no-seek
              Assume the archive is not seekable.

       --occurrence[=N]
              Process only the Nth occurrence of each file in the archive.  This option is valid only when used with one of the following subcommands: --delete, --diff, --extract or --list and when a list of files  is  given
              either on the command line or via the -T option.  The default N is 1.

       --restrict
              Disable the use of some potentially harmful options.

       --sparse-version=MAJOR[.MINOR]
              Set  version  of the sparse format to use (implies --sparse).  This option implies --sparse.  Valid argument values are 0.0, 0.1, and 1.0.  For a detailed discussion of sparse formats, refer to the GNU Tar Man‐
              ual, appendix D, "Sparse Formats".  Using info reader, it can be accessed running the following command: info tar ’Sparse Formats’.

       -S, --sparse
              Handle sparse files efficiently.  Some files in the file system may have segments which were actually never written (quite often these are database files created by such systems as DBM).  When  given  this  op‐
              tion, tar attempts to determine if the file is sparse prior to archiving it, and if so, to reduce the resulting archive size by not dumping empty parts of the file.

   Overwrite control
       These options control tar actions when extracting a file over an existing copy on disk.

       -k, --keep-old-files
              Don’t replace existing files when extracting.

       --keep-newer-files
              Don’t replace existing files that are newer than their archive copies.

       --keep-directory-symlink
              Don’t replace existing symlinks to directories when extracting.

       --no-overwrite-dir
              Preserve metadata of existing directories.

       --one-top-level[=DIR]
              Extract all files into DIR, or, if used without argument, into a subdirectory named by the base name of the archive (minus standard compression suffixes recognizable by --auto-compress).

       --overwrite
              Overwrite existing files when extracting.

       --overwrite-dir
              Overwrite metadata of existing directories when extracting (default).

       --recursive-unlink
              Recursively remove all files in the directory prior to extracting it.

       --remove-files
              Remove files from disk after adding them to the archive.

       --skip-old-files
              Don’t replace existing files when extracting, silently skip over them.

       -U, --unlink-first
              Remove each file prior to extracting over it.

       -W, --verify
              Verify the archive after writing it.

   Output stream selection
       --ignore-command-error

       Ignore

Title: GNU tar: Advanced Operation Modifiers and Overwrite Control
Summary
This section details GNU tar operation modifiers like disabling seek assumptions (--no-seek), processing specific file occurrences (--occurrence[=N]), restricting options (--restrict), setting sparse format (--sparse-version), and sparse file handling (-S). Overwrite control options during extraction include keeping old/newer files (-k, --keep-old-files, --keep-newer-files), preserving directory symlinks/metadata (--keep-directory-symlink, --no-overwrite-dir), extracting into a top-level directory (--one-top-level), overwriting files/metadata (--overwrite, --overwrite-dir), recursively unlinking (--recursive-unlink), removing files after archiving (--remove-files), skipping old files (--skip-old-files), unlinking before extraction (-U), and verifying the archive (-W). Introduces 'Output stream selection'.