Jim Meyering wrote: > While writing a few tests for userspec (below), I was surprised to > re-learn that chown USER_NAME: has a special meaning. It is a > shorthand for chown USER_NAME:+$(id -g USER_NAME) ... > I had expected it to be equivalent to this: > chown USER_NAME ...
I use it quite often. It is a convenient shorthand. > Since the above behavior is not specified by POSIX, and > is IMHO, counter-intuitive, I propose to change it. However, > it is documented both in coreutils and in cpio's manuals. I disagree about it not being intuitive. I think it is a very intuitive use of a default value for the group when the group is not specified. > Here's the patch, followed by the coreutils part, > but I suppose I can't really apply them as-is. > Rather, I may make "chown USER_NAME: ..." warn-for-now yet > continue to work and "chown NUMERIC: ..." work like "chown NUMERIC ...". > Then, in say two years, I'd make the actual change. I would prefer not to remove this very useful feature. Of course I find it useful because I use it quite often. But I understand that if it isn't standard then we should remove it from the tool. Bob