chmod-changes the permissions mode of a file

 <  Day Day Up  >  

chmod ”changes the permissions mode of a file

 chmod [ fR ] mode filename... chmod [ugoa ]{ +    = }[ rwxlsStTugo] filename... 

chmod changes or assigns the mode of a file. The mode of a file specifies its permissions and other attributes. The mode may be absolute or symbolic.

Example A.10.
 1   chmod +x script.file 2   chmod u+x,g-x file 3   chmod 755 * 

EXPLANATION

  1. Turns on execute permission for user , group , and others on script.file .

  2. Turns on execute permission for user, and removes it from group on file .

  3. Turns on read, write, and execute for the user, read and execute for the group, and read and execute for others on all files in the current working directory. The value is octal (111 101 101).

     rwxxr-xr-x 

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net