maybe you need know some options about tar:
-?, --help give this help list
-c, --create create a new archive
-x, --extract, --get extract files from an archive
-t, --list list the contents of an archive
-f, --file=ARCHIVE use archive file or device ARCHIVE
-z, --gzip, --gunzip, --ungzip filter the archive through gzip
-v, --verbose verbosely list files processed
Simple to use:
- create a archive.tar.gz:
tar -czvf archive.tar.gz sourceFile
tar -czvf archive.tar.gz sourceFile1 sourceFile2 ... sourceFileN
example:
tar -czvf archive.tar foo bar # Create archive.tar from files foo and bar.
- verbose a archive.tar.gz:
tar -tzvf archive.tar.gz
- extract a archive.tar.gz
tar -xzvf archive.tar.gz