->Title Page
->Intro
->Unix
-->Overview
-->File Structure
-->Online Manual
-->Basic Commands
-->Additional Commands
--->alias
--->ap
--->biff
--->chmod
--->compress/uncompress
--->df
--->diff
--->du
--->echo
--->find
--->finger
--->ftp
--->grep
--->history
--->kill
--->look
--->mail
--->ps
--->script
--->setenv
--->source
--->spell
->tar
--->telnet
--->umask
--->who
--->Miscellaneous
-->Login files
-->Special characters
-->Miscellaneous Tips
-->Things to try
->Vi editor
->Mirror sites
->Further reading

[ Up ]
[Prev][Home][Next]
[Author]

Unix ---> tar

The tar (tape archiver) program is useful for storing a bunch of files in one file (traditionally on a magnetic tape, but it doesn't have to be). The syntax for this command is


    tar [key] [name ...]
where key is specified by a plethora of options (see abridged list below and unabridged list in the man pages) and name is either the file name or device name.

Here are some of the more commonly used keys:


    c    Creates a new tape.
    f    Used for taring to a tape.
    t    Lists the contents of a tar file.
    v    Turns verbose on.
    x    Extracts selected files.  If no file
         argument is given, the entire contents
         of the tar file is extracted.
Here is the syntax I use to create and read tar files:


    tar cvf filename.tar directoryname  <-- creates
    tar xvf filename.tar directoryname  <-- reads
If you wish to create or read a tar file off of a magnetic tape, replace filename.tar with /dev/drivename.

Site Statistics

t a y l o r@l i n u x b o x.c o m

© 1993-1998 Christopher C. Taylor