grep & find search hangups
EXERCISE:
There is a file in the /etc directory which contains the line: default=0 Search only the /etc directory; only use ONE command and do not perform a recursive search. Command used: ____________________________________________ Filename: _____________________________________ I am logged in as root. So far I tried:
Since my command was cd /etc;grep "default=0" ./* is my filename going to be ./grub.conf:default=0 since that's what it returned from my command? AND Is there a way I can do this without using cd first? |
This works for me:
Code:
grep "default=0" /etc/* |
Quote:
|
Quote:
|
Quote:
Code:
|
As with your other question, you really need to start reading man pages for the commands you are using.
|
Quote:
To get the manual pages for find and grep, Code:
man grep Code:
man grep; man find |
All times are GMT -5. The time now is 11:24 AM. |