[Info-vax] Suggestion: Adding a /SORT option to DIRECTORY and F$SEARCH ?
Arne Vajhøj
arne at vajhoej.dk
Wed Jan 26 08:30:08 EST 2022
On 1/26/2022 8:20 AM, Jan-Erik Söderholm wrote:
> Den 2022-01-26 kl. 13:49, skrev John Wallace:
>> On Tuesday, 25 January 2022 at 19:09:32 UTC, Simon Clubley wrote:
>>> It would be nice to be able to see the output from a DIRECTORY command
>>> optionally sorted by one of largest size, smallest size, oldest date,
>>> newest date, etc.
>>>
>>> Likewise, it would be nice to be able to optionally specify the sort
>>> order in which filenames are returned by f$search().
>>>
>>> Does anyone agree ?
>> (ignoring f$search for now)
>>
>> You mean like DIR on RT11 (single user PDP11 OS) has had since the
>> 1990s or thereabouts?
>>
>> .DIR /SORT:[sort_option]
>>
>> Sort_options include DATE and SIZE.
>>
>> You can also include a /REVERSE qualifier to reverse the default sort
>> order.
>>
>> See e.g.
>> http://www.bitsavers.org/pdf/dec/pdp11/rt11/v5.6_Aug91/AA-PDU0A-TC_RT-11_Commands_Manual_Aug91.pdf
>>
>> Somebody must have thought it was worth doing.
>
> Might need a new message:
>
> %DIRECT-E-TOLARGETOSORT, directory to large for SORT qualifier
>
> Since the file names can not be read in any other sorting order
> then alphabetical, they need to be read into memory and sorted.
True, but with modern HW sizes then it would be an extremely
rare case.
1 thousand entries of 256 bytes is only 256 KB.
1 million entries of 256 bytes is "only" 256 MB.
Arne
More information about the Info-vax
mailing list