Saturday, April 26, 2014

chmod


chmod command examples

chmod command is used to change the permissions for a file or directory.


Give full access to user and group (i.e read, write and execute ) on a specific file.

$ chmod ug+rwx file.txt

Revoke all access for the group (i.e read, write and execute ) on a specific file.

$ chmod g-rwx file.txt

Apply the file permissions recursively to all the files in the sub-directories.

$ chmod -R ug+rwx file.txt




Related Posts:

  • ping   ping command example  Ping a remote host by sending only 5 packets. $ ping -c 5 gmail.com … Read More
  • rpm   rpm command example   To install apache using rpm. # rpm -ivh httpd-2.2.3-22.0.1.el5.i386.rpm To upgrade apache using rpm. # rpm -uvh httpd-2.2.3-22.0.1.el5.i386.rpm To uninstall/remove apache using rp… Read More
  • ps    ps command examples ps command is used to display information about the processes that are running in the system. While there are lot of arguments that could be passed to a ps command, following are some o… Read More
  • pwd   pwd command  pwd is Print working directory. What else can be said about the good old pwd who has been printing the current directory name for ages. … Read More
  • passwd   passwd command examples Change your password from command line using passwd. This will prompt for the old password followed by the new password. $ passwd Super user can use passwd command to reset others pa… Read More

0 comments:

Post a Comment