[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: finding .m files using 'locate'
From: |
Henry F. Mollet |
Subject: |
Re: finding .m files using 'locate' |
Date: |
Fri, 15 Jul 2005 19:17:21 -0700 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
Thank you. I'm beginning to understand. It implies that a fink installation
makes it easier to find octave and octave-forge .m files.
What is the difference between locate and find? If both are to be used in
the terminal window why would I use locate, which requires the data base to
be brought up to date, when find will do the same thing all the time?
Henry
on 7/15/05 1:25 PM, Michael W. Martin at address@hidden wrote:
>
> On Jul 15, 2005, at 1:41 PM, Mike Miller wrote:
>
>> Most new unix systems, especially GNU/Linux systems have the
>> 'locate' command. Here is a way to get a list of every directory
>> that contains at least one file with the .m extension:
>
> OSX/Tiger has locate also. However, for locate be useful, the
> database in /var/db/locate.database must be up-to-date. This is true
> of all Unix systems. Normally the database is created/updated by the
> system in the wee hours of the morning (at least on Tiger). If you
> leave you computer off at night, as most folks do, it will not create
> it. I schedule my Mac to come on at 7:00am and then periodic is told
> to run at 7:15am to update things. That aside, in a pinch one can run
> "sudo periodic weekly" in the terminal window to create the locate
> database. Keep in mind that locate is only as good as its database.
>
> As to Spotlight not finding anything in /usr. That is by design.
> Spotlight is designed to find a user's **own documents**, not
> something buried in the system. For the most part system stuff should
> be left alone. Past versions of OSX had the same behavior (Sherlock,
> for example), so this is not a something new in Spotlight/Tiger. Now
> Spotlight will find all of the .m files in the fink installation,
> which is where my files are, since fink is not viewed as a system
> directory.
>
>
> But to solve the original problem, for a fast way to find all .m
> files in a directory, try:
>
> find . -name \*.m -print
>
> The \*.m can be replaced to find just about anything.
>
>
> ----------------------------------------------------------------------
> Michael W. Martin Phone: (281) 333-2177
> Draper Laboratory FAX: (281) 333-5276
> 2200 Space Park Dr. EMail: address@hidden
> Houston, TX 77058 WWW: http://www.jsc.draper.com/
> USA Mail Code: EG/Draper
> ----------------------------------------------------------------------
>
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Re: finding .m files using 'locate', (continued)
- Re: finding .m files using 'locate', Przemek Klosowski, 2005/07/18
- Re: finding .m files using 'locate', Mike Miller, 2005/07/19
- Re: finding .m files using 'locate', Mike Miller, 2005/07/19
- SV: finding .m files using 'locate', Peter J. Acklam, 2005/07/19
- Re: SV: finding .m files using 'locate', Mike Miller, 2005/07/19
- Re: finding .m files using 'locate', Peter J. Acklam, 2005/07/19
Re: finding .m files using 'locate', Michael W. Martin, 2005/07/15
- Re: finding .m files using 'locate',
Henry F. Mollet <=