* chown-oddities?
@ 1994-11-10 8:56 Eberhard Heuser-Hofmann
1994-11-10 21:26 ` chown-oddities? Peter da Silva
1994-11-11 15:34 ` chown-oddities? Paul Southworth
0 siblings, 2 replies; 4+ messages in thread
From: Eberhard Heuser-Hofmann @ 1994-11-10 8:56 UTC (permalink / raw)
Hi,
I'm not sure if it's a feature of chown or a bug of OSF/1 V3.0:
chown -R "newowner" *
modifies the ownership of all files to "newowner" exept of all .xxx file , i.e. .login.
But:
chown -R "newowner" .*
runs through all files beginning from /rooted-dir!
Remark: why is there no verbose-option in chown to see what happens?
Eberhard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: chown-oddities?
1994-11-10 8:56 chown-oddities? Eberhard Heuser-Hofmann
@ 1994-11-10 21:26 ` Peter da Silva
1994-11-11 15:34 ` chown-oddities? Paul Southworth
1 sibling, 0 replies; 4+ messages in thread
From: Peter da Silva @ 1994-11-10 21:26 UTC (permalink / raw)
In article <39sn7h$gjl@hermes.uni-konstanz.de>,
Eberhard Heuser-Hofmann <vaxinf@chclu.chemie.uni-konstanz.de> wrote:
> I'm not sure if it's a feature of chown or a bug of OSF/1 V3.0:
It's neither. It's an inevitable result of the file system design.
".*" expands to "all files beginning with "." which expands to ". .. .cshrc
.login ...". Then "chown -r" takes each of these files and recursively chowns
everything it finds.
So it looks at "." and does ". ./* ./*/* ..."
Then it looks at ".." and does "../ ../* ../*/* ..."
By now you've chowned everything from the parent directory to "." onwards.
> Remark: why is there no verbose-option in chown to see what happens?
"find $args -print" will do that...
I generally assume I don't have anything named ".a .b .c ..." and use ".??*".
--
Peter da Silva `-_-'
Network Management Technology Incorporated 'U`
1601 Industrial Blvd. Sugar Land, TX 77478 USA
+1 713 274 5180 "Hast Du heute schon Deinen Wolf umarmt?"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: chown-oddities?
1994-11-10 8:56 chown-oddities? Eberhard Heuser-Hofmann
1994-11-10 21:26 ` chown-oddities? Peter da Silva
@ 1994-11-11 15:34 ` Paul Southworth
1994-11-12 1:13 ` chown-oddities? Phil Knaack
1 sibling, 1 reply; 4+ messages in thread
From: Paul Southworth @ 1994-11-11 15:34 UTC (permalink / raw)
In article <39sn7h$gjl@hermes.uni-konstanz.de>,
Eberhard Heuser-Hofmann <vaxinf@chclu.chemie.uni-konstanz.de> wrote:
>I'm not sure if it's a feature of chown or a bug of OSF/1 V3.0:
Welcome to unix! "chown" is working just fine and OSF/1's chown is
not buggy as far as I know. comp.unix.shell and comp.unix.questions are
good places to ask these types of questions -- your question is not
specific to OSF/1 at all.
>chown -R "newowner" *
>
>modifies the ownership of all files to "newowner" exept of all .xxx file , i.e. .login.
>
>But:
>
>chown -R "newowner" .*
>
>runs through all files beginning from /rooted-dir!
Yep, because that's what you just told it to do. "." is the current
directory, and ".." is the parent directory, so ".*" matches all dot-files
in the current directory, plus all of the parent directory. There are
fairly easy ways around this. First, this will decend through all
directories in the current directory (including the current directory itself)
and chown all files (not directories) that match .*
find . -type f -name ".*" -exec chown newowner {} \;
Or this can be used to avoid matching "..". It will also fail to match
any files starting with "." that have names of only two characters:
chown -R newowner .??*
Of course, if you really want to just chown all of the contents of
a directory, just do:
( cd .. ; chown -R newowner directoryname )
>Remark: why is there no verbose-option in chown to see what happens?
Because you didn't write it yet, and nobody else saw the need. You can
get sources to chown on prep.ai.mit.edu:/pub/gnu/fileutils-3.12.tar.gz.
Then you can hack in whatever additional output you think it should have.
--
Paul Southworth
CICNet Systems Support
pauls@cic.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: chown-oddities?
1994-11-11 15:34 ` chown-oddities? Paul Southworth
@ 1994-11-12 1:13 ` Phil Knaack
0 siblings, 0 replies; 4+ messages in thread
From: Phil Knaack @ 1994-11-12 1:13 UTC (permalink / raw)
In <3a02uf$grq@spruce.cic.net>
pauls@locust.cic.net (Paul Southworth) writes:
>( cd .. ; chown -R newowner directoryname )
why not just
chown -R newowner .
i know, knit-picking .. :)
>--
>Paul Southworth
>CICNet Systems Support
>pauls@cic.net
Cheers,
Phil
--
Phil Knaack flipk@iastate.edu
WGA, Sociology Department Student Development Group flipk@cs.iastate.edu
Iowa State University Project Vincent, ISU flipk@vorpal.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1994-11-12 1:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-11-10 8:56 chown-oddities? Eberhard Heuser-Hofmann
1994-11-10 21:26 ` chown-oddities? Peter da Silva
1994-11-11 15:34 ` chown-oddities? Paul Southworth
1994-11-12 1:13 ` chown-oddities? Phil Knaack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox