[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkdir owner:group option
From: |
Jim Meyering |
Subject: |
Re: mkdir owner:group option |
Date: |
Tue, 10 Mar 2009 10:54:49 +0100 |
Pádraig Brady wrote:
> Caleb Cushing wrote:
>> be awesome if mkdir had a way to specify the user:group ownership
>> being made. given this would be limited by perms. but as root it could
>> be good.
>>
>> just throwing it out there.
>
> Perhaps a simple wrapper around install would be better?
>
> mkudir() { u="$1"; g="$2"; shift 2; install -d -o$u -g$g "$@"; }
For the record, you can (and IMHO should; less syntax is better) avoid
quoting a simple $var on the RHS, and you must double-quote _uses_ of
variables like $u and $g that may potentially contain meta-characters:
mkudir() { u=$1; g=$2; shift 2; install -d -o"$u" -g"$g" "$@"; }
- mkdir owner:group option, Caleb Cushing, 2009/03/10
- Re: mkdir owner:group option, Pádraig Brady, 2009/03/10
- Re: mkdir owner:group option,
Jim Meyering <=
- Re: mkdir owner:group option, Mike Frysinger, 2009/03/10
- Re: mkdir owner:group option, Jim Meyering, 2009/03/10
- Re: mkdir owner:group option, Mike Frysinger, 2009/03/10
- Re: mkdir owner:group option, Pádraig Brady, 2009/03/10
- Re: mkdir owner:group option, Mike Frysinger, 2009/03/10
Re: mkdir owner:group option, Jim Meyering, 2009/03/10