Tar usage

From raju

compression algos

  • compression ratio

Defined as Uncompressed size / compressed size.

xz > bzip2 > gzip

xz gives the smallest files.

Rule of thumb: files compressed with xz are 20% smaller compared to files compressed with gzip.

  • time to compress
xz > bzip2 > gzip

xz is slowest, gzip is fastest.

Ref:-

Remove all files previously extracted from a tar(.gz) file

    tar -tf <file.tar.gz> | xargs rm -r
    

tags| uninstall files untarred from a tar file

Ref:- https://www.commandlinefu.com/commands/view/2573/remove-all-files-previously-extracted-from-a-tar.gz-file