chown -R owner:group dir/*
doesn't change hidden files and directories that begin with '.'.
chown -R owner:group dir/.*
seems to recursively change hidden files and directories but also changes dir/../*
which I don't want to happen. How do I recursively change only all files under dir
?
Asked
Active
Viewed 735 times
0

Paul Dubuc
- 11
chown -hR owner:group dir
- does that work? – kanehekili Jul 14 '22 at 20:46dir
itself) then you may find the bash shell'sdotglob
option useful - see for example Execute commands on hidden files – steeldriver Jul 14 '22 at 20:59