add more detail link on chmod command

This commit is contained in:
Adnan Ahmed 2017-04-24 22:57:03 +04:00 committed by GitHub
parent 15a44de8ea
commit 4329a7352f
1 changed files with 1 additions and 28 deletions

View File

@ -116,37 +116,10 @@ cat < file1 > file2 #copy file1 to file2
```
### b. `chmod`
Lets you change the read, write, and execute permissions on your files.
Lets you change the read, write, and execute permissions on your files. For more information on this command check this [link](https://ss64.com/bash/chmod.html).
```bash
chmod -options filename
```
Syntax : (for numericals role assignment)
```bash
chmod nnn /path/to/file
```
Where n is number from 0 to 7
<ul>Here,
<li>First number is for Owner</li>
<li>Second number is for group</li>
<li>Third number is for Other</li>
</ul>
<b>Following number are used for permissions</b></br>
0 - no permissions</br>
1 - execute</br>
2 - write</br>
3 - write and execute</br>
4 - read</br>
5 - read and execute</br>
6 - read and write</br>
7 - read, write and execute.</br>
For example to provide full access to only Owner
```bash
chmod 700 path/to/file
```
### c. `cp`
Copies a file from one location to other.