Linux extract commands
.gz:
gunzip filename.gzcoommand will delete original file after extraction
.bz2:
bzip2 -d filename.bz2coommand will delete original file after extraction
bzip2 -dk filename.bz2this command also extracts but keep original
.tar.gz
tar -xvzf filename.tar.gz
- x: tar can collect files or extract them. x does the latter.
- v: makes tar talk a lot. Verbose output shows you all the files being extracted.
- z: tells tar to decompress the archive using gzip
- f: this must be the last flag of the command, and the tar file must be immediately after. It tells tar the name and path of the compressed file.
Check out dtrx command. Intelligent extraction
ReplyDeleteseems to be a great solution, didn't know before! Thanks!
Delete