On Wed, Aug 30, 2023 at 02:57:35PM +0200, to...@tuxteam.de wrote: > Karl ran (probably -exec) "file --mimetype" on each one, which at > least involves opening each of the files once and reading a few > (tens of) bytes off it. > > Depending on how he invoked it (with a \; at the end of find or > with GNU find's extension +, that could means starting `file' > for each found ummm... file, which also takes time.
For the record, "-exec file {} +" isn't a GNU extension. That's actually portable (it's in POSIX). The other way, "find ... -print0 | xargs -0 file", *is* a GNU extension.