Skip to content

Instantly share code, notes, and snippets.

@rkennesson
Forked from seanbuscay/tar_commands.sh
Last active May 19, 2017 17:36
Show Gist options
  • Select an option

  • Save rkennesson/94a5e301ca4bbf496cc6ccebd4fd10e3 to your computer and use it in GitHub Desktop.

Select an option

Save rkennesson/94a5e301ca4bbf496cc6ccebd4fd10e3 to your computer and use it in GitHub Desktop.
Tar commands
; Create a Tar of All in Directory
tar cvf backup.tar . 
; Untar
 tar xvf filename.tar
; Exclude files
tar --exclude='file1' --exclude='patter*' --exclude='file2'
; Exclude VCS files
tar cvf backup.tar . --exclude-vcs
tar c(reate)v(erbose)f(ile) file.tar files
z(gzip)c(reate)v(erbose)f(ile) file.tar.gz files
z(gzip)x(tract)v(erbose)f(ile) file.tar.gz
j(bzip)
J(xz)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment