mirror of
https://github.com/Idnan/bash-guide.git
synced 2018-11-09 02:29:39 +01:00
parent
d85384a847
commit
15a44de8ea
1 changed files with 27 additions and 0 deletions
27
README.md
27
README.md
|
@ -120,6 +120,33 @@ Lets you change the read, write, and execute permissions on your files.
|
|||
```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.
|
||||
|
|
Loading…
Reference in a new issue