dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: UNIX
Expertise: Advanced
Mar 17, 2004

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Search a Directory for Files with a Pattern

The following is a powerful UNIX command that searches for files or folder names containing a particular pattern:1

$>grep -l "main(String" `find . -name *.java -print`
This particular code will display all .java files in the present directory containg the text "main(String".
Supal Chowdhury
 
Thanks for your registration, follow us on our social networks to keep up-to-date