chown, chgrp an entire directoy and contents
Is it possible to chown, chgrp and chmod an entire directory and all subdirectories and files in one fell swoop (or three)? If so, please point me to the right man page or "how to."
|
Code:
chown -R USER:GROUP DIRECTORY |
Welcome to LQ.
Just add the "-R" option to your commands. You can chown and chgrp at once with: chmod -R USER:GROUP /path/to/dir |
Thanks a ton! The -R worked just fine.
|
No problem. Just for future reference, "an entire directory and contents" is generally referred to as "recursive". In cases like this, you can use that and the man pages to avoid having to wait for replies from us.
|
Thanks for the info. Waiting for answers from you all was quicker than wading through the book I finally located. Some idiot stole my RedHat manual!
|
LOL. Well, try wading through 'man chown', 'man chmod', etc. :) I'm not criticizing you for coming here, just suggesting that you can save yourself some time in some cases.
|
Followup Question
Quote:
Steve |
Yes..
the easiest way is to give * with the command ex- #chmod perms * |
All times are GMT -5. The time now is 08:32 PM. |