From LQWiki
(Redirected from Compressing files)
ComPressing Files
- 7za- archives and compress files using p7zip (POSIX port of 7-Zip), an open-source program with very high compression rates
- bzip2- Compress the specified filename (better compression than gzip, but not as good as 7-zip)
- compress- Compresses the specified filename using the LZW compression algorithm.
- gzexe- Compresses the specified executable command. The specified file automatically decompresses and executes when you run it.
- gzip- Compresses the specified file using the LZ77 compression algorithm.
- rar- Commercial compression suite with very high compression rates
- zip - (Info-ZIP) - a PKZip-compatible compression suite
- zforce- Adds the .gz extension to all the files in the working deirectory or to the specified filename that was compressed using gzip. This utility prevents gzip from compressing files twice.
- znew - Recompress the specified filename, which must be a compressed file created with the compress utility, using the gzip format.
Note: While tar does no compressing, it is frequently used in conjunction with compression programs and even incorporates them into its options. For example, tar xzf file extracts gzip-compressed tarballs and tar xjf file (not on older versions of tar) extracts bzip2-compressed tarballs.
Extracting Files
This page is a list of various command line tools for uncompressing files in Linux, and provides example invocations.
- bunzip2 (.bz2)- Decompresses the specified filename
bunzip2 filename.bz2
- cabextract (.cab)- Extracts files from Microsoft cabinet archives
cabextract filename.cab
- uncompress- Decompresses the compress compressed file.
uncompress filename
- gunzip (.gz)- This utility can decompress files created with the following utilities: compress, gzip and zip
gunzip filename.gz
- lha (.lha) - LZH un-archiver
lha x filename.lha
- tar (.tar) - This command is what is typically used to compress and decompress files in linux. It is typically called in one of the following forms:
tar xvf filename.tar
tar xvzf filename.tar.gz
tar xvjf filename.tar.bz2
- unace (.ace)- Decompresses ace files
unace x filename.ace
- unarj (.arj)- Decompresses or lists the content of the specified ARJ archive.
unarj e filename.arj
- unrar (.rar)- Decompresses rar files
unrar x filename.rar
- unzip (.zip)- Decompresses and extracts files created by the Linux zip utility, PKZIP(MS-DOS) or WinZip(Microsoft Windows).
unzip filename.zip
- zoo (.zoo) - ZOO un-archiver
zoo -extract ``filename.zoo
- cpio (.cpio) - copy files to and from archives
cpio -idmv < filename.cpio

This page is available under a