Package to and Unpackag a .tar File

From Computing and Software Wiki

(Difference between revisions)
Jump to: navigation, search
('''Package to and Unpackag a .tar File''')
('''Package to and Unpackag a .tar File''')
 
Line 12: Line 12:
     tar  -xvf NewFile.tar
     tar  -xvf NewFile.tar
-
 
-
You don't actually need the dash in the above examples.  It's use is only necessary if you are supplying parameters in more than one chunk, eg.:
 
-
 
-
    tar xf NewFile.tar -C ~/temp/
 

Current revision as of 04:20, 19 December 2007

Package to and Unpackag a .tar File

The Unix utility tar allowing users to coalesce many files into a single file. This is especially useful when users want to transfer or distribute their files. The archive file created by tar usually indicated by the extension of .tar.

To pack files of directories into a single file, do the following:

    tar  -cvf NewFile.tar file1  file2  file3 ....

This will package file1, file2, file3 and other files in the file list into a single file: NewFile.tar.

To extract files from a .tar file, do the following:

    tar  -xvf NewFile.tar
Personal tools