Hey folks,

   OK, I think I've got the dunce hat on today, and I'm about to
go crazy with this one.

   I have a script on an OpenBSD 3.7-STABLE machine that does
a find in a directory, and uses rm to remove files older than
two days (where RETAIN = "+2") :

find /path/to/dir -type f -name \*.gz -mtime ${RETAIN} -exec rm {} \;

   This directory has a subdir (a .ssh), and no matter what I
do, I cannot get find to NOT recurse into this subdirectory.  I've
tried using -path, ! -path, -maxdepth 0|1, and none of them seem
to do what I want.  I only want find to examine the /path/to/dir
directory, and not any subdirs.

   I've been through the man page so many times, I can just about
recite it.  Am I just missing something, or is this not possible?
I'm guessing it's the former and I've just stared at it too long to
see the obvious.

Any help greatly appreciated.

Benny


-- 
"I'd rather staple a skunk to my forehead and go to a trade show
for banjo makers."                            -- PHB's secretary,
                                                 Dilbert, 07-2002

Reply via email to