tar: Cowardly refusing to create an empty archive

Gotta love software that’s humble and knows its place. With all these “innovative, industry shaking, market disrupting” social networking web 2.0 iPhone apps out there that are “simple, beautiful, easy-to-use, doesn’t get in the way,” its nice to be reminded by tar that software can be humble.

If you do this, it won’t tar hidden (like .htaccess) files:

tar -cf myfile.tar *

Instead do this:

tar -cf myfile.tar /home/meatloaf/jams

Here’s how to exclude those crazy backups you did:

tar cf sitearchive.tar --exclude=*.sql --exclude=*.gz *

Had to move our 1.5GB SVN repository from one server to another yesterday. Didn’t have enough room to tar, then gzip so I piped:

tar cvf - svn_repository/ | gzip -c > svn.tar.gz