[Info-vax] Still no DIR/SORT_BY_TIME

hb end.of at inter.net
Wed Aug 12 17:32:31 EDT 2015


On 08/12/2015 09:35 PM, Stephen Hoffman wrote:
> For a creation-date sort, use:
> 
> ls -tU.

If that works, it looks like a (GNV?) extension, which doesn't show in
(GNV's) "--help"

$ pipe ls --help |search sys$pipe " -U"," -t"/exact
  -t                         sort by modification time, newest first
  -U                         do not sort; list entries in directory order
$

With GNV's

$ ls --version
ls (GNU coreutils) 8.23
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Richard M. Stallman and David MacKenzie.
$

-Ut doesn't seem to do the trick:

$ dir/date=cre

Directory EISNER$DRA3:[DECUSERVE_USER.USER]

LOGIN.COM;1          24-JUN-2010 16:19:23.00
XDIR.COM;1            9-JAN-2012 16:58:24.88

Total of 2 files.
$ dir/date=mod

Directory EISNER$DRA3:[DECUSERVE_USER.USER]

LOGIN.COM;1          12-AUG-2015 16:44:10.73
XDIR.COM;1           12-AUG-2015 16:44:04.87

Total of 2 files.

$ ls -tl
total 3
-rwx------ 1 USER 392 498 Aug 12 16:44 login.com
-rwx------ 1 USER 392 788 Aug 12 16:44 xdir.com
$

OK --full-time is much better, here
$ ls -t --full-time
total 3
-rwx------ 1 USER 392 498 2015-08-12 16:44:10.000000000 -0400 login.com
-rwx------ 1 USER 392 788 2015-08-12 16:44:04.000000000 -0400 xdir.com
$ ls -Ut --full-time
total 3
-rwx------ 1 USER 392 498 2015-08-12 16:44:10.000000000 -0400 login.com
-rwx------ 1 USER 392 788 2015-08-12 16:44:04.000000000 -0400 xdir.com
$ ls "-Ut" --full-time
total 3
-rwx------ 1 USER 392 498 2015-08-12 16:44:10.000000000 -0400 login.com
-rwx------ 1 USER 392 788 2015-08-12 16:44:04.000000000 -0400 xdir.com
$

As far as I know, ls knows about
* ctime (time of last status change): "-c     with -lt: sort by, and
show, ctime"
* mtime (time of last modification): "-t     sort by modification time,
newest first"
* atime (time of last access): "-u     with  -lt:  sort  by, and show,
access time"

It depends on the date mapping, which is used by GNV and/or the CRTL -
and maybe on the file system structure level, as ods5 can be initialized
with an "access date".

But maybe I'm missing something, it wouldn't be the first time :-)




More information about the Info-vax mailing list