home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!usc!wupost!darwin.sura.net!mlb.semi.harris.com!controls.ccd.harris.com!tvd
- From: tvd@ccd.harris.com (Tom Denham)
- Subject: find bug
- Message-ID: <1992Jul21.181917.749@ccd.harris.com>
- Organization: Harris Controls and Compositions
- Distribution: usa
- Date: Tue, 21 Jul 1992 18:19:17 GMT
- Lines: 29
-
- From tvd Tue Jul 21 09:25:04 1992
- Subject: find
- To: nam (Noahal A. Mundt)
- Date: Tue, 21 Jul 92 9:25:04 EDT
- X-Mailer: ELM [version 2.3 PL11]
-
- Noahal, I checked this out and I don't think it's true.
-
- >I recently realized that /etc/skulker on my machines was not clearing out
- >/tmp and /etc.tmp as it should. A bit of playing around and I discovered
- >that the problem is with find. The following command, for instance:
-
- > find /tmp -mtime +1 -type f -exec /bin/rm {} \;
-
- >This should find all the matching files and delete them-- however, find
- >seems to replace the {}'s with the cwd instead of the name of the file it
- >finds. Is this the way find is supposed to work? If so, how would I
- >go about automatically deleting files, short of redirecting output from find
- >(which I could do, but would require a bit of work). Any help
- >would be appreciated.
-
- I tried the following command and it found only files, not directories:
-
-
- find /tmp -mtime +1 -type f -exec /bin/ls {} \;
-
- The only thing I changed is the rm command.
- It seems to me the {} is working correctly. Maybe I missed something?
- --
-