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: Robertson Lee - lerobe <lerobe_at_acxiom.co.uk>
Date: Tue, 25 Nov 2003 08:54:26 -0800
Message-ID: <F001.005D7C7E.20031125085426@fatcity.com>


You can use the -L option and have a file listing everything you want

ie, ls > file
edit file and remove the dir you don't want

tar files with the -L option and the file you created above.

never done this myself

-----Original Message-----
Stephen.Lee_at_DTAG.Com
Sent: 25 November 2003 16:44
To: Multiple recipients of list ORACLE-L

Maybe can use -prune option of find to send file list to tar:

cd /home
find ./user01 -name mark03 -prune -o -print

> -----Original Message-----
> >
> > 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?
> >

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: <Stephen.Lee_at_DTAG.Com
  INET: Stephen.Lee_at_DTAG.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).




**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Robertson Lee - lerobe
  INET: lerobe_at_acxiom.co.uk

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 - 10:54:26 CST

Original text of this message

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