Some useful tips using the find linux command to search for text
Some useful tips using the find linux command to search for text
Searching for texts into projects source code is a common task when you are developing.
I think the best aproach is to go to shell and run the commands bellow:
Search for xml files containing the text "org.alfresco.util.CronTriggerBean"
Look for javascript files containing the text "renderPickerHTML"
But there are some projects that have lots of "minimized" files, and those files are not that useful when you are searching for sample code. In these cases, its better to filter the results, ignoring the minized ones.
To do this, you just need to include one parameter to your command, like this
find . -type f -not -iwholename *-min.js -name "*" -print | xargs grep "renderPickerHTML"
The only difference here is the "-not -iwholename *-min.js.
I hope you enjoy this quick tip.
download file now
Comments
Post a Comment