'chown' and hidden directories
Bill Davidson
davidsonster
Sun Feb 20 15:14:08 PST 2005
On Thu, 17 Feb 2005 13:23:10 -0600, Michael Hipp <Michael at hipp.com> wrote:
> How do you get chown to do hidden directories?
>
> If I have a directory tree with a bunch of stuff in it and I want to
> change the ownership of it all I thought to do:
>
> chown -R michael: *
>
> But this does everything except hidden ".foo" directories. Is there some
> simple construct that will cause chown to hit all files and directories
> including hidden ones?
I think the dotglob bash option would work. If you did "set -o dotglob" before
the chown, hidden files would be found using glob expressions. Then do "set +o
dotglob" if you want to undo it. I just came across this today.
Bill
More information about the Linux-users
mailing list