HP-UX Reference (11i v2 03/08) - 1 User Commands N-Z (vol 2)

t
tar(1) tar(1)
v Normally, tar does its work silently. The
v (verbose) function modifier causes tar to type
the name of each file it treats, preceded by the function letter. With the
t function, v gives
more information about the archive entries than just the name.
V Same as the v function modifier except that, when using the
t option, tar also prints out a
letter indicating the type of the archived file.
w Cause tar to print the action being taken, followed by the name of the file, then wait for the
user’s confirmation. If the user answers
y, the action is performed. Any other input means
"no".
When end-of-tape is reached,
tar prompts the user for a new special file and continues.
If a nine-track tape drive is used as the output device, it must be configured in Berkeley-compatibility
mode (see mt(7)).
The
O and N function modifiers specify the format in which
tar writes the archive. Upon extraction,
tar can read either format, regardless of the function modifiers used.
EXTERNAL INFLUENCES
Environment Variables
LC_TIME determines the format and contents of date and time strings output when listing the contents
of an archive with the -v option.
LANG determines the language equivalent of y (for yes/no queries).
If
LC_TIME is not specified in the environment or is set to the empty string, the value of
LANG is used as
the default.
If
LANG is not specified or is set to the empty string, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting,
tar behaves as if all internationalization
variables are set to "C". See environ (5).
International Code Set Support
Single- and multibyte character code sets are supported.
DIAGNOSTICS
tar issues self-explanatory messages about bad key characters, tape read/write errors, and if not enough
memory is available to hold the link tables.
EXAMPLES
Create a new archive on
/dev/rfd.0 and copy file1 and file2 onto it, using the default blocking
factor of 20. The key is made up of one function letter (c) and two function modifiers (
v and f):
tar cvf /dev/rfd.0 file1 file2
Archive files from /usr/include and /etc:
tar cv -C /usr/include . -C /etc .
Use tar in a pipeline to copy the entire file system hierarchy under fromdir to todir:
cd fromdir ;tarcf-.|(cdtodir ; tar xf - )
Archive all files and directories in directory my_project in the current directory to a file called
my_project.TAR, also in the current directory:
tar -cvf my_project.TAR my_project
WARNINGS
Because of industry standards and interoperability goals, tar does not support the archival of files of size
8GB or larger or files that have user/group IDs 2MB or greater. Files with user/group IDs of 2MB or
greater are archived and restored under the user/group ID of the current process, unless the
uname/gname exists, (see tar(4)).
The default format has changed from
O to N, beginning with HP-UX Release 8.0.
Due to internal limitations in the header structure, not all file names of fewer than 256 characters fit
when using the
N function modifier. If a file name does not fit, tar prints a message and does not
archive the file.
Section 1866 Hewlett-Packard Company 3 HP-UX 11i Version 2: August 2003