Tim Kuijsten: > > Missing type checks should be easily added to every incovation lacking > > them, they're clearer to read and might even speed things up by > > preventing direcctory names to be matched against "*.orig" for example. > > I've always thought *not* using -type and matching purely on -name > is faster because the name is in the directory entry while the type > is stored in an inode which needs to be be fetched separately...
If you look at the getdents(2) man page, you see that the file type is part of the directory entry, no additional stat(2) necessary. I assume that -type is essentially free. Still, ... > of course the performance of string comparison depends on the actual > name you're looking for and the file hierachy. ... I very much doubt that it's worth optimizing this. -- Christian "naddy" Weisgerber na...@mips.inka.de