Compute Questions
Software Questions
Data Questions
How Do I Unzip, Unrar, Untar, etc.?
Large collections of files will often be compressed in order to make them more friendly for transfer or long-term storage. Below are examples on how to uncompress a few common compression file types on the Yens.
.zip
Perhaps one of the more common compression types, you can simply use unzip
:
unzip bigfile.zip
Additional options for this command can be found here.
.tar
Another common compression format, especially from Linux-based systems, you can use the tar
command:
tar -xvf bigfile.tar
Additional options for this command and an explanation of the flags can be found here.
.gz
This compression format is created by a GNU zip compression algorithm. You can use gunzip
:
gunzip bigfile.csv.gz
Additional options for this command can be found here.
.tar.gz and .tgz
Much larger files can often be found to be compressed in this format. You can use tar
again:
tar -xvzf bigfile.tar.gz
The extra -z
flag here tells the command to also decompress the .gz
compression on the file.
.rar
For RAR files, you can just use unrar
:
unrar e bigfile.rar
Additional explanation for this can be found here.
.7z
A less common compression format, you can use 7z
for this:
7z e bigfile.7z
Additional options for this command can be found here.
Connect with us