Solaris FIND: Exclude Specific Paths

view story

http://www.unix.com – Using Sol 10 + KSH. I need to run a find command on the whole system "/" and exclude a bunch of explicit directories and files that may or may not be on each system. I cannot use the -name because i dont want to exclude all dirs named just specific paths. -path/-wholename is not an option on the Solaris FIND utility What i have is working, but I just wanted to throw this out there and have someone else look at it to make sure I am not overlooking something and/or solicit better alternatives. Code: EXCLUDE=`$(ls -bdi /path/to/dir1 /path/to/dir2 /var/dir3/dir4 | sed (HowTos)