__/ [rolfbeethoven] on Thursday 01 September 2005 22:51 \__
> Is there a way to find where a find is in linux from the command line?
> During my linux exploration, I'll run across a HOWTO that talks about
> running a certain command or editing a certain file, but I don't know
> where the file is.
> In order to locate a file called filename, I have resorted to using
> #cd /
> #ls (to get a list of directories)
> #cd firstdirectory
> #ls -l | grep filename
> if the file is found I manually descend into each directory until I
> have found the file.
> There has got to be a better way.
Others have covered the obvious solutions which are to use 'which', 'find'
and other command-line tools. I don't want to give another duplicate
answer, so I would tell you about an alternative approach.
If you are willing to use a search engine, assuming your browser is already
open and has a search bar (or box) in place, just enter the name of the
file, maybe alongside the name of your distribution. The SERP (results
page) will often contain the paths which you are after. You don't even need
to decent to the level of a an actual Web site. Just copy and paste the
path to your command-line.
Hope it helps,