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:
- 1ST ATTEMPT - grep "default=0" ./* (nothing happened)
- 2ND ATTEMPT - find /etc "default=0" ./* (listed all the files in /etc and stated find: 'default=0': No such file or directory)
- 3RD ATTEMPT - cd /etc;grep "default=0" ./* (which returned as ./grub.conf:default=0 BUT I am confused because technically I combined two commands on one line).
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?