Sort files by filename
Les Mikesell
lesmikesell at gmail.com
Tue Jul 31 21:44:51 UTC 2007
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 at gmail.com
More information about the users
mailing list