Each v0.01


This is essentially a RISC OS version of the Unix find command, with a couple of extensions, and is used to perform arbitrary operations over directories. Also included is a version of xargs, which complements each. Some examples from the ReadMe file:

each ADFS::4.$ ( -type i -prune ) , ( -size +1M -print )
Show all the files over one megabyte on ADFS::4, but without looking inside any image files (such as a PC partition).
each <Wimp$ScrapDir> -type f -print
List all the files in the scrap directory.
each . -time -3 -exec info %0 ;
Display info on all the files in and beneath the current directory that have been modified in the last 3 days.
each <Dustbin$Dir> -type f -time +3 -print > pipe:$.filelist
xargs remove < pipe:$.filelist
Remove any files in "<Dustbin$Dir>" over 3 days old, leaving the directory structure intact.
each @ ( -type i -prune ) -or ( -type d -exec cdir RAM:$.%1 ; )
Replicate the directory structure (from the current directory downwards) on the RAM disk.

Click here to download it (approx 20k). Source code for both each and xargs is included.


Paul Clifford

17 May 1998