So I recently created a bunch of tar files that had a long path name when unzipped. This long path name was the absolute path on the computer where the tar files were created. For example
tar c /home/shivani/testfile.txt
will create a tar that when unzipped will create /home/shivani/testfile.txt in the folder where you untar the file.
In order to ensure this does not happen use the -C option, that cds into the directory /home/shivani and then creates the tar.
No comments:
Post a Comment