[Info-vax] Still no DIR/SORT_BY_TIME

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Wed Aug 12 15:35:49 EDT 2015


On 2015-08-12 18:50:58 +0000, hb said:

> On 08/12/2015 06:15 PM, Stephen Hoffman wrote:
>> On 2015-08-12 14:42:05 +0000, David Froble said:
>> 
>>> alanfeldman48 at gmail.com wrote:
>>>> Just checked
>>>> http://h30266.www3.hp.com/odl/axpos/opsys/vmsos84/9996/9996pro_63.html#blue_73
>>>> 
>>>> Still can't sort directory listings by time.
>>> 
>>> It's called "programming".  Sometimes you have to do it yourself ..
>>> 
>>> :-)
>> 
>> $ product install gnv
>> $ ls :== $gnv$gnu:[bin]ls
>> $ ls -t
> 
> Looks easy. But it depends on what you want/expect or on which VMS date 
> is mapped to which Unix date ...

For a creation-date sort, use:

ls -tU.

As is typical with bash, add -c, -U or -u with -t, or add -r to reverse 
the sort, -R for recursive, or use -1 — that's a digit and not a 
letter, for those of you with horrible fonts — and pipe it into cut or 
sort.   Or maybe use find in place of ls; something like find / -ctime 
1 or such, or use exec for more.   Pipe it through less or more to get 
the paging, if you want it.

Though ls does use different defaults and unless I'm missing something 
here, the exact same issue you're referencing — which metadata to sort 
on — also exists for DCL and DIRECTORY, too — you have to tell DCL 
which metadata you're interested in using for sorting, if it's not the 
default.


-- 
Pure Personal Opinion | HoffmanLabs LLC




More information about the Info-vax mailing list