Unix Technical Forum

gnu tar delete w/exclude

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-09-2008, 07:58 AM
RR
 
Posts: n/a
Default gnu tar delete w/exclude

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




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com