flybywire flybywire - 5 months ago 11
Linux Question

opening a .tar.gz file with a single command

when I download a .tar.gz file, I open it with two commands, first

gunzip
and then
tar
.

Is it possible to open it with just one command?

Answer
tar xzf file.tar.gz

The letters are:

  • x - extract
  • z - gunzip the input
  • f - Read from a file, not stdin