NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/2689 ([dM] chmod(1)/setmode(3) symbolic mode improvement)



The following reply was made to PR bin/2689; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/2689 ([dM] chmod(1)/setmode(3) symbolic mode improvement)
Date: Wed, 27 Aug 2014 19:35:02 +0000

 Because of the interaction with getopt I don't think this is a good
 idea even as an extension.
 
 There's also a standards-compliant way to get the same effect now:
 
    chmod `stat -f '%Lp' file` other-file
 
 Granted it's a bit ugly, and stat(1) shouldn't need to exist, but
 given that ls output is allowed to (and does) vary arbitrarily with
 locale it's more or less necessary. It might have been better if this
 had been handled differently by POSIX but at this point the ship's
 sailed.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index