Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: linux command to find a file

  • Subject: Re: linux command to find a file
  • From: Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx>
  • Date: Fri, 02 Sep 2005 04:03:16 +0100
  • Newsgroups: comp.os.linux.misc
  • Organization: schestowitz.com / MCC / Manchester University
  • References: <1125611496.904170.185160@g47g2000cwa.googlegroups.com>
  • Reply-to: newsgroups@xxxxxxxxxxxxxxx
  • User-agent: KNode/0.7.2
__/ [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.
> 
> Thanks.

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,

Roy

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index