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/*

Related posts:

  1. Thunderbird
  2. Streamsicle 2.0 (beta)
  3. Very simple php snippet
  4. PHP memo to myself
This entry was posted in Linux, Mac, and LAMP Open Source. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. 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>

  • Welcome to Daigo’s Daily Digital Diorama. I blog about... whatever that comes to my mind.
  • Change color

    Purple Red Green Blue No Style

  • Archives

  • Calendar

    October 2004
    M T W T F S S
    « Sep   Nov »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
  • Categories