home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!ddssuprs!fred
- From: fred@dickens.com (Fred Stearns)
- Subject: Re: find bug
- Message-ID: <1992Jul22.120003.15122@dickens.com>
- Date: Wed, 22 Jul 1992 12:00:03 GMT
- Distribution: usa
- References: <1992Jul21.181917.749@ccd.harris.com>
- Organization: Dickens Data Systems, Inc.
- Lines: 23
-
- In article <1992Jul21.181917.749@ccd.harris.com> tvd@ccd.harris.com (Tom Denham) writes:
- >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 {} \;
- >
-
- Check out the command xargs. You can do the following:
-
- find /tmp -mtime +1 -type f -print | xargs rm
-
- It is much more efficient as rm is fork/exec'd once for a
- bunch of files. As opposed to once for each file.
-
-