find cannot find all files in a directory

Leo de Wit leo at philmds.UUCP
Thu Sep 7 15:53:20 AEST 1989


In article <874 at wubios.wustl.edu> david at wubios.wustl.edu (David J. Camp) writes:
|I want find to return all the files in each directory to exec.  That is,
|I want to do something like:
|
|     find /path -type d -exec command {}/\* \; -print
|
|so that command will be run on each file, one directory at a time.

If you don't have xargs, how about:

     find /path -type d -print|while read dir; do command $dir/*; done

   Leo.



More information about the Comp.unix.questions mailing list