Tan Wee Yeh wrote: > > Robert Harley wrote: > > > foreach file ( `find . -mtime -0 -print` ) > > chyear -m $file 2018 1998 > > end > > Correct me if I'm wrong but > > # find . -mtime -0 -exec chyear -m {} 2018 1998 \; > > would probably be more efficient :). Both methods are very inefficient, because the chyear program has to be started freshly for every file, resulting in high system cpu usage. It's better to modify the program so it accepts any number of filenames as arguments or reads them from stdin like the file I attached. This way, the find results can be piped or backticked, resulting in only a single call each of chyear and find. I try to avoid -exec in find calls. use find . -mtime -0 |chyear 2018 1998 or chyear 2018 1998 `find . -mtime -0 -mount` - Alex -- _________________________________________________________________ / \ | Alex Rhomberg Tel: +41 1 632 49 18 | | Institut fuer Elektronik Fax: +41 1 632 12 10 | | ETH Zuerich Zentrale: +41 1 632 11 11 | | Gloriastrasse 35 | | 8092 Zuerich email: rhomberg@ife.ee.ethz.ch | \_________________________________________________________________/