3 ms·
A mention of xargs might be worth slipping into this. A lot of the time it doesn't really matter whether you use that or -exec, but it's faster on large lists o
by philh 17y ago
A mention of xargs might be worth slipping into this. A lot of the time it doesn't really matter whether you use that or -exec, but it's faster on large lists of files. And some commands (grep) act differently if there are multiple files specified as input.
- noss 17y agoxargs was my first thought as well. I think I type in this line almost daily (why have i not made an alias already?): find . -type f | xargs grep needle gnu find and xargs have the -print0 and -0 arguments for piping nul terminated filenames, so special chars in file names wont bite you.