tar guessing compression method

Finally (not sure how long ago, but I just found out about it three days ago) the tar unix utility (gnu version) can guess what the compression method to use. Now I can forget that -j is used for bzip2, -z is used for gzip, and some other for xz.
Just use ‘tar axf’ for extraction, and ‘tar acf’ for compression. Everything else is guessed from the file extension!

Tags: , , , , ,

categories unix

  • By ambs, September 19, 2009 @ 14:41

    Thanks to Smylers, now I know that you do not even need to add the ‘-a’ flag!!

Other Links to this Post