Say I have some environment variable PROJECT_HOME. I want to find out which file it is set in. How do I do this?
grep -r PROJECT_HOME /etc $HOME
will probably find it.
find $HOME -type f -exec grep -Hn 'PROJECT_HOME' {} \;
I like using ack! in these kind of situations. I would change into the likely super directory and do an ack PROJECT_HOME.
ack PROJECT_HOME