Announcement

Collapse
No announcement yet.

Tar Command: How to Tar/Un Tar [Zip/Unzip] a Folder From Linux Command?

Collapse

Ads on showthread pages

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tar Command: How to Tar/Un Tar [Zip/Unzip] a Folder From Linux Command?

    WordPress Hosting on SSD Servers
    Hello All,

    In order to zip/unzip folder from command prompt one needs to execute tar command. Below mentioned is syntax and example for the same:

    Syntax:
    To Tar:
    tar -cvzf tarfilename foldername

    Untar:
    tar -xvzf tarfilename

    Example:
    tar -cvzf abc.tar.gz abc
    - This will zip [tar] the abc folder with the name abc.tar.gz

    tar -xvzf filename.tar.gz
    - This will unzip [untar] the file as abc folder.

    That's it!

    Thanks,

    Shane G.
    AccuWebHosting.Com
    Last edited by admin; 4 weeks ago.
Working...
X
Sign up for a News Letter Click here to sign up