In order to zip/unzip folder from command prompt one need to execute tar command. Below mentioned is syntax and example for the same:
Syntax:
To Tar:
tar –cvzf tarfilename foldername
To Tar:
tar –cvzf tarfilename foldername
Untar:
tar –xvzf tarfilename
tar –xvzf tarfilename
Example:
tar –cvzf abc.tar.gz abc
- This will zip [tar] the abc folder with the name abc.tar.gz
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.
- This will unzip [untar] the file as abc folder.
That’s it!
Thanks,
No comments:
Post a Comment