remove directory info from tar file
Hi.
I have some tar files that are 3gb or larger. A listing of their contents shows that they have files that do not need to be backedup. I created a folder named "untarhere" to extract the file contents into. My question/problem is: How do I create a tar archive without it saving the "untarhere" folder name. Directory layout: Code:
# cd /untarhere Code:
# tar vcf ./2007_Jul_12.tar.gz /untarhere/2007_Jul_12 Code:
# tar tf ./2007_Jul_12.tar.gz Code:
/untarhere/2007_Jul_12/ Code:
/2007_Jul_12/ |
Try using -C to change to untarhere first and then just specify the sub-directory of untarhere to back up:
Code:
tar -vcf ./2007_Jul_12.tar.gz -C /untarhere 2007_Jul_12 |
Thanks
Does what I need it to.
|
All times are GMT -5. The time now is 11:51 AM. |