grep help?
i'm running slackware linux and everytime i open the console, it will print some words of wisdom, advice, jokes, etc. well, i wanted to find out where that file was so i decided i'd do a grep for one of the more unique words in one of the quotes. so i did:
Code:
grep "famous" . ./\.* ps. if you know the location of the file that holds those quotes, thats great , id like to know, but this is really more about learning how to use grep than really finding that file. thanx ;) |
Well, you could try:
find . * -exec grep "famous" {} \; -print and then find . .* -exec grep "famous" {} \; -print for all the hidden files. But it'll take ages. However, I can tell you that the files you are looking for are in /usr/share/games/fortunes. That'll probably save you some time! |
You could try recursive searching with grep:
grep -R "famous" * It also works for hidden files. |
sometimes it hangs after a while. for example, if i do that first command you gave me in my root directory it will go through ./dev for a long time and then just stop after a while
|
Its an old console game called fortune. The default database location is /usr/share/games/fortunes. However, I do not know where Slack installs it.
http://www.die.net/doc/linux/man/man6/fortune.6.html I'm not a real expert on the grep statement. I would say its going to take awhile. |
It installs it in that same place. I told the OP that in the first reply.
|
All times are GMT -5. The time now is 10:34 AM. |