How to use tar archives

To create a compressed tar archive (from /home):

tar zcvf myarchive.tar.gz /home

To list the contents of a compressed tar archive:

tar --list -zf myarchive.tar.gz

To extract an archive:

tar zxvf myarchive.tar.gz

To extract a particular file from a compressed tar archive:

tar zxvf myarchive.tar.gz "somefilename.pdf"

Discussion

Enter your comment (wiki syntax is allowed):

Subscribe to the RSS feed for Andy's Debian HOWTOs

Article from Andy's Debian HOWTOs (http://www.besy.co.uk/debian/debian)

 
debian/how_to_use_tar_to_create_and_extract_archives.txt · Last modified: 2008/08/01 22:56 (external edit) · [Old revisions]
Recent changes RSS feed Powered by Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki