Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Hey Look, This isn't a Language Shitpost

Name: cabbagebot 2011-07-07 0:30

Hello /proggles/. In the midst of all of this "faggotry," I propose a thread about actual programming.

Suppose you have a sort of root directory with a large number of subdirectories all containing a large number of files. The files all exist in ranges of size from a few kilobytes to several gigabytes. Given an input file, let's conduct a quick method for searching our root directory and its subdirectories for copies of the input file.

I've thought of a fairly decent algorithm that I will share if anyone here is interested enough to share their own.

Name: cabbagebot 2011-07-07 2:21

>>9
Actually, this is slow compared to the solution I had in mind. Using md5 hashing requires a hashing computation to occur on the entirety of all n files. In essence, you are recommending the solution proposed in >>4.

But nice try. As said before, this is a feasible, but not optimal solution. If I have to read every bit of every file, I'd hardly consider it fast.

Also, English or pseudocode please. It is rare to find somebody who speaks Bash natively.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List