01.09Using tar and gzip to Compress Files and Directories
Create and Compress and Archive
Archive a group of files:
tar -czvf archive.tar.gz file1 file2 file3
Archive an entire directory:
tar -czvf archive.tar.gz directory/
Extract a Compressed Archive
List the Contents of a Compressed Archive
Common tar Switches
-c create a new archive
-x extract files from an archive
-t list the contents of an archive
-z filter the archive through gzip
-v verbosely list files processed
-f filename of the archive (filename must always immediately follow)
Filed under: System Administration, linux, tar
Leave a Reply