News for hackers. Stuff that matters.
Re:ffind: a sane replacement for command line file search by msluyter on Sunday June 09, 2013 @09:37AM (#5848860)
Similarly, I have a little shell function loaded by .zshrc that covers 90% of my use cases:

   findit() {
       find . -name \* -exec grep -iH $1 {} \;
   }
Re:ffind: a sane replacement for command line file search by knome on Sunday June 09, 2013 @12:41PM (#5849510)
Why not just run a recursive grep? That would save having to invoke grep on every single file found.

    findit() {
        grep -iHR $1 .
    }
Alternately, you could use the '+' variant of -exec in order to batch files together to be processed together.
Re:ffind: a sane replacement for command line file search by msluyter on Sunday June 09, 2013 @12:50PM (#5849539)
Cool, I wasn't aware of a -R flag in grep for some reason. I need to go back and re-read the man pages...
Re:ffind: a sane replacement for command line file search by cwp on Sunday June 09, 2013 @12:19PM (#5849420)
Right. There's no need to write a whole new tool just to simplify invocation for common cases. For a guy who uses the command line "a LOT" he's not making good use of his shell.
Re:ffind: a sane replacement for command line file search by ralph on Sunday June 09, 2013 @12:11PM (#5849392)
Is this not equivalent and avoids running grep(1) once for each path?

    find -exec grep -iH ${1?} {} +
Though it still runs grep on directories.
Re:ffind: a sane replacement for command line file search by aarmot on Sunday June 09, 2013 @10:20AM (#5848978)
Author possibly meant something like this (but yeah, same idea) fffind () { find . -regex ".$1."; }