I want to make my custom alias for searching text inside the directory recursively.
Currently i use this
grep -r "text to search" /var/www/sites
I want first
- To search only specific files like only html , php files only.
- I also want the line number of the file
- i want to make the alias of command like
myalias
so that from command line i use only this
myalias text-to-search (without quotes)
Is this possible
Put this in your ~/.bashrc:
Then
Finally (to refresh your environment)