Monday, 18 February 2008

Apple OSX - how to tar files

tar is included in the default install of OSX.

You can use it to bundle up files:

$ tar -cvf archive.tar *.gz

will add all files (its clever enough not to try to tar itself!) with a .gz suffix into the file archive.tar

$ tar -cvf archive.tar *

will add all files in the current directory apart from archive.tar into the file archive.tar