Using tar, the entire folder structure is including, I don't want that
- by Blankman
I am taring a folder and for some reason the entire directory structure that preceds the folder I am tarring is included.
I am doing this in a script like:
'tar czf ' + dir + '/asdf.tgz ' + dir + 'asdf/'
Where dir is like:
/Downloads/archive/
In the man pages, I see I can fix this but I can't get it to work.
I tried:
tar czf -C dir ...
But now I have some kind of a file -C in my folder (which I can't seem to delete btw!).
Please help!