Unix Find And Grep Command
If you want to find for a file name that consist the strings “description” in Unix, you can refer the command as below.
Find Grep Unix Command
find . -exec grep "description" '{}' \; -print
This find command will return the file name that contains the strings “description” in file
Next» Oracle 10g Active Connection SQL
1 Comment
Leave a Comment




September 15, 2010 3:52 am
Use the command as below if you just want to list the filename: -
1) find . -exec grep “description” ‘{}’ \; -print | grep “./”
2) find . -exec grep “description” ‘{}’ \; -print | grep “./” | awk ‘{ print substr($0,3) }’
Command (1) will display the result with ./ while command (2) will not display it.