4 ms·
Learn to use your shell's globbing features instead of overusing find. In zsh, you can do 'print -l /*.(c|cc|h|hh)' for example (I'm sure bash has an equivalent
by gcv 14y ago
Learn to use your shell's globbing features instead of overusing find. In zsh, you can do 'print -l /*.(c|cc|h|hh)' for example (I'm sure bash has an equivalent).
- oftenwrong 14y agoFor me, the glob gets a lot of use.
- oftenwrong 14y ago** glob
- aw3c2 14y agodoes that work for say 2143789 files?
- klibertp 14y agoI actually hit a limit quite a few times already - I don't remember if it was the shell that complained or the command (mv, cp, ...) itself, but I know I couldn't execute the command. find with xargs or -exec worked, however.
- aw3c2 14y agoIt's what happens if one uses * or similar globbing. The shell will try to pass all the files as arguments to the command and if it is too many, it will fail. That is why using find is often needed.