Link to home
Start Free TrialLog in
Avatar of tmonteit
tmonteitFlag for Afghanistan

asked on

Unix / Linux Command question

I'm building a tar file on a directory that contains subversion (".svn") subdirectories.

The problem is I want to tar us everything UNLESS!! it lives in a .svn sub directory.

The command I'm currently using is:
  tar -cvf mytar.tar myRootDir

How do I filter out any subversion directories?
Avatar of ozo
ozo
Flag of United States of America image

find myrootdir -name '*.svn*; -prune -or \! -type d -print | xags   tar -rvf -X mytar.tar
ASKER CERTIFIED SOLUTION
Avatar of slyong
slyong

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tmonteit

ASKER

sylong had the right answer but duncan had the better explanation :  points split.