On the Menu:
   Wiki:
>> View All | Start New    

Make .tar and .zip file with terminal command
Make .tar And .zip Files

Make .tar and .zip file with terminal command

Creating a tar file:

tar -cvvf file.tar myfile.txt

In the above example the system would create a tar named file.tar in the directory you currently are in.

Wildcards could also be used in this command, for example: tar -cvvf file.tar *.txt would compress all txt files in the current directory.

tar -cvvf home.tar home/

In the above example command the system would create a tar file named home.tar in the directory you currently are in of the home directory.

Extracting the files from a tar file:

tar -xvvf myfile.tar

In the above example command the system would uncompress (untar) the myfile.tar file in the current directory.

tar -xvvzf myfile.tar.gz

In the above example command the system would uncompress (untar) the myfile.tar.gz file in the current directory.

Note: There is no "untar" linux / unix command.

Creating a tarred file that is compressed with bzip:

tar -cjvf test.tbz home/

From:http://www.computerhope.com/unix/utar.htm#03


home | LRC | colby college | contact | code & design by: szymon mikulski & clara koh | loaded in 0.02 seconds | last modified: Sep 27th, 2006 at 13:46.