You can use zip for a file, or zip -r for a directory..
ex : zip -r file.zip directory
compress and gzip is to compress a file.
ex: gzip filename
the result will be filename.gz (the filename will be gone)
gunzip -c filename.gz or zcat filename.gz
To cat the filename inside filename.gz wihtout uncompress it.
gunzip filename.gz will uncompress back to the filename.
Tar is to make archive, for example archive a folder to a file name .tar.
So that you can compress that .tar afterward.
to archive: tar -cf something.tar filename
to view inside the archived : tar -vtf something.tar
to unarchive : tar -xf something.tar
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment