Reputation: 1379
Banging my head on this one...
I used tar -cvpzf file.tar.gz
to compress a complete directory.
I move the file to another server and i try to decompress the directory where i have copied the archive. Can't make it work.
bash-3.2$ tar -xvpzf news.tar.gz .
tar: gzip: Cannot exec: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: .: Not found in archive
tar: Error exit delayed from previous errors
Anyone ?
Upvotes: 9
Views: 19812
Reputation: 478
Install gzip, for example ubuntu-
apt-get install gzip
Then untar it -
tar -xzf file.tar.gz
Upvotes: 3
Reputation: 2566
install bzip2 and then it should be working. for example in debian/ubuntu
sudo apt-get install bzip2
or in gentoo
emerge bzip2
Upvotes: 1
Reputation: 1379
Gzip was not installed on this server (VPS). I should have check this part first instead of relying on assumption.
Lessons learn
Upvotes: 3
Reputation: 112422
Your tar can't find gzip. If you don't have gzip, you can't make a .gz file. You should look for a gzip executable on your system. What kind of system is it?
In the meantime, you could leave off the "z" and just transfer a .tar file. It will be bigger, but at least you'll be able to move your data to the other server.
Upvotes: 16
Reputation: 1117
if your directory name is "file/" you create a tar.gz using
tar -cvzpf file.tar.gz file/
then untar it using
tar -xvf file.tar.gz
Upvotes: 0