AIXThis forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
"find . -type f -print | xargs chmod 444 "shoud work, isn't it ?
If not, find . -print >myfile.sh
and vi myfile.sh removing the directories (they should not be soo many), and then
and sh myfile.sh.
I know, the vi way is not very clever, but it works without thinking more than two seconds, so why not ?
I'm not sure if it's available everywhere, but on some versions of find at least you can replace the final semicolon with a plus sign, in which case it will act in a way similar to xargs. That is, it will run only one or a few instances of the command, with all the files from find built into a single argument.
So I went trawling the web for an elegant and simple solution to this and decided to write a little script for this myself.
It basically does the recursive chmod but also provides a bit of flexibility for command line options (sets directory and/or file permissions, or exclude both it automatically resets everything to 755-644). It also checks for a few error scenarios.