tar -xvf GSE108097_RAW.tar
Using gunzip command:
$ gunzip -k file.gz
$ ls file
Using gzip -d command:
$ gzip -d file.gz
$ ls file
If file extension is tar.gz, type the command:
Please note that gunzip can currently decompress files created by gzip, zip, compress, compress -H or pack programs.
$ tar -zxvf file.tar.gz
Please note that gunzip can currently decompress files created by gzip, zip, compress, compress -H or pack programs.
Compressing files
Decompressing files
Syntax | Description | Example(s) |
gzip -d {.gz file} gunzip {.gz file} | Decompressed a file that is created usinggzip command. File is restored to their original form using this command. | gzip -d mydata.doc.gz gunzip mydata.doc.gz |
bzip2 -d {.bz2-file} bunzip2 {.bz2-file} | Decompressed a file that is created usingbzip2 command. File is restored to their original form using this command. | bzip2 -d mydata.doc.bz2 gunzip mydata.doc.bz2 |
unzip {.zip file} | Extract compressed files in a ZIP archive. | unzip file.zip unzip data.zip resume.doc |
tar -zxvf {.tgz-file} tar -jxvf {.tbz2-file} | Untar or decompressed a file(s) that is created using tar compressing throughgzip and bzip2 filter | tar -zxvf data.tgz tar -zxvf pics.tar.gz *.jpg tar -jxvf data.tbz2 |
List the contents of an archive/compressed file
Some time you just wanted to look at files inside an archive or compressed file. Then all of the above command supports file list option.
Syntax | Description | Example(s) |
gzip -l {.gz file} | List files from a GZIP archive | gzip -l mydata.doc.gz |
unzip -l {.zip file} | List files from a ZIP archive | unzip -l mydata.zip |
tar -ztvf {.tar.gz} tar -jtvf {.tbz2} | List files from a TAR archive | tar -ztvf pics.tar.gz tar -jtvf data.tbz2 |
No comments:
Post a Comment