Tar

From ElectroDragon Wiki
Revision as of 19:31, 2 October 2019 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ZIP

  • tar -cvf files.tar.gz file
  • -c create, -v verbos, -f file name
  • tar to pack, gz gzip, pack folder file

Unzip

  • tar -xzvf file.tar.gz
  • tar -xjvf file.tar.bz2
  • -x unzip, -z gz attributes, -j gz2 attributes, -v verbose, -f file

ZIP

Category Command Description example example description
File/Folder tar zip or unzip
  • tar –cvf jpg.tar *.jpg // pack all *.jpg to zip file jpg.tar
  • tar –cvzf jpg.tar.gz *.jpg // pack all *.jpg to zip file jpg.tar.gz
  • tar –cvjf jpg.tar.bz2 *.jpg // pack all *.jpg to zip file jpg.tar.bz2
  • -c: create zip file
  • -x:unzip zip file
  • -z:make gzip type gz file
  • -j:make bz2 type bz2 file
  • -v:verbose display process
  • -f: last option and followed by file name