Linux file compression: Difference between revisions

From Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 23: Line 23:
<pre>
<pre>
tar xf file.jar
tar xf file.jar
</pre>
To decompress a 7-zip file:
<pre>
7za file.7z
</pre>
</pre>

Revision as of 21:48, 19 August 2013

Note: tar and zip -r operate similarly on directories; they wrap an entire directory into a single compressed archive file. gzip -r, on the other hand, recursively goes through the directory structure and compresses individual files, replacing them with their .gz counterparts.

Please see specific man pages for the following:

To decompress a .Z file:

uncompress file.Z

To decompress a .bz2 file:

bunzip2 file.bz2

To create a jar archive from all class files in the current directory:

jar cf new-archive.jar *.class

To decompress a jar file:

tar xf file.jar

To decompress a 7-zip file:

7za file.7z