Mon, 15 Nov 2004
ch{mod,grp,own} --reference=file
It never fails to surprise me how I can use a program almost every day
and yet still stumble on to previously undiscovered options.
Yesterday I discovered the '--reference=file' option while reading the
manpage for chmod. When used this option takes the current permissions of
the specified file and applies them to the other files specified on the
command line. It's also accepted by chgrp and chown.
Note: If you're going to use this in production please consider the potential race condition.
Like this post? - Digg Me! | Add to del.icio.us! | reddit this!
Posted: 2004/11/15 23:46 | /tools/commandline | Permanent link to this entry | This entry and same date

