[UCLA-LUG] Bash Script / find -ctime help, please

Charles Harvey soops@threemoonsnetwork.net
Mon, 10 Jul 2000 21:06:00 -0700


Howdy,

I am working on a script to manage an image library.  In effect, I want to
delete images that are more that 60 days old.  Here is what I have so far:

find -maxdepth 1 -type f \( -ctime +60 -o \! \( -name \*.jpg -o \) \) -exec
rm -f \{\} \;

A couple of questions:
1.  This appears to only delete files exactly 60 days old.  How do I set it
up to do all older than  60?
2.  This was written for me, and I do not fully understand the syntax.  What
is the -o switch (not in the man, sorry)?
3.  What do the "!"s and "\"s do to the syntax?

Please help, thanks!

Charles Harvey
Three Moons Network
http://threemoonsnetwork.net
419-818-5260