[mythtv-users] Added a second Tuner

Shawn Asmussen shawn.asmussen at gmail.com
Mon Feb 28 20:13:29 UTC 2005


On Mon, 28 Feb 2005 15:40:16 +1100, Phill Edwards
<philledwards at gmail.com> wrote:
> You could search every file on your system for "mythfrontend" to find
> the culprits:
> 
> # find / -name "*" -exec grep mythfrontend {} \;
> 

That would mostly work, although it could take forever and a day to
finish. However, I wanted to point out a couple of things about your
find command. First, you don't have to specify the -name option if
you're going to use a filter of "*". The second thing, is that since
this command will issue a new grep for each file, that means that each
grep is on a single file, which means that grep will not print out the
filenames for the lines it spits out. That could make it difficult to
see what files matched. One trick you can use to get around this is to
add /dev/null to the arguments to grep, so that technically each grep
is on TWO files, so that grep will then print out the filenames. In
other words, this would probably work better:

find / -exec grep mythfrontend /dev/null {} \;

That sort of trick is also handy when you want to do something in a
shell script like:

for file in list of filenames to search
do
grep PATTERN /dev/null $file
done

Shawn Asmussen


More information about the mythtv-users mailing list