Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Even easier in zsh' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Even easier in zsh
Authored by: gidds on Feb 23, '05 09:09:22AM
Sorry if I've mentioned this before, but if you use the 'Z' shell (zsh) instead of csh or bash, then you don't need to use the 'find' command, as it has inbuilt recursive filename completion.  So you can get the same effect by simply typing
    grep -li 'danny the dog' **/*.doc
You can also restrict by file size, type, permissions — everything find can do and more.

zsh has lots of other great features, too — and it's free, open source, and supplied as part of Mac OS X.  (I'm surprised it's not more popular.)

---
Andy/

[ Reply to This | # ]

Even easier in zsh
Authored by: chtito on Feb 23, '05 02:49:54PM
great! I've been using zsh for years (and fully agree it's a terrific shell), was aware of the '**' feature but it never occured to me that it could be used to replace the rather clumsy find/grep combination. Thanks!

Let me also add that for those who are versed in regular expressions, egrep should be used in place of grep (as far as i understood).

[ Reply to This | # ]