1753532 Members
6107 Online
108795 Solutions
New Discussion юеВ

exclude using tar

 
Scott McKevitt
New Member

exclude using tar

I am looking to tar up a file system but exclude all the mount points underneath. I have tried doing this using find and xargs but not all the directories are ending up in my tar ball. i.e.

find /oracle/DEX -xdev ! -type M -print | xargs tar -crvf /oracle/DEX/sapdata73/oracleDEX.tar
2 REPLIES 2
OldSchool
Honored Contributor

Re: exclude using tar

It's hard to tell from your description, bu I'll bet you find the "missing" directories if you do:

find /oracle/DEX -type M

I think what you really want is:

find /oracle/DEX -xdev -print .....

the xdev should list the directory that is the mountpoint, but not follow it, the -M won't do either (list or follow).

Run the find w/o the tar and examine the results

Scott McKevitt
New Member

Re: exclude using tar

The solution I was looking for was to use the pax command which would allow me to exclude mount points