![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grep question. | saurabhsinha23 | UNIX for Dummies Questions & Answers | 3 | 12-10-2007 09:58 PM |
| Question about GREP | Adriel | UNIX for Dummies Questions & Answers | 16 | 03-22-2007 04:03 AM |
| Another grep question | kingdbag | UNIX for Dummies Questions & Answers | 6 | 10-26-2006 10:56 PM |
| grep & sed question | der Kopf | Shell Programming and Scripting | 1 | 11-22-2004 12:49 AM |
| Grep question | eloquent99 | UNIX for Dummies Questions & Answers | 4 | 02-20-2003 06:49 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
question about grep
I want to search for a word from the root directory using grep command.
I am searching for a word called batch in cd /vol directory.The vol directory has so many sub-directories and I want to see all the files having the name as batch. This what I tried .. /vol/ % grep -i *batch* But it is hanging ,and I didn't have anything returned. Could someone help me out with this. thanks. |
| Forum Sponsor | ||
|
|
|
|||
|
Hello
grep will take time because as u said there r many sub-directoires under the /vol directory . It hangs because u have not specified any dir from which it would read so it waits for some input from the standard input . U can reduce the access time by giving a better regex like batch* or *batch . Use find instead find /vol/ -name '*batch*' -print cheers |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|