ultrix man page for tar

Query: tar

OS: ultrix

Section: 1

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

tar(1)							      General Commands Manual							    tar(1)

Name
       tar - multivolume archiver

Syntax
       tar [key] [name...]

Description
       The  tape  archiver command, saves and restores multiple files to and from a single archive.  The default archive device is but any file or
       device may be requested through the use of options.

       The key is a string of characters containing at most one function letter and possibly names specifying which files to dump or restore.	In
       all cases, appearance of a directory name refers to the files and (recursively) subdirectories of that directory.

       This  utility supports EOT handling which allows the use of multiple media.  The utility prompts for the next volume when it encounters the
       end of the current volume.

Function Keys
       The function portion of the key is specified by one of the following letters:

       c       Create a new archive on tape, disk or file.  Writing starts at the beginning of the archive instead of after the last file.

       r       Write the named files to the end of the archive.

       t       List the names of the files as they occur on the input archive.

       u       Add the named files to the archive if they are not there already or if they have been modified since they were last put in the  ar-
	       chive.

       x       Extract	the named files from the archive.  If the named file matches a directory whose contents had been written into the archive,
	       the directory is recursively extracted.	The owner, modification time, and mode are restored, if possible.  If no file argument	is
	       given,  the entire content of the archive is extracted.	Note that if multiple entries specifying the same file are in the archive,
	       the last one overwrites all previous versions extracted.

Options
       You can use one or more of the following options in addition to the letter which selects the function desired.

       0...9	 Substitute number for the device unit number as in The default is the high density rewind tape device number zero named The  com-
		 mand
		 tar cv4 tar.c
		 uses device

       A	 Use next argument as archive number with which to begin output.

       B	 Force input and output blocking to 20 blocks/record.  This option allows to work across a communications channel where the block-
		 ing may not be maintained.

       D	 Directory output in original style.

       C	 Use to perform a directory change prior to archiving data.

       F ]	 Operate in fast mode .  When -F is specified, skips all SCCS directories, core files, and error files.  When  -FF  is	specified,
		 also skips all and *.o files.

       H	 Help mode.  Print a summary of the function keys and options.

       M	 Next arg specifies maximum archive number to be written and prints current archive number on output line.

       N	 No  multi-archive, file splitting, or new header format on output.  Output directories in previous tar format. On input, set file
		 UID & GID from file header vs. values in and group files.

       O	 Include file owner & group names in verbose output (t & x functions) if present in archive header.   Output  warning  message	if
		 owner or group name not found in or file (cru functions).

       P	 Used to specify POSIX format tapes.  Unnecessary with keys other than the c key.

       R	 Each named file contains a list of file names separated by newlines which is added to (c function key) or extracted from (x func-
		 tion key) the archive.

       S	 Output User Group Standard archive format.

       V	 Display extended verbose information.	Included are the version number of the number of blocks used on the device, the number	of
		 blocks  in  a	file, and the protection modes given in a format similar to the ls -l command.	In addition to this information, V
		 provides the information given by the v option.

       b	 Use the next argument as the blocking factor for tape records.  The default is 20 (the maximum is 127).  This option should  only
		 be used with raw magnetic tape archives (See the f option).  The block size is determined automatically when reading tapes (x and
		 t) keys. See the Restrictions section.

       d	 Use as the default device.  The command is recommended for use with floppy disks.

       f	 Use the next argument as the name of the archive instead of /dev/rmt0h.  If the name of the file is - , writes to standard output
		 or  reads  from standard input, whichever is appropriate.  Thus, can be used as the head or tail of a filter chain.  You can also
		 use to move hierarchies.  The following example shows how to move the directory fromdir to the directory todir :
		 # cd fromdir; tar cf - . | (cd todir; tar xpf -)

       h	 Save a copy of the actual file on the output device under the symbolic link name, instead of placing the symbolic information	on
		 the  output.  The default action of is to place symbolic link information on the output device.  A copy of the file itself is not
		 saved on the output device.

       i	 Ignore checksum errors found in the archive.

       l	 Complain if cannot resolve all of the links to the files dumped.  If this is not specified, no error messages are printed.

       m	 Do not restore the modification times.  The modification time is the time of  extraction.   Tar  normally  restores  modification
		 times of regular and special files.

       o	 Suppress  the	normal directory information.  On output, normally places information specifying owner and modes of directories in
		 the archive.  Former versions of when encountering this information will give error message of the form,
		 <name>/: cannot create
		 will place information specifying owner and modes of directories in the archive.

       p	 Restore the named files to their original modes, ignoring the present Setuid and sticky bit information is also restored  to  the
		 superuser.

       s	 Next argument specifies size of archive in 512 byte blocks.

       v	 Write	the  name  of each file treated, preceded by the function letter, to diagnostic output.  Normally, does its work silently.
		 With the t function key, the verbose option provides more information about the tape entries than just their names.
		 #cd /
		 #tar cvf tar-out vmunix
		 Produces the output ``a vmunix 1490 blocks'' where 1490 is the number of 512 byte blocks in the file ``vmunix''.
		 #tar xvf tar-out
		 Produces the output ``x vmunix, 762880 bytes, 1490 blocks'' where 762880 is the number of bytes and 1490 is  the  number  of  512
		 byte blocks in the file ``vmunix'' which was extracted.

       w	 Print	the  action to be taken, followed by file name, then wait for user confirmation.  If a word beginning with the letter y is
		 given, the action is done.  Any other input means do not do it.

Restrictions
       There is no way to ask for the nth occurrence of a file.

       Tape errors are handled ungracefully.

       The u key can be slow.

       The limit on file name length is 100 characters.

       There is no way to follow symbolic links selectively.

       On SCSI tape devices tar (when reading) may end on one volume of a multi-volume set without prompting for the next volume. This is  a  very
       infrequent condition. The next volume should be loaded and the command issued again.

       Using a blocking factor other than the default (b option) may lead to higher performance. However, you must select a value that is compati-
       ble with the hardware limitations of the source and destination machines.  Software limitations may apply for other versions of

       When extracting (x), reads the entire tape. See the r and u keys.

Examples
       To archive files from and type:
       # tar c -C /usr/include . -C /etc .

       The command can properly handle blocked archives.

Diagnostics
       Indicates bad key characters and read/write errors.

       Indicates if enough memory is not available to hold the link tables.

Files
See Also
       mdtar(1), mt(1), tar(5)

																	    tar(1)
Similar Topics in the Unix Linux Community
Automated FTP task
How to put a word starting at particular position in a file using shell scripting
The Start Of A Simple Audio Scope Shell Script...
Tar stucks while extracting
Script to tar/rsync/rm multiple folder names