[Skip to the main content] Welcome to Daigo’s Daily Digital Diorama. I blog about Baseball, Judo, Jazz, Linux, Design and on being a dad.

  • Get Firefox!

How to use “tar”

I always forget, so here it is:
HOW TO BACK UP a directory named mystuff

tar czvf mystuff.tar.gz mystuff/

And after you upload to the server and from commandline:

tar xvfz mystuff.tar.gz

If you want just certain directory (for instance, public_html) form mystuff.tar.gz tar ball:

tar xvzf something.tar.gz */public_html/*

Leave a Reply