The emperor's New Inittab

John Summerfield debian at herakles.homelinux.org
Tue Jun 17 02:53:45 UTC 2008


Bryn M. Reeves wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> John Summerfield wrote:
>> The quick way to get an answer is:
>> find /etc -type f -exec grep -l {} \;
>> and examine files listed.
> 
> Surely you want a pattern in there somewhere?
> 
> Without one, that command never terminates - grep will sit there
> interpreting the value of {} as a pattern and trying to read from stdin:
> 
> $ find /etc -type f -exec grep -l {} \; &
> 
> $ ps ax | grep grep
>  1849 pts/48   S+     0:00 find /etc -type f -exec grep -l {} ;
>  1850 pts/48   S+     0:00 grep -l /etc/motd
> 
> Been doing that for a while now...
> 
> Bryn.

One hopes Chuck (and others) can read a man page:-) I gave a skeleton 
for finding files and doing something with them.

The commands I gave are sufficient for the task, though users do need to 
review them and adapt them to their circumstances.

Such as by discovering, as you did, that more information is needed.

Now folk have had time to digest that, try this:
sudo find /etc/ -type f -print0 | sudo xargs -0 egrep -l '/[^/]*getty'





-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)




More information about the fedora-test-list mailing list