How do I zip a tar file in Linux?

Ánh Dương

New member
How do I zip a tar file in Linux?
Answer
To compress a directory with zip do the following:
  1. # zip -r archive_name.zip directory_to_compress.
  2. # unzip archive_name.zip.
  3. # tar -cvf archive_name.tar directory_to_compress.
  4. # tar -xvf archive_name.tar.gz.
  5. # tar -xvf archive_name.tar -C /tmp/extract_here/
  6. # tar -zcvf archive_name.tar.gz directory_to_compress.
Photo in the article by “Wikipedia”
Code:
https://en.wikipedia.org/wiki/Oakbrook_Terrace,_Illinois
 

Tìm kiếm

Back
Top