## SMALL compressed file (best)
tar -zcvf files.tar.gz files
## BIG compressed file
tar -cf archive.tar files
tar -zcvf output_file_name directory_to_compress
#Let me explain the options used in the above command to you:
# z – tells tar that it is dealing with gzip file
# c – tells tar to create the archive file
# v – verbose mode showing what files are being processed
# f – output is a file
###########################################################
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.
tar -tvf archive.tar # List all files in archive.tar verbosely.
tar -xf archive.tar # Extract all files from archive.tar.