On Wed, Aug 30, 2023 at 07:43:51AM -0400, songbird wrote: > Karl Vogel wrote: > ... > > If nothing else, it's faster to run "locate" and look for file extensions; > > running "file" on that much crap took nearly 9 hours. > > do you have SSDs or spinning rust? > > when i just did this: > > # find / -type f | wc -l > > it took all of 24 seconds for the 2.4 million files found. > what script did you use? 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. Yours just sailed through the directory structures. Cheers -- t
Attachment:
signature.asc
Description: PGP signature