Is there some Unix util that will allow me to grep multiple files with little typing? Is there some Unix util that will allow me to grep multiple files with little typing? unix unix

Is there some Unix util that will allow me to grep multiple files with little typing?


I love ack:

Which would you rather type?

$ grep pattern $(find . -type f | grep -v '\.svn')

$ ack pattern


You may find your shell helps you. For instance, in zsh, you can do

grep foo **/*.py

provided the number of .py files doesn't exceed the maximum number of arguments allowed for a command (64k?). Note you can qualify the file globbing e.g.

grep foo **/*.py(mh-5)

which will give you everything modified in the last 5 hours.