Tar

From MEPIS Documentation Wiki

Jump to: navigation, search

Tar is a good utility to know if you're going to be downloading and compiling software, because most source is distributed as a compressed tar file.

Basic usage:

Create a gzip compressed tar file

tar -czf newFileName.tar.gz file1 file2 folder1 etc

Create a bzip2 compressed tar file

tar -cjf newFileName.tar.bz2 file1 file2 folder1 etc

The tar.gz and tar.bz2 extensions are merely conventions, they aren't absolutely necessary. bzip2 provides better compression ratio than gzip, however gzip is faster.

Extract a compressed tar.gz or bzip2 file

tar -xvf filename.tar.gz

or

tar -xvf filename.tar.bz2

--See also Untar and Copy filesystems / disk trees

Personal tools
In other languages