Find Files Ubuntu CLI

I don’t forget this, but I do have to teach people from time to time. Easiest way I know:
find / | grep FILENAMEYOUWANTTOFIND

so
find / | grep index.php

To find a file with certain words in the file:
grep -r ‘word or words you want to find’ /path/to/files/
grep -r ‘‘ /var/www/

Leave a Reply

Your email address will not be published. Required fields are marked *