[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/40977: /var/backups/work/device.current is overly sensitive to ls(1) columnar alignment
The following reply was made to PR misc/40977; it has been noted by GNATS.
From: Alan Barrett <apb%cequrux.com@localhost>
Subject: Re: misc/40977: /var/backups/work/device.current is overly
sensitive to ls(1) columnar alignment
Date: Tue, 8 Sep 2009 11:11:45 +0200
On Mon, 07 Sep 2009, David Holland wrote:
> > find -s ... -ls-with-options -ldgTqnb
> > and eliminate the xargs and sort.
> That seems like a lot of arbitrary grossness to wedge into find just
> for a small optimization to the nightly maintenance script. Each
> program should do one thing well...
The general form of -ls-with-options is gross, but I do think that
there's a place for something like the existing "-ls" except with full
time display (like "ls -lT") and with escaping of problematic characters
(like "ls -b").
> I think adding s/, */,/ should be enough to take care of the sort
"find -s" is even easier, so I think we should do that anyway.
> Anyone have thoughts on the column spacing part?
The main reason behind my suggestion to use "find -ls" was that it
provides consistent column spacing. I see that I neglected to mention
that in my message yesterday, but I did mention it in my message soon
after the PR was created. The main reason why plain "find -ls" is
not good enough is that it switches between displaying the year or
displaying the time of day, according to how old the file is.
We could use an awk script to reformat the output with fixed column
We could add yet another ls option to give fixed column widths; I see
that some letters of the alphabet remain unused for ls(1) options.
--apb (Alan Barrett)
Main Index |
Thread Index |