Mostly Linux & Python syntax notes and hyperlinks.

Tuesday, February 23, 2010

tar -z vs tar -j

tar -j uses bzip2
tar -z uses gzip

bzip2 compresses more but slower.

http://jeremy.zawodny.com/blog/archives/000953.html
http://en.wikipedia.org/wiki/Bzip2
tar -cvjf  new.tar dir_or_files
tar -xvjf new.tar
 Or should there be a "j" in the ".tar" so people know they need 'j' to extract?  Like: 
tar -cvzf new.tar.Z dir_or_files
tar -xzvf new.tar.Z

1 comment:

  1. There is a convention for the -z flag at least..a tar of directory "foo" would be called:

    foo.tar.gz

    sometimes people do

    foo.tgz

    I prefer the former.

    ReplyDelete