Tuesday, January 15, 2008

Unix file compression utilities

Unix file compression utilities: Creating a tape archive: tar -cf archive.tar myDirectories/ Listing the contents of an archive: tar -tf archive.tar Extracting all files from an archive: tar -xf archive.tar To extract just partial pieces from the archive, supply a file or directory name after the archive name. You can list as many as desiered here, separated by spaces. tar -xf archive.tar filename Compress: gzip archive.tar Decompress: gunzip archive.tar.gz Merging commands The "z" flag works with gzip, to either create a tar/gzipped archive: tar -czvf archive.tgz files/ Decompress a tar/gzipped archive: tar -xzvf archive.tgz

No comments:

Post a Comment