Create Compressed TAR Files for BACKUP
- Create TAR.GZ in the parent folder containing all contents of the current & child folder:
tar -czvf ../filename.tar.gz . - Create TAR.GZ in the parent folder containing just just JPG images contained in the current & child folder:
tar -czvf ../filename.tar.gz *.jpg
- Extract TAR.GZ file contents into current folder:
tar -xzvf filename.tar.gz
Create a TAR.GZ file, but Exclude two folders:
tar -czvf ../filename.tar.gz . --exclude 'FolderA' --exclude 'FolderB'