vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| From: "RR" <tlane1@columbus.rr.com> Subject: Date: Tuesday, November 22, 2005 10:06 PM 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 |