Jump to content

tar entire directory

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Prog

Prog

    Learning Programmer

  • Members
  • PipPipPip
  • 98 posts
How do I tar an entire directory?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Here is the command:

tar -cvf mytarfile.tar mydir/

#3
Prog

Prog

    Learning Programmer

  • Members
  • PipPipPip
  • 98 posts
Ok, I've got that - now how do I add gzip compression to the tar so I don't have to manually do a gzip command?

#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Just add a z to the list:

tar -zcvf mytarfile.tar.gz mydir/

and to untar:
tar -zxvf mytarfile.tar.gz