The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



Thread: tar parameters
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 10-20-2001
TioTony's Avatar
TioTony TioTony is offline
Bit Pusher
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
It too recommend the man pages, or perhaps even a Unix book. But these are the baics:

To create the tar file:
tar cf <tar file name> <file1> <file2> <file3> etc
Example
tar cf my.tar test1.txt test2.txt test3.txt
or
tar cf my.tar test*
Wild cards can be used with tar if you didn't know.

To see what is in the tar file

tar tvf <tar file name>

To extract the tar file
tar xvf my.tar

These are the basics. You may need to use other options depending on what you want to accomplish. If you just want to tar up a directory on one system and extract it on another, you could do this:

tar cf my.tar <directory>
this command should be run from one directory above the directory you are putting in the tar. If you do an ls, you will see the directory listed.
ftp my.tar (in binary) to the other system and put it in the directory you would like it to be under when you extract it then run:
tar xf my.tar

Hope this helps a little.