Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNIX OT: exclude files in tar

Re: UNIX OT: exclude files in tar

From: Tanel Poder <tanel.poder.003_at_mail.ee>
Date: Tue, 25 Nov 2003 10:24:26 -0800
Message-ID: <F001.005D7C97.20031125102426@fatcity.com>


This approach might cause problems, if you have really lots of files -> your shell argument buffer (or whatever is the correct name for it) becomes full

Tanel.

> I never rely on tar to do that. Here is the trick that I use when I want
to be selective:
>
> tar zcvf /tmp/test1.tgz `perl -e 'foreach (<*.pl>) { if (/connect/)
{print "$_\n";}}'`
>
> Basically, you write a small perl script which will output only the files
> you want and hand that to tar. Works each and every time. That is
precisely
> why Unix is such a great OS and Slowaris definitely is Unix, unless SCO
> has revoked the license.
>
> On 11/25/2003 12:24:26 AM, Ross Collado wrote:
> > Hello,
> >
> > On Solaris 8
> >
> > I can't seem to get the tar command right. I wanted to tar a directory
but
> > EXCLUDE one of the subdirectory in it.
> > Example:
> > /home/user01
> > /home/user01/mark01
> > /home/user01/mark01/ask.txt
> > /home/user01/mark01/ghost.txt
> > /home/user01/mark02
> > /home/user01/mark02/ask.txt
> > /home/user01/mark02/ghost.txt
> > /home/user01/mark03
> > /home/user01/mark03/ask.txt
> > /home/user01/mark03/ghost.txt
> >
> > I wanted to tar everything except /home/user01/mark03/*
> > man pages on tar says there is an option to exclude files but I just
can't
> > get it to work for me.
> >
> > Can someone show me how to do this right?
> >
> > Thanks,
> > Ross
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: Ross Collado
> > INET: Ross.Collado_at_techpac.com
> >
> > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > San Diego, California -- Mailing list and web hosting services
> > ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> >
>
> Mladen Gogala
> Oracle DBA
>
>
>
> Note:
> This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks.
> Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Mladen Gogala
> INET: mladen_at_wangtrading.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tanel Poder
  INET: tanel.poder.003_at_mail.ee

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Nov 25 2003 - 12:24:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US