Monday, July 20, 2009

How to tar a directory excluding one subdirectory

I tried many things, but at the end I got this one working:

tar pszcf /path/to/the/resulting/tar/file/mytarfile.tar.gz --exclude /path/to/the/directory/to/tar/excludeddirname /path/to/the/directory/to/tar

No comments:

Post a Comment