Albretch Mueller wrote: > The thing is that I have to call, say sha256sum, on millions of files > > Probably debian admin people dealing with packaging have to deal with > the same kinds of issues.
find . -name "*foo" -print that confirms that you're getting the files you want. When you're happy, go with: find . -name "*foo" -print0 | xargs -0 -p32 sha256sum which prints each entry followed by a null; then xargs picks up the null-terminated entries and runs sha256sum on each one with a parallelism of 32. You'll want to tune the parallelism for the number of cores and disk storage you're using. If your disks are relatively slow, -p #ofcores is about right. You may be able to bump it up significantly from there for RAIDs, SSDs, or faster read devices. -dsr-