![]() |
Interesting utilities
I am developing in the Mac OS X (10.7) system, and it has some nice
features that I hadn't seen in any windows/unix system. One of them is the "mdfind" utility that is incredibly powerful: mdfind some-identifier will look in the whole machine for "some-identifier" and write you in standard output the name of all files that have a match. It is like grep -R "some-identifier" /*.* but it comes back in seconds instead of hours like grep. It is very useful, and I never found something even remotely equivalent under linux/sun os Another nifty thing is the splint code checker. (This one is probably present under linux also but I never saw it under windows) The problem with it is that it is incredibly verbose, swamping the few interesting diagonstics under a mountain of rubbish. After a long session with it I have trimmed it to give me reasonable short output. I put all options in a shell script: /bin/sh splint -formatconst -dependenttrans -globstate -compdef -mayaliasunique -paramuse +boolint -immediatetrans -retvalother -noeffect -unqualifiedtrans -compdestroy -temptrans -branchstate -usereleased -kepttrans -compmempass -nullstate -nullpass -nullret -boolops -mustfreeonly -incondefs +charint -retvalint -predboolint -realcompare $1 |
Re: Interesting utilities
jacob navia wrote:
>I am developing in the Mac OS X (10.7) system, and it has some nice >features that I hadn't seen in any windows/unix system. > >mdfind some-identifier ... >but it comes back in seconds instead of hours like grep. That probably means that it looks into a keyword database, built by indexing the files in the background, over many hours instead of seconds. And yes, the same functionality is available under Linux and Windows. >Another nifty thing is the splint code checker. (This one is probably >present under linux also but I never saw it under windows) A windows installer is available at the home page: http://www.splint.org/ -- Roberto Waltman [ Please reply to the group, return address is invalid ] |
Re: Interesting utilities
Le 15/10/11 06:35, Roberto Waltman a écrit :
> jacob navia wrote: >> I am developing in the Mac OS X (10.7) system, and it has some nice >> features that I hadn't seen in any windows/unix system. >> >> mdfind some-identifier ... >> but it comes back in seconds instead of hours like grep. > > That probably means that it looks into a keyword database, built by > indexing the files in the background, over many hours instead of > seconds. > And yes, the same functionality is available under Linux and Windows. Sorry but I have never even heard about something like that under windows/linux. Maybe you have an example? > >> Another nifty thing is the splint code checker. (This one is probably >> present under linux also but I never saw it under windows) > > A windows installer is available at the home page: > http://www.splint.org/ > Thanks, I overlooked that one. |
Re: Interesting utilities
On Sat, 15 Oct 2011 13:06:46 +0200, jacob navia <jacob@spamsink.net>
wrote: >Sorry but I have never even heard about something like that under >windows/linux. >Maybe you have an example? It's called Spotlight on OS/X and Windows Search since the release of Windows XP. I can't remember what it was called in Windows 2000. Settings are available in the Windows Control panel applet named "Indexing Options" on Windows 7. |
[OT] Interesting utilities
jacob navia wrote:
[ re: File indexing / search applications ] > ... something like that under >windows/linux. >Maybe you have an example? http://en.wikipedia.org/wiki/Windows_Search http://www.microsoft.com/download/en/details.aspx?id=23 http://www.vandenoever.info/software...kademy2006.pdf http://www.wikinfo.org/index.php/Com...earch_software http://en.wikipedia.org/wiki/Beagle_%28software%29 The last page says the Beagle project, (only one I used under Linux,) is not being developed anymore. I was not aware of that. -- Roberto Waltman [ Please reply to the group, return address is invalid ] |
Re: Interesting utilities
On 2011-10-11, jacob navia <jacob@spamsink.net> wrote:
> I am developing in the Mac OS X (10.7) system, and it has some nice > features that I hadn't seen in any windows/unix system. > > One of them is the "mdfind" utility that is incredibly powerful: > > mdfind some-identifier > > will look in the whole machine for "some-identifier" and write you in > standard output the name of all files that have a match. It is like > > grep -R "some-identifier" /*.* > > but it comes back in seconds instead of hours like grep. So it is not more powerful than grep, since it computes the same thing. The word you are looking for is "faster". Can it find any regular expression in seconds? > It is very useful, and I never found something even remotely equivalent > under linux/sun os How hard do you look? I use id-utils and ctags for doing this over programming projects. In id-utils there is a "mkid" utility which indexes the identifiers found in a directory tree. This is gathered into a big file called ID. The ID file is queried with "lid". I just set up an Ubuntu system where "apt-get install id-utils" got me mkid in seconds. > Another nifty thing is the splint code checker. (This one is probably > present under linux also but I never saw it under windows) There is a direct pointer to a Windows download page on the Splint home page! This kind of thing is not going to come preinstalled on a Wintel PC from Best Buy. > The problem with it is that it is incredibly verbose, swamping the > few interesting diagonstics under a mountain of rubbish. After a long > session with it I have trimmed it to give me reasonable short output. This is by design. To get value out of splint you have to read the documentation and start using the annotations. Splint can statically check things like that malloced objects are freed somewhere, at least for some programs (maybe not in general). |
Re: Interesting utilities
On 2011-10-15, jacob navia <jacob@spamsink.net> wrote:
> Le 15/10/11 06:35, Roberto Waltman a écrit : >> jacob navia wrote: >>> I am developing in the Mac OS X (10.7) system, and it has some nice >>> features that I hadn't seen in any windows/unix system. >>> >>> mdfind some-identifier ... >>> but it comes back in seconds instead of hours like grep. >> >> That probably means that it looks into a keyword database, built by >> indexing the files in the background, over many hours instead of >> seconds. >> And yes, the same functionality is available under Linux and Windows. > > Sorry but I have never even heard about something like that under > windows/linux. > Maybe you have an example? http://freshmeat.net/search?q=file+i...&submit=Search 45 hits, some of them relevant-looking. http://freshmeat.net/search?q=file+search&submit=Search 251 hits. Man, you really are still a goof, sorry to say. Windows has dynamic file indexing since Vista, if not before. |
Re: Interesting utilities
On 10/16/11 02:18 PM, Kaz Kylheku wrote:
> On 2011-10-11, jacob navia<jacob@spamsink.net> wrote: >> I am developing in the Mac OS X (10.7) system, and it has some nice >> features that I hadn't seen in any windows/unix system. >> >> One of them is the "mdfind" utility that is incredibly powerful: >> >> mdfind some-identifier >> >> will look in the whole machine for "some-identifier" and write you in >> standard output the name of all files that have a match. It is like >> >> grep -R "some-identifier" /*.* >> >> but it comes back in seconds instead of hours like grep. > > So it is not more powerful than grep, since it computes the same thing. The > word you are looking for is "faster". > > Can it find any regular expression in seconds? > >> It is very useful, and I never found something even remotely equivalent >> under linux/sun os > > How hard do you look? > > I use id-utils and ctags for doing this over programming projects. > In id-utils there is a "mkid" utility which indexes the identifiers found > in a directory tree. This is gathered into a big file called ID. > The ID file is queried with "lid". > > I just set up an Ubuntu system where "apt-get install id-utils" > got me mkid in seconds. These utilities are all well and good on a relatively static filesystem, but the fun begins when you want to keep the database as up to date as possible. I know all about the fun involved, I have to maintain an index over a couple of multi-TB filesystems with tens of millions of files in each! -- Ian Collins |
Re: Interesting utilities
On 2011-10-16, XeCycle <xecycle@gmail.com> wrote:
> jacob navia <jacob@spamsink.net> writes: >> It is very useful, and I never found something even remotely >> equivalent under linux/sun os > > What about `locate' from GNU Findutils? Locate searches only file names, not their contents. That's been a staple of Linux distros as far as I can remember (which could potentially takes us back as far as 1993). Long before operating systems "for the rest of them" started getting any kind of indexing. |
Re: Interesting utilities
Le 16/10/11 03:24, Kaz Kylheku a écrit :
> On 2011-10-15, jacob navia<jacob@spamsink.net> wrote: >> Le 15/10/11 06:35, Roberto Waltman a écrit : >>> jacob navia wrote: >>>> I am developing in the Mac OS X (10.7) system, and it has some nice >>>> features that I hadn't seen in any windows/unix system. >>>> >>>> mdfind some-identifier ... >>>> but it comes back in seconds instead of hours like grep. >>> >>> That probably means that it looks into a keyword database, built by >>> indexing the files in the background, over many hours instead of >>> seconds. >>> And yes, the same functionality is available under Linux and Windows. >> >> Sorry but I have never even heard about something like that under >> windows/linux. >> Maybe you have an example? > > http://freshmeat.net/search?q=file+i...&submit=Search > > 45 hits, some of them relevant-looking. > > http://freshmeat.net/search?q=file+search&submit=Search > > 251 hits. > > Man, you really are still a goof, sorry to say. > > Windows has dynamic file indexing since Vista, if not before. Sure, but it doesn't index everything, as I have seen lately. Only some selected directories. SUre you can change that but still, it doesn't match the easy of use of not doing anything :-) I used the find utility in windows XP, and the terrible interface with the dog just convinced me to avoid it completely. In any case it wasn't a background process as it is in the mac Under linux there *could* be an indexing utility around of course, but it is not automatic like mdfind. What is interesting in the mac is the number of automatic utilities like mdfind, for instance the indredibly useful backup utility, that work out of the box without any need for big configurations, etc. |
| All times are GMT. The time now is 10:25 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.