Monday, May 21, 2012

Some tar tips.


Some small useful tips I keep forgetting from time to time. Just blogging them
so I can find them easily.

Clean up messy tar files

Some people like to create tar files without a parent folder. These, when
extracted, fill the current directory with lots of files and folders messing up
your neatly ordered file structure.

Fortunately with a any of the following two commands you can quickly find and
delete all the offending files and folders:

Decompress any type of tar

To extract files from compressed tar files we needed different commands depending on the compression format (-j for bzip, -z for gzip...). With newer tar versions there is a -a switch that decompresses all formats:


No comments:

Post a Comment