This is a discussion on gnu tar delete w/exclude within the comp.unix.solaris forums, part of the Solaris Operating System category; --> I have a tared ziped archive and I want to --delete all files --exclude'ing a few that I want ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a tared ziped archive and I want to --delete all files --exclude'ing a few that I want to keep within the archive. I wanted to use the --delete with gnu tar for efficiency, I know I can untar the whole thing to disk and tar back up what I want, but its taking too much time to go through all of them at night. I tried using --delete '*' --exclude 'log', but it almost looks like the --exclude does not apply to --delete command. are there a gnu tar arguments that would let me delete everyting except for a list of critical files. so for example my file (t.tgz) has these files call/log call/data/file1 call/data/file2 call/tmp/file3 I want to keep log and data/* I tried using gnu tar 1.15.1 cat t.tgz | gunzip | tar -f - --exclude='call/log' --exclude='data/*' --delete '*' | gzip > 2.tgz but it deletes everyting, ignoring my exclude |