How to find a work within a folder full of text files?
Hi,
I need to find a work within a folder which has moltyple text files. I need to search all those files for this word. what is the command please? I use RH. THanks ! |
While in the directory concerned:
grep (search word) * |
it takes ages
Hi,
I issued the command grep large* cause im looking for a word which starts with "large" the folder is only 3 mb of text files and it is working for more then 30 minutes to supply answers !! Maybe the command froze? how can I caheck this ? top dowsnt show this command... tahnks ! |
There should be a space between the search word and the * (grep large *), which will search every file in the directory (that's what the * means), for the character string large (regardless of where it appears in the word).
I think what's happening without the space is that grep thinks you haven't given it a filename, and its waiting to take input from the console. To stop it, use Control-D. |
btw, if your word starts with `large' and you know that it comes after, say, a space, you might want this:
$ grep ' large[^ ]* ' * `[^ ]' means `anything except space. `(something)*' (emphasis on `*') means (something) zero or more times. rtm ;) hth --Jonas |
All times are GMT -5. The time now is 07:26 AM. |