HP-UX Reference (11i v3 07/02) - 1 User Commands N-Z (vol 2)

t
tar(1) tar(1)
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/rtape/tape4QIC150
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/rtape/tape4QIC150 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 le 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, files that have user/group ID values of 2097152 (2ˆ21) or greater, or files belonging to a
user/group name of 32 characters or greater.
Files with user/group ID values of 2097152 (2ˆ21) or greater are archived and restored using the original
user/group name of the file. If the user/group name is not found when restoring the file, then the
user/group ID of the current process is used. If the user/group name was truncated to fit in the
tar
header, a false match may be made when restoring with this truncated value if the truncated value is the
same as another user/group name on that system. For more information see tar(4).
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
HP-UX 11i Version 3: February 2007 3 Hewlett-Packard Company 311