Quote:
Originally Posted by reborg
You are explicitly including the files by using the find command, using find with the prune option to perform the directory exclusions should work for you.
I have been trying to work out the syntax to use prune but so far havent been successful.
What I am trying to accomplish is to list all files with -mtime -3 except for certain directories, (/dev, /proc, db, lost+found). I am sure that I am misunderstanding the man pages, but even the archives here and google havent cleared up what it is that I dont understand.
I have tried dozens of variations with varying degrees of output but no success.
find / -mtime -3 -wholename '/db' -prune -wholename '/dev' -prune -wholename '/proc' -prune
This one produces only two lines of output "/dev", "/proc".
find / \( -type d -regex "/dev" -prune \) -o \( -type d -regex "/proc" -prune \) -o \( -type d -regex "/media" -prune \) -type f -mtime -3
Could someone give me a clue as to how to accomplish this, I really am lost right now.