NetBSD-Bugs archive

[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: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: misc/40977: /var/backups/work/device.current is overly
        sensitive to ls(1) columnar alignment
Date: Mon, 7 Sep 2009 19:38:14 +0000

 On Mon, Aug 03, 2009 at 03:05:10PM +0000, Taylor R Campbell wrote:
  >  Perhaps find(1) should be extended with an option to set the `ls(1)
  >  flags' that it uses (emulates) for `find -ls', which is faster than
  >  either `find -exec ls' or xargs(1).
 
 Or perhaps ls should have a flag that disables the automatic column
 sizing.
 
 Another approach is to forcibly set the column widths...  or just
 prune all column padding.
 
 The former isn't entirely trivial because there are a lot of cases.
 
 The latter would give something like
 
               -type b -o -type c \) -print0 | \
    -   xargs -0 ls -ldgTq | sort +9 > $LIST
    +   xargs -0 ls -ldgTq | sed 's/  */ /g' | sort +9 > $LIST
 
 although looking at this I am starting to have real doubts about that
 sort +9. It sorts the regular files and directories by name, but the
 devices by year...
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index