The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-27-2001
Registered User
 

Join Date: Nov 2001
Location: India
Posts: 3
Stumble this Post!
Thumbs up changing file permissions

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
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0