[HPADM] RE: find - limit search

From: voychry@skynet.be
Date: Fri May 09 2003 - 15:35:53 EDT


Hello,
 
thanks for all your answers, but i must admit i wasn't very clear on
this one..
Most people adviced me to pipe the output :
find /var -type f -mtime +1 | head -1
 
Ok, this gives me only one file, and that's what i'm doing right now,
but it doesn't stop after finding one file..
The purpose of the question was to 'exit' after one hit.
Maybe it's not possible with the find command, but let me ask the
question
somehow different :
 
I want to find on every filesystem just one file that's older than one
day.
Once the first file is found, stop searching and go on with the next
filesystem
The above find command gives a lot of overhead because it keeps going
through
the whole filesystem...
Searching a file with the above command gives a lot of overhead, because
the find
command returns ALL files.
 
Regards,
Guy

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:29 EDT