[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: null separated ls output option
From: |
Kaz Kylheku (Coreutils) |
Subject: |
Re: null separated ls output option |
Date: |
Wed, 28 Jun 2017 10:13:07 -0700 |
User-agent: |
Roundcube Webmail/0.9.2 |
On 28.06.2017 06:53, address@hidden wrote:
On 2017-06-01 04:45, Pádraig Brady wrote:
On 31/05/17 15:24, address@hidden wrote:
Existing tools like find(1) were thought sufficient
but find does not support sorting by date which ls does.
I hope this patch can be reconsidered for inclusion.
Rather than the obvious: patching find so that it supports sorting the
paths
by date, or other properties?
This could be a "-sort <spec>" predicate, which is understood to be like
"-print", except it sends the visited node into a sorting bucket, which
is spilled when find finishes executing. Sort buckets are identified by
the "<spec>" syntax as a key, so multiple occurrences of the predicate
giving the same <spec> go to the same bucket. Multiple occurrences of
-sort
with different keys route to different buckets; these buckets can be
later dumped in left to right order, based on the position of the
leftmost predicate which specifies each bucket.
<spec> could use + and - as prefixes for ascending and descending
(defaulting
to + if omitted) followed by a word which is derived from the space of
predicates:
atime, ctime, name, iname, ...
Comma separation for compound keys? -sort mtime,name
Something like that.