PDA

View Full Version : [all variants] find files or folders excluding certain directories



BDNiner
May 20th, 2008, 04:13 PM
is is possible to search for directories or files but exclude certain directories? I am looking for rsync config files on my rsync server but i also have a lot of other directories that are named rsync that store the actual backups. This is using the find command.

quelx
May 20th, 2008, 04:36 PM
append -prune to the command

http://www.liamdelahunty.com/tips/linux_find_exclude_multiple_directories.php

and
man find

bumanie
May 20th, 2008, 04:45 PM
I suspect you are looking for the grep command. Look at this for help. http://www.scit.wlv.ac.uk/cgi-bin/mansec?1+grep

BDNiner
May 20th, 2008, 04:52 PM
Thank you, this really helps. I figured out what the issue is.