Reputation: 3407
I am doing tar of multiple files using absolute paths and sending the tar files to another server. While doing untar at target location my tar command is failing as it is not able to find the files.
Command which i used to tar and zip
tar -cf - list_of_file_names | gzip > output_file.tar.gz
and
Command to unzip and untar
gzip -dc output_file.tar.gz | tar -xf -
Is there any way possible to untar those files without getting any error ?
Upvotes: 0
Views: 258
Reputation: 2781
Why I see this, I'm usually trying to untar into a directory which I don't have write permissions for.
BTW, a more compact version of your commands:
tar czf output_file.tgz list_of_file_names
tar xzf output_file.tgz
Upvotes: 1