I am not able to uncompress a file with .tar.gz extension
Did
sudo tar -xvzf ~/Downloads/file.tar.gz /opt/
but no success.
it says:
tar: /opt: Not found in archive
tar: Exiting with failure status due to previous errors
I am not able to uncompress a file with .tar.gz extension
Did
sudo tar -xvzf ~/Downloads/file.tar.gz /opt/
but no success.
it says:
tar: /opt: Not found in archive
tar: Exiting with failure status due to previous errors
You can specify in which directory you want the files extracted using the
-C
option. Change your command to:Your are telling
tar
to look for/opt/
inside the tar file and to extract only that and since it is not in that tar file it throws an error. Do:use
--directory
before the directory path at which you would like to extract: