TAR(1) TAR(1) NAME tar - tape archiver SYNOPSIS tar key [ file ... ] DESCRIPTION Tar saves and restores files, normally on magnetic on tape. The key is a string that contains at most one function let- ter plus optional modifiers. Other arguments to the command are names of files or directories to be dumped or restored. A directory name implies all the contained files and subdi- rectories (recursively). The function is one of the following letters: r The named files are written on the end of the tape. x Extract the named files from the tape. If a file is a directory, the directory is extracted recursively. Owners and modes are restored if possible. If no file argument is given, extract the entire tape. If the tape contains multiple entries for a file, the latest one wins. t List all occurrences of each file on tape, or of all files if there are no file arguments. u Add the named files if they are not on the tape or are newer than the tape version. c Create a new tape; writing begins at the beginning of the tape instead of after the last file. o Omit owner and modes of directories, for compatibility with old versions of tar. p Restore files to their original modes, ignoring the present umask(2). Setuid and sticky information will be restored when tar is executed by the super-user. The modifiers are: 0,...,7 Select a tape drive. The default is 1. Incompatible with modifier f. v (verbose) Print the name of each file treated preceded by the function letter. With t, give more details about the tape entries. TAR(1) TAR(1) w Print the action to be taken followed by file name, then wait for user confirmation. If the answer begins with `y', the action is performed. Any other input means don't do it. f Use the next argument as the name of the archive instead of the default If the name of the file is `-', tar writes to standard output or reads from standard input, whichever is appropriate. Tar can be used to move hierarchies thus: (cd fromdir; tar cf - .) | (cd todir; tar xf -) b Write output in nĂ—512-byte blocks, where n is the next argument, default 20, maximum 40. Useful for raw mag- netic tape archives (see f above); destructive for disk archives. l Complain if links cannot be resolved. If l is not specified, no error messages are printed. L Write information needed to re-create symbolic links on the tape instead of following the links. Tapes thus written cannot be read on older versions of tar . FILES SEE ALSO cpio(1), bundle(1), mt(4) BUGS There is no way to ask for any but the last occurrence of a file. Tape errors are handled ungracefully. The u option can be slow, and works only with archives on disk files. File names are limited to 100 characters.