parent
f500aae1e7
commit
05dae25ae7
@ -147,7 +147,7 @@ REF_LABEL=网站首页
|
|||||||
- [linzhe.top](https://linzhe.top/)
|
- [linzhe.top](https://linzhe.top/)
|
||||||
- [xushanxiang.com](https://xushanxiang.com/ref/)
|
- [xushanxiang.com](https://xushanxiang.com/ref/)
|
||||||
- [winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)
|
- [winnerzr01.github.io](https://winnerzr01.github.io/Quick-Reference/index.html)
|
||||||
- [hestudio.org](https://quickref.hestudio.org)
|
- [quickref.hestudio.net](https://quickref.hestudio.net)
|
||||||
- [surcode.cn](https://ref.surcode.cn)
|
- [surcode.cn](https://ref.surcode.cn)
|
||||||
- [cms.im](https://quickref.cms.im/)
|
- [cms.im](https://quickref.cms.im/)
|
||||||
- [nuomiphp.com](https://reference.tool.nuomiphp.com/)
|
- [nuomiphp.com](https://reference.tool.nuomiphp.com/)
|
||||||
|
@ -37,6 +37,7 @@ Quick Reference
|
|||||||
[Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44);&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?-->
|
[Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44);&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?-->
|
||||||
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=contributing-->
|
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=contributing-->
|
||||||
[Github Copilot](./docs/github-copilot.md)<!--rehype:style=background: rgb(125 45 220);&class=tag contributing&data-lang=AI&data-info=👆看看还缺点儿什么?-->
|
[Github Copilot](./docs/github-copilot.md)<!--rehype:style=background: rgb(125 45 220);&class=tag contributing&data-lang=AI&data-info=👆看看还缺点儿什么?-->
|
||||||
|
[Chown](./docs/chown.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
|
||||||
<!--rehype:class=home-card-->
|
<!--rehype:class=home-card-->
|
||||||
|
|
||||||
## 编程
|
## 编程
|
||||||
@ -146,6 +147,7 @@ Quick Reference
|
|||||||
[Cargo](./docs/cargo.md)<!--rehype:style=background: rgb(71 71 71);&class=tag&data-lang=Rust-->
|
[Cargo](./docs/cargo.md)<!--rehype:style=background: rgb(71 71 71);&class=tag&data-lang=Rust-->
|
||||||
[Curl](./docs/curl.md)<!--rehype:style=background: rgb(16 185 129);-->
|
[Curl](./docs/curl.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||||
[Chmod](./docs/chmod.md)<!--rehype:style=background: rgb(16 185 129);-->
|
[Chmod](./docs/chmod.md)<!--rehype:style=background: rgb(16 185 129);-->
|
||||||
|
[Chown](./docs/chown.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
|
||||||
[Cron](./docs/cron.md)<!--rehype:style=background: rgb(239 68 68);-->
|
[Cron](./docs/cron.md)<!--rehype:style=background: rgb(239 68 68);-->
|
||||||
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
|
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
|
||||||
[Make](./docs/make.md)<!--rehype:style=background: rgb(99 99 99);&class=contributing-->
|
[Make](./docs/make.md)<!--rehype:style=background: rgb(99 99 99);&class=contributing-->
|
||||||
|
1
assets/chown.svg
Normal file
1
assets/chown.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg viewBox="0 0 1024 1024" version="1.1" fill="currentColor" xmlns="http://www.w3.org/2000/svg" height="1em" width="1em"><path d="M912.9 130.6c-26.1 4.5-52.8 6.9-80.2 6.9-115.4 0-221.1-41.9-302.6-111.2-10.6-9-26.2-9-36.8 0-81.5 69.4-187.2 111.2-302.6 111.2-27 0-53.5-2.3-79.2-6.7-17.2-2.9-32.9 10.4-33 27.9-0.2 109.1-0.4 238.1-0.4 242.5 0 471 394.5 592.7 431 603 1.8 0.5 3.6 0.5 5.4 0C550.9 994 943 873 945.5 405.7l0.4-247c0-17.6-15.8-31.1-33-28.1zM546 568.9v154.5c0 18.8-15.2 34-34 34s-34-15.2-34-34V568.9c-68.2-15.5-119.1-76.4-119.1-149.3 0-84.5 68.5-153.1 153.1-153.1S665.1 335 665.1 419.6c0 72.9-50.9 133.9-119.1 149.3z"></path></svg>
|
After Width: | Height: | Size: 640 B |
56
docs/chown.md
Normal file
56
docs/chown.md
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
Chown 备忘清单
|
||||||
|
===
|
||||||
|
|
||||||
|
这份快速参考备忘单提供了改变文件或目录的所有者的简要概述,以及 chown 命令的操作
|
||||||
|
|
||||||
|
入门
|
||||||
|
--------
|
||||||
|
|
||||||
|
### 介绍
|
||||||
|
|
||||||
|
"chown"是Linux/Unix系统中的一个命令,全称为"change owner",用于改变文件或目录的所有者。这个命令可以更改某个文件或目录的属主(owner),也可以同时更改其属组(group)。
|
||||||
|
|
||||||
|
**注意:只有超级用户(root)才有权限改变文件或目录的所有者。**
|
||||||
|
|
||||||
|
### 用法
|
||||||
|
|
||||||
|
```shell
|
||||||
|
chown [选项] [所有者][:[组]] 文件或目录名
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 选项
|
||||||
|
|
||||||
|
- `-c` : 显示更改的部分的信息
|
||||||
|
- `-f` : 忽略错误信息
|
||||||
|
- `-h` :修复符号链接
|
||||||
|
- `-v` : 显示详细的处理信息
|
||||||
|
- `-R` : 处理指定目录以及其子目录下的所有文件
|
||||||
|
- `--help` : 显示辅助说明
|
||||||
|
- `--version` : 显示版本
|
||||||
|
|
||||||
|
示例
|
||||||
|
--------
|
||||||
|
|
||||||
|
### 把 /var/run/httpd.pid 的所有者设为 root
|
||||||
|
|
||||||
|
```shell
|
||||||
|
chown root /var/run/httpd.pid
|
||||||
|
```
|
||||||
|
|
||||||
|
### 将文件 file1.txt 的拥有者设为 username ,群体的使用者设为 groupname
|
||||||
|
|
||||||
|
```shell
|
||||||
|
chown username:groupname file1.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
### 将当前目录以及子目录的所有文件的拥有者设为 username ,群体的使用者设为 groupname
|
||||||
|
|
||||||
|
```shell
|
||||||
|
chown -R username:groupname *
|
||||||
|
```
|
||||||
|
|
||||||
|
### 不修改文件 file1.txt 的拥有者,将文件使用群体改为 groupname
|
||||||
|
|
||||||
|
```shell
|
||||||
|
chown :groupname file1.txt
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user