![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing /cn@0:console file permissions | ErnieG | Security | 4 | 12-04-2007 04:39 AM |
| changing permissions on a 444 file (ie chmod 444) | ajcannon | UNIX for Dummies Questions & Answers | 1 | 08-31-2007 07:48 AM |
| Changing file permissions | FredSmith | UNIX for Dummies Questions & Answers | 7 | 05-17-2006 05:15 AM |
| changing default file permissions | FredSmith | UNIX for Dummies Questions & Answers | 8 | 12-27-2005 10:16 AM |
| Changing file permissions on upload | guix | UNIX for Advanced & Expert Users | 6 | 07-13-2004 01:37 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Use the following to Change permission of fileB (fileB could be fileB*) to change its permission same as the permission of fileA.
chmod `ls -l fileA | awk '{pr int "u+", substr($1,2,1), substr($1,3,1), substr($1,4,1), ",g+", substr($1,5,1), substr($1,6,1), substr($1,7,1), ",o+", substr($1,8,1), substr($1,9,1), substr($ 1,10,1)}' | sed 's/-//g' | sed 's/ //g'` fileB
__________________
Gagan |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|