Tar Tutorial

UnTar

To untar an archive use:

tar xvzf foo.tgz

Tar

To create an archive use:

tar cvzf foo.tgz dir

Edit: If you are unzipping into a webroot and don’t want the first directory or containing directory add –strip 1 to the end.
tar xvzf foo.tgz --strip 1

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>