Packing and unpacking files

From Linuxintro
Revision as of 07:24, 28 May 2013 by imported>ThorstenStaerk

Here are the most practical commands to pack and unpack files in a console:

Unpacking

unrar x filename.rar
unzip filename.zip
bunzip2 filename.bz2
tar xvf filename.tar
tar xvzf filename.tar.gz

Packing

tar cvzf targetfile.tar.gz /sourcedir
tar cvf targetfile.tar /sourcedir

When using really large files, for example when you clone a computer it pays to use a program that can use all your processor threads in parallel. pigz is a good choice for that.

See also