View Single Post
Old 06-18-2015, 02:27 PM   #34
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@GeoffR:

OS X's chmod version doesn't seem to support the reference flag, so I'd go with a stat+chmod combo, something like:

Code:
chmod $(stat -f %Lp OLDFILE) NEWFILE
(And, yes, stat is also wildly different from the Linux version, where that would look like stat -c %a OLDFILE)

Last edited by NiLuJe; 06-18-2015 at 02:29 PM. Reason: %a doesn't include the sticky bits, so kill the %Mp from the OS X example to make them match
NiLuJe is offline   Reply With Quote