Seems like chown with the recursive flag will not work on hidden directories or files. Is there any simple workaround for that?
How to Chown a directory recursively including hidden files or directories
chownunix
chownunix
Seems like chown with the recursive flag will not work on hidden directories or files. Is there any simple workaround for that?
Best Answer
I'm pretty sure the
-R
flag does work - it always has for me anyway. What won't work, and what tripped me up early in my command line usage, is using*
in a directory with hidden files/directories. So doingwill not do the hidden files and directories. However if you follow it with
then you will do all the hidden files, (but not
.
or..
as/home/user/.*
would do). Having said all that, I would expectto get all the hidden files and directories inside
/home/user
- though that will of course also change the permissions of the directory itself, which might not be what you intended.