Next Question
bash shell will allow you to use wildcards for file names passed to chmod, the command line tool you use to alter permissions.
e.g. if you want to alter the permissions on all the .php files in a directory, changing them to 754 (root:read+write+execute, group:read+execute,user:read)
chmod 754 /directory/files/are/in/*.php
Linux also allows you to chain commands together, using the | symbol, to pass on the results of one command to another, that gives you a lot of flexibility to achieve whatever you desire.
e.g. we can chain the ls (directory listing) command together with chmod:
ls /directory/files/are/in/*.php | xargs chmod 754
Yet another possibility is using the find command to files and the exec argument to tell find to do something to the files:
find /directory/files/are/in -name *.php -exec chmod 754 {} \;
Source(s):
Personal experience, over 10 years of *nix systems support.
Permalink | Report
Answered Question
Best Answer Decided by Votes
| June 20, 2009 05:48 AM | view on twitter |
e.g. if you want to alter the permissions on all the .php files in a directory, changing them to 754 (root:read+write+execute, group:read+execute,user:read)
chmod 754 /directory/files/are/in/*.php
Linux also allows you to chain commands together, using the | symbol, to pass on the results of one command to another, that gives you a lot of flexibility to achieve whatever you desire.
e.g. we can chain the ls (directory listing) command together with chmod:
ls /directory/files/are/in/*.php | xargs chmod 754
Yet another possibility is using the find command to files and the exec argument to tell find to do something to the files:
find /directory/files/are/in -name *.php -exec chmod 754 {} \;
Source(s):
Personal experience, over 10 years of *nix systems support.
Permalink | Report
Voted as best: wdawe
Answer this Question
Related Questions
Ask a Question
Buy Mahalo Dollars with Credit Card or PayPal
Top Members
Most Popular Tags
Categories
- Anonymous
- Arts & Design
- Beauty & Style
- Books & Authors
- Business
- Cars & Transportation
- Consumer Electronics
- Coupons Deals
- Education
- Entertainment
- Environment
- Fitness
- Food & Drink
- From Email
- From Iphone
- From Twitter
- Health
- History
- Hobbies
- Home & Garden
- How Tos
- Humor
- Jobs
- Legal
- Local
- Love & Relationships
- Mahalo Answers Community
- Money
- Music
- News
- NSFW
- Parenting
- Pets
- Science & Mathematics
- Services
- Shopping
- Social Science
- Society & Culture
- Sports
- Technology & Internet
- Travel
- Video Games
Welcome New Members
- tgabor, December 06, 2009 04:12 PM
- thenardman, December 06, 2009 04:11 PM
- marcelablanco, December 06, 2009 04:07 PM
- ces31, December 06, 2009 04:04 PM
- tay69, December 06, 2009 03:58 PM
Mahalo Dollars are the currency of Mahalo Answers.
Each Mahalo Dollar costs $1.
Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More
