[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Sort files by filename



Les wrote:
	Using C, you could open the directory, sort the list, compare for a
desired sequence from a starting value to an ending value and pass out a
list of missing files, and it would take only milliseconds, primarily
limited by disk access speed.

Milliseconds aren't so hard to match these days. Let's try my 'compare to list' shell approach:

# time ls * |comm -13 - ../list
5
6

real    0m0.007s
user    0m0.002s
sys     0m0.007s

Note that it is dominated by the system time anyway - although you have to wonder about the math there - maybe both processors get counted.

--
  Les Mikesell
   lesmikesell gmail com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]