14

Pipe find into grep -v

view full story
linux-howto

http://unix.stackexchange.com – I'm trying to find all files that are of a certain type and do not contain a certain string. I am trying to go about it by piping find to grep -v example: find -type f -name '*.java' | xargs grep -v "something something" This does not seem to work. It seems to be just returning all the files that the find command found. If it helps, what I am trying to do is basically find all .java files that match a certain filename(e.g. ends with 'Pb' as in SessionPb.java) and that do not have an 'extends SomethingSomething" inside it. My suspicion being a newbie to unix is that I'm doing it wrong. So (HowTos)