Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:tar [2011/05/11 02:28] – [.rar] Guywiki:tar [2011/08/07 00:23] (current) – [tinycore.gz, and microcore.gz] Guy
Line 1: Line 1:
-====== Extract tgz, tar.gz, tbz, tar.bz2, and tar.xz files ======+====== Extract tar.gz, tar.bz2, zip, and other Compressed Files ====== 
 + 
 +If the file is owned by root, you may need to use sudo. 
 + 
 +==== tgz, tar.gz, tbz, tar.bz2, and tar.xz ====
  
 To extract a tgz, tar.gz, tbz, tar.bz2, or tar.xz file, open the terminal and type To extract a tgz, tar.gz, tbz, tar.bz2, or tar.xz file, open the terminal and type
Line 6: Line 10:
 tar -xvf filename</code> tar -xvf filename</code>
  
-If the file is owned by root, you may need to use sudo. 
  
-==== Other File Types ====+==== .bz2 ====
  
-==== .zip ==== +<code>bunzip2 filename.bz2</code>
- +
-<code>unzip filename.zip</code>+
  
 ==== .gz ==== ==== .gz ====
Line 18: Line 19:
 <code>gunzip filename.gz</code> <code>gunzip filename.gz</code>
  
-==== .bz2 ==== +Note: Files such as tinycore.gz and microcore.gz are different. See below.
- +
-<code>bunzip2 filename.bz2</code>+
  
 ==== .rar ==== ==== .rar ====
  
 <code>unrar x filename.rar</code> <code>unrar x filename.rar</code>
 +
 +==== .xz ====
 +
 +<code>unlzma filename.xz</code>
  
 ==== .Z ==== ==== .Z ====
Line 30: Line 33:
 <code>uncompress filename.Z</code> <code>uncompress filename.Z</code>
  
-==== .xz ====+==== .zip ====
  
-<code>unlzma filename.xz</code>+<code>unzip filename.zip</code>
  
 ==== .7z ==== ==== .7z ====
Line 45: Line 48:
     .tlz is equivalent to .tar.lz     .tlz is equivalent to .tar.lz
     .txz is equivalent to .tar.xz     .txz is equivalent to .tar.xz
 +
 +==== tinycore.gz and microcore.gz ====
 +
 +To extract files such as tinycore.gz and microcore.gz, use
 +
 +<code>cd directory
 +zcat tinycore.gz | sudo cpio -i -H newc -d</code>
 +
 +For more information, see [[Remastering]].
 +
 +==== .deb ====
 +
 +To extract a .deb file, use
 +
 +<code>cd directory
 +ar vx filename.deb
 +tar -xzvf data.tar.gz</code>
 +
 +Another option is to use
 +
 +<code>cd directory
 +ar p filename.deb data.tar.gz | tar xz</code>
 +
 +==== .rpm ====
 +
 +To extract an .rpm file, use
 +
 +<code>cd directory
 +rpm2cpio filename.rpm | cpio -vid</code>
 +
Print/export
QR Code
QR Code wiki:tar (generated for current page)