Creating an Archive File
tar -czf scripts.tgz scripts/ scripts-test/
List the Contents
tar -tzf scripts.tgzfind a file in archive:
tar -tzf scripts.tgz | grep file.txt
Extracting an Archive FileNow that you know how to create an archive file, it’s rather easy to extract it.
tar -xzf scripts.tgzYou might need extract just one file:
tar -xzf scripts.tgz scripts/readme.txt