Weird Files...
jc at trillian.mit.edu
jc at trillian.mit.edu
Fri Oct 27 11:54:12 EDT 2000
--------
christoph wrote:
| Derek Martin wrote:
| > $ ls -i |grep f2
| > 33845 -f2
| > $ find . -inum 33845 -exec rm {} \;
|
| this is equal to 'rm ./-f2'
I wonder what the most abstruse way to remove a file might be?
A few years back, I read a few funny articles about a gang who had
responded to the ongoing attempts to find efficient sort algorithms
by starting a project to discover the most inefficient known sort
algorithms. Part of the rules were that you couldn't just make your
program gratuitously inefficient by writing a busy loop to waste cpu
time; every part of the code had to be relevant to the sort.
The last I saw this, the winner was a scheme that systematically
generated random permutations of the list, and tested each for
sortedness. But there might be a worse one by now.
The above use of find to locate a (known) file by inum and remove it
is certainly a contender, and all the steps are actually required by
the algorithm. It's even more wasteful than loading the entire
directory into an editor and telling the editor to delete the file.
I wonder if we can discover a worse scheme?
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).
More information about the Discuss
mailing list