DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS


     tar [-]{crtux}[befhmopvwzHLPXZ014578] [archive] [blocksize] [-C directory
         ] [-s replstr ] file1 [file2...]


DESCRIPTION

     The tar command creates, adds files to, or extracts files from an archive
     file in tar format.  A tar archive is often stored on a magnetic tape,
     but can be a floppy or a regular disk file.

     One of the following flags must be present:

     -c            Create new archive, or overwrite an existing archive,
                   adding the specified files to it.

     -r            Append the named new files to existing archive.  Note that
                   this will only work on media on which an end-of-file mark
                   can be overwritten.

     -t            List contents of archive.  If any files are named on the
                   command line, only those files will be listed.

     -u            Alias for -r

     -x            Extract files from archive.  If any files are named on the
                   command line, only those files will be extracted from the
                   archive.  If more than one copy of a file exists in the
                   archive, later copies will overwrite earlier copies during
                   extration.

     In addition to the flags mentioned above, any of the following flags may
     be used:

     -b blocksize  Set block size to use for archive.  Any multiple of 512 be-
                   tween 10240 and 32256 may be used.

     -e            Stop after first error.

     -f archive    Filename where the archive is stored.  Defaults to
                   /dev/rmt8

     -h            Follow symbolic links as if they were normal files or di-
                   rectories.

     -m            Do not preserve modification time.

     -o            Do not create directories.

     -p            Preserve user id, group id, file mode, access and modifica-
                   tion times.

     -s replstr    Modify the file or archive member names specified by the
                   pattern or file operands according to the substitution ex-
                   pression replstr, using the syntax of the ed(1) utility
                   tution. The first unsuccessful substitution stops the oper-
                   ation of the g option.  The optional trailing p will cause
                   the final result of a successful substitution to be written
                   to standard error in the following format:
                         <original pathname> >> <new pathname>
                   File or archive member names that substitute to the empty
                   string are not selected and will be skipped.

     -v            Verbose operation mode.

     -w            Interactively rename files.

     -z            Compress archive using gzip.

     -C directory  This is a positional argument which sets the working direc-
                   tory for the following files.  When extracting, files will
                   be extracted into the specified directory; when creating,
                   the specified files will be matched from the directory.

     -H            Follow symlinks given on command line only.

     -L            Follow all symlinks.

     -P            Do not follow any symlinks.

     -X            Do not cross mount points in the file system.

     -Z            Compress archive using compress.

     The options [-014578] can be use to select one of the compiled-in backup
     devices, /dev/rmtN.


FILES

     /dev/rmt8  The default archive name


SEE ALSO

     pax(1),  cpio(1)


AUTHOR

     Keith Muller at the University of California, San Diego


ERRORS

     tar will exit with one of the following values:

     0   All files were processed successfully.

     1   An error occured.

     Whenever tar cannot create a file or a link when extracting an archive or
     cannot find a file while writing an archive, or cannot preserve the user
     ID, group ID, file mode or access and modification times when the -p op-
     tions is specified, a diagnostic message is written to standard error and

BSD Experimental                 June 11, 1996                               3

Copyright © 2000-2010 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.