Tuesday, June 17, 2008

chmod

This command is used to change the permissions of a file or directory. For example to make a file essay.001 readable by everyone, we do this:

   % chmod a+r essay.001 

To make a file, e.g., a shell script mycommand executable, we do this

   % chmod +x mycommand 
Now we can run mycommand as a command.

To check the permissions of a file, use ls -l . For more information on chmod, use man chmod.

No comments: