Re: Chown script

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

 



On Thu, Oct 21, 2004 at 05:24:48PM +0200, Franco wrote:

> Sorry,
> i do an example, i have 2 folder in the same parent folder,
> pippo and pippo1 these have as owner and group pippo and pippo.
> I need to change just the owner in pippo.pippo and pippo1.pippo

A minor caution.

There is a push (by some, not me) to make dotted users names more
common "first.last".   

Thus it is a good habit to use the : not the . notation for chown.
Both are currently correct "chown UID:GID file" and  "chown UID.GID file"
but long term plan on dotted user names when scripting.

i.e.
	chown -r boss.hog:xthug ~boss.hog

It is unclear to me what happens to all the permutations if you have
two users (boss and boss.hog) and two groups (hog and xthug).

	chown -r boss.hog:xthug ~boss.hog
	chown -r boss.hog:hog	~boss.hog
	chown -r boss.hog	~boss.hog
	chown -r boss:hog	~boss.hog
	....?

Is the below broken?  What would a script do?

	chown -r boss.hog.hog	~boss.hog  

Back to the topic....

So for two users (pippo1, pippo) and one group (pippo).....
If you want to change all the files in and under a dir
I think you need something like:

    chown -r  pippo:pippo  pippo
    chown -r  pippo1:pippo pippo1


-- 
	T o m  M i t c h e l l 
	May your cup runneth over with goodness and mercy
	and may your buffers never overflow.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux