Skip to content

Instantly share code, notes, and snippets.

@ekka21
Created August 25, 2012 13:17
Show Gist options
  • Save ekka21/3465530 to your computer and use it in GitHub Desktop.
Save ekka21/3465530 to your computer and use it in GitHub Desktop.
Linux: tar
#Creating an archive using tar command
*c – create a new archive
*v – verbosely list files which are processed.
*f – following is the archive file name
*z – filter the archive through gzip
Note: .tgz is same as .tar.gz
//compress
tar cvf archive_name.tar dirname/
tar cvzf archive_name.tar.gz dirname/
# Extracting (untar) an archive using tar command
//Extracting
tar xvf archive_file.tar /path/to/file
tar xvfz archive_name.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment