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
# ls
2007_Jul_12 2007_Jul_13 2007_Jul_14
If I run
Code:
# tar vcf ./2007_Jul_12.tar.gz /untarhere/2007_Jul_12
and then
Code:
# tar tf ./2007_Jul_12.tar.gz
I get
Code:
/untarhere/2007_Jul_12/
/untarhere/2007_Jul_12/file1
/untarhere/2007_Jul_12/file2
/untarhere/2007_Jul_12/directory1
/untarhere/2007_Jul_12/directory2
...
The output I want to see is this:
Code:
/2007_Jul_12/
/2007_Jul_12/file1
/2007_Jul_12/file2
/2007_Jul_12/directory1
/2007_Jul_12/directory2
...
I do not want "/untarhere" to be saved in the tar file. How do I tell tar to do this?