From: Dossy Date: 2002-06-02T11:44:16+09:00 Subject: Re: Finding all applications On 2002.06.02, Chris Gehlker wrote: > On 6/1/02 5:20 PM, "Mike Campbell" wrote: > > >>> ruby -r find -e 'Find.find("/"){|f| puts f if f[/\.app$/]}' > >>> > >>> Or, > >>> > >>> ruby -r find -e 'Dir.glob("/**/*.app") {|f| puts f}' > >> > >> > >> Thanks, Jim, Shawn and nobu for replying. All of your suggestions work. They > >> are all so slow though. I guess when man find says "find recursively > >> descends the directory tree for each file listed..." I'm supposed to take > >> that literally. I was hoping that find would be smart enough to just search > >> the catalog. > > > > > > Catalog? > > That is probably Mac speak. I know Windows used to call it a FAT but I think > it's called something else in NTFS. I have no idea what the generic term is > for "The database that maps inodes to the directory hierarchy. The thing > that gets updated when the user executes mv." Among Mac programmers that > thing has been called the "catalog tree" or "catalog" forever, while the > corresponding database that maps inodes to disk sectors is called the > "extents tree." > > I would like to know the generic names for these things, assuming there are > generic names. Did Mac (HFS I'm assuming) index the filesystem and allow searching of the index (I think BeOS had this functionality)? In FAT, NTFS and most Unix filesystems, there's no indexing so to locate objects you have to traverse the whole filesystem. -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)