| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| fishsponge |
Posted: Aug 1 2003, 08:10 AM
|
||
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
To find all files in a directory containing a string of text, you need the following command:
find = the find command. . = the directory you want to search in. -type f = the type of thing you want to search for (f=files) | xargs = pipe the output into xargs (see 'man xargs') grep = search for... string = the string of text you want to search for. Could also contain spaces, but remember to put it in "quotes". |
||
| foobar |
Posted: Sep 23 2004, 03:01 AM
|
|
User Level: 2 ![]() ![]() Group: Members Posts: 15 Member No.: 505 Joined: 6-September 04 |
I'm usually just lazy and type:
grep -r "whateverstring" /path/to/dir |
| Squiggle |
Posted: Apr 5 2005, 08:07 AM
|
|
Newbie ![]() Group: Members Posts: 2 Member No.: 266 Joined: 26-April 04 |
Wow.
I actually found this page from a google search. Small world and all that! :P |
| fishsponge |
Posted: Apr 8 2005, 07:51 PM
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 679 Member No.: 1 Joined: 13-February 03 |
a good site, you see! :D
|
![]() |
![]() ![]() ![]() |