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 23:27:00 +0000

 On Mon, Sep 07, 2009 at 08:40:06PM +0000, Alan Barrett wrote:
  >>  Not to mention the problems of spaces in user/group names and odd
  >>  characters in filenames.
 
 Because the file name is last, it doesn't really matter unless one
 turns up with a \n in it. But since this is /dev, that shouldn't
 happen and if it does the resulting lossage will encourage the
 sysadmin to clean it up. So I'm not worried about that. Then again,
 adding -b to the ls won't hurt either.
 
 I'm inclined to say that anyone who uses spaces in user and group
 names deserves the consequences.
 
 Ultimately it doesn't really matter if the sort is meaningful as long
 as it's consistent. Note how long we've been sorting devices by
 last-modified-year without anyone noticing or caring.
 
  >>  So maybe 'ls -nb' should be used.
  >>  (Netbsd's ls only seems to have gained -b recently!)
  >  
  >  What about extending "find -ls" to take options?  I mean, adding a new
  >  primary to find(1) that works a lot like "-ls" but takes options.  Then
  >  ew could use
     ^^
 freudian slip there? :-)
 
  >     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...
 
 I think adding s/,  */,/ should be enough to take care of the sort
 problem.
 
 Anyone have thoughts on the column spacing part?
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index