how to unzip and extract tar file in single command

In order to save diskspace and avoid of disk full during
unzip then extract the tar file

is there any tar unzip command would unzip and extract tar at the same time
(test123.tar.gz)

thank in advance

Hi,

I believe this will be done by using the following command.

tar -zxvf test123.tar.gz

z -- unzip
x -- extract the file
v -- verbose
f -- forcefully done

Thanks and Regards,
Aketi

I believe that -f means file.
For example:

tar -f <file>

means run the tar command on file

which os do you use? linux uses gnutar which has other options then tar on solaris...

try following command

  cat test123.tar.gz | gunzip -d | tar -xvf -

if u on linux there option available to untar the zipped file

You may be able to shorten that to:

gzcat test123.tar.gz | tar -xvf -

:slight_smile:

In linux, you can user

tar -zxf <filename>.gz