Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pxtar(1) [ultrix man page]

pxtar(1)						      General Commands Manual							  pxtar(1)

       pxtar - manipulates tape archives

       pxtar  [-c  |  -r | -t | -u | -x] [-BdFhilmMpsvw] [-number] [bblocks] [-Cdirectory ...]	[-ffile] [-Linputlist] [-Nblocks] [-S blocksb | -S
       feet | -S feet @density] [file ...]

       The command writes files to or retrieves files from an archive storage medium or an archive file.  The command looks for  archives  on  the
       default device (usually tape), unless you specify another device or archive file with the -f option.

       Filenames  must	not  be longer than 257 characters and must not contain spaces.  Characters following the first space are ignored.  Inter-
       nally, the filename may be split into two pieces to fit into the header block.  For more details, see Issue 3  of  the  X/Open  Portability
       Guide, Volume 3, XSI Supplementary Definitions, section 18.5.

       When  writing  to an archive, uses a temporary file and maintains in memory a table of files with several links.  You will receive an error
       message if cannot create the temporary file, or if there is not enough memory available to hold the link tables.

Function Keys
       You must supply one of the following five function keys to control the actions of

       -c   Creates a new archive and writes the files at the beginning of the archive.

       -r   Writes the file at the end of the archive.

       -t   Lists the files in the order in which they appear in the archive.  Files may appear more than once.

       -u   Adds file to the end of the archive only if it is not in the archive already or if it has been modified since it was  written  to  the

       -x   Extracts  file  from  the  archive.  If you specify a directory, extracts all files in that directory from the archive.  If you do not
	    specify a file or a directory, extracts all of the files from the archive.	When an archive contains multiple copies of the same file,
	    extracts  only  the  last  one and overwrites all earlier ones.  If you have superuser authority (see the reference page), creates all
	    files and directories with the same user and group IDs as on the tape.  If you do not have superuser authority, the files and directo-
	    ries have your user and group IDs.

       The  options  to are listed below.  In all cases, a directory argument refers to all the files and subdirectories, recursively, within that
       directory.  Options without corresponding arguments may appear separately or be grouped together.  Options that	take  arguments  may  have
       them  adjacent  to the option letter or as the entire following argument.  The -b, -C, -S, and -f options can accept optional spaces before
       their arguments.

	    Specifies the number of 512-byte blocks per record.  The default is 20, which is appropriate for tape records.  (The maximum  is  also
	    20.)  Due to the size of inter-record gaps, tapes written with large blocking factors can hold much more data than tapes with only one
	    block per record.
	    The block size is determined automatically when tapes are read (function keys -x or -t).  When archives are updated with the -u and -r
	    functions,	the existing record size is used.  The command writes archives using the specified blocks value only when creating new ar-
	    chives with the -c flag.
	    For output to ordinary files with the -f option, you can save disk space by using a blocking factor that  matches  the  size  of  disk
	    blocks  (for  example, -b4 for 2048-byte disk blocks).  Ordinary files must be read using the same blocking factor used when they were

       -B   Forces input and output blocking to 20 blocks per record.  This option was added so that can work across communications channels where
	    the blocking may not be maintained.

	    Performs  a to a directory preceded by -C.	This allows multiple directories not related by a close common parent to be archived using
	    short relative pathnames.  For example, to archive files from and one might use the following command:

	      % pxtar c -C/usr/include -C/etc

       -d   Suppress separate entries for directories, blocks and character special files, and FIFOs (First In First Out piped	processes).   When
	    this  option  is specified, writes only ordinary files to an archive, and extracts only ordinary files and the directories required to
	    contain them as determined by the pathnames in the archive.  Normally, preserves the directory permission  codes  and  restores  empty
	    directories, special files, and FIFOs with the -x flag.

	    Uses  file	as  the archive to be read or written.	When this option is not specified, uses a system-dependent default filename of the
	    form /dev/rmt?h (usually /dev/rmt0h).  If the file specified is - (minus), writes to standard output or  reads  from  standard  input.
	    When writing to standard output, only the -c flag can be used (-r or -u cannot be used).

       -F   Checks the file type before archiving.  SCCS, RCS, core, error files, filenames ending in and files will not be archived.

       -h   Forces to follow symbolic links as if they were normal files or directories.  Normally, does not follow symbolic links.

       -i   Ignores  header  checksum  errors.	 The  command  writes a file header containing a checksum for each file in the archive.  When this
	    option is not specified, the system verifies the contents of the header blocks by recomputing the checksum, and aborts with a  `direc-
	    tory  checksum  error'  when a mismatch occurs.  When this option is specified, logs the error and then scans forward until it finds a
	    valid header block.  This permits restoring files from later volumes of a multi-volume archive without reading earlier volumes.

       -l   Writes error messages to standard output if cannot resolve all of the links to the files archived.	 When  you  do	not  specify  this
	    option, the system does not display these messages.

	    Writes  the files listed in the inputlist file to the archive.  inputlist should contain one filename per line.  Files and directories
	    from inputlist are treated recursively. If you include the name of a directory in inputlist, command writes the directory to  the  ar-
	    chive as well as the files and subdirectories to the archive.  If you also list files or directories on the command line, the contents
	    of inputlist are included after has written all the files or the directories and their subdirectories to the archive.

       -m   Uses the time of extraction as the modification time.  The default is to preserve the modification time of the files.

       -M   Instructs not to cross mount points.  The default is to cross mount points.

	    Allows to use very large clusters of blocks when it deals with streaming tape archives.  Note, however, that on input, cannot automat-
	    ically  determine the block size of tapes with very long block sizes created with this option.  In the absence of a -Nblocks argument,
	    the largest block size that can automatically determine is 20 blocks.

       -p   Restores files to their original modes, ignoring the present umask.  "Set user ID" and sticky information will also be  restored  when
	    extracted by the superuser.

       -s   Tries to create a symbolic link if fails in its attempt to link (regular link) two files.

       -S blocksb
       -S feet
       -S feet @density
	    Specifies  the number of 512-byte blocks per volume (first format), independent of the tape blocking factor.  You can also specify the
	    size of the tape in feet by using the second form, and assumes a default density.  The third form allows  you  to  specify	both  tape
	    length  and density.  Feet are assumed to be 11 inches long to be conservative.  This option lets you deal more easily with multi-vol-
	    ume tape archives, where must be able to determine how many blocks fit on each volume.
	    Note that tape drives vary in density capabilities.  The density argument calculates the amount of data a system can fit  on  a  tape.
	    This allows the correct amount of data to be written to a tape.

       -v   Lists  the	name  of each file as it is processed.	With the -t flag, -v gives more information about the tape entries, including file
	    sizes, times of last modification, UID, and GID, and permissions.

       -w   Displays the action to be taken followed by the filename, then waits for user confirmation.  If the response begins with y or  Y,  the
	    action is performed; otherwise, the file is ignored.

	    Uses /dev/rmtnumberh instead of the default.  For example, -2 is the same as -f/dev/rmt2h.	The default unit is /dev/rmt0h.

       There is no way to ask for any occurrence of a file other than the last.

       There is no recovery from tape errors.

       Although anyone can archive special files, only a user with superuser authority can extract them from an archive.

       Do  not	replace  with Although the and commands have much in common, they are not interchangeable.  The command provides compatibility and
       interoperability with XPG3 systems; is not intended as a replacement for The command adds tape-label information to a tape archive, so  and
       have  different formats for multiple-volume archives.  The command has several added switches that enable features used in the installation
       process and by Substituting the for the causes the command to fail;  other commands may also be affected.

       1.     To write file1 and file2 to a new archive on the default tape drive:

		% pxtar -c file1 file2

       2.     To extract all files that are in the directory from the archive file on the tape device and use the time of extraction as the  modi-
	      fication time:

		% pxtar -xm -f/dev/rmt2 /tmp

       3.     To create a new archive file that contains file1 and pass the archive file to the command to be written to the device

		% pxtar -cvf - file1 | dd of=/dev/rmt1

       4.     To display the names of the files in the disk archive file on the current directory:

		% pxtar -vtf out.tar

       5.     To expand the compressed archive file pass the file to the command, and extract all files from the expanded archive file:

		% pcat fil.tar.z | pxtar -xvf -

Compatibility Notes
       Multi-volume archives created by are not interchangeable with multi-volume archives created by single-volume archives are interchangeable.

       The  utility produces archives that follow the format requirements specified in the IEEE 1003.1-1988 (POSIX) standard and the X/Open Porta-
       bility Guide, Issue 3.

       directory checksum error
       The -i option was not specified, and a checksum error occurred.

       Command path.
       Default archive name.
       Temporary archive file.

See Also
       cat(1), dd(1)

Man Page