in reply to Re^2: Massive File Editing
in thread Massive File Editing

Hi Aristotle,

Had no idea File::Find was part of the core distribution. The reason I did not use a find function in my example was I had to parse each file in the filesystem.

Why? We had a 2 terrabyte file system from a litigation that we needed to type, index, hash and store in a mysql database. Then when we needed to find files of certain types, patterns, sizes, dates we could query a hashed index instead of running find each time. I agree that if you are looking for a certain type of file this is not the best idea, however in my situation it had to be done. However, if you know of a better way to do this, PPLLEEASSEE let me know.

Not the best advice, but it worked for me.

Dave -- Saving the world one node at a time

Replies are listed 'Best First'.
Re^4: Massive File Editing
by Aristotle (Chancellor) on Dec 16, 2002 at 19:56 UTC
    I see your point - and I concur that using a database was the better choice in this case (locate operates much in the same way, f.ex). Though I'd still use File::Find or at least find instead to scan the filesystem - the pertinent file information can more robustly be retrieved by (lstat|stat)ing the files yourself rather than parsing ls' output. In general, the less parsing you do, the better.

    Makeshifts last the longest.