Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to fgrep through subdirectories 1

Status
Not open for further replies.

raypru

Technical User
Apr 9, 2002
26
GB
I need to search, using fgrep, for some text down through sub directories. Can someone provide the syntax.

Thanks
 
To find text in .txt files in the current directory and all sub-directories, try

find . -name \*.txt -exec fgrep text /dev/null {} \; CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top