2019-02-26 03:09:08 +00:00
|
|
|
|
# chflags
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
> 更改文件或文件夹的标志。
|
2019-02-26 03:09:08 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 给文件设置 hidden(隐藏)标签:
|
2019-02-26 03:09:08 +00:00
|
|
|
|
|
|
|
|
|
`chflags {{hidden}} {{文件路径}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 取消文件的 hidden 标签:
|
2019-02-26 03:09:08 +00:00
|
|
|
|
|
|
|
|
|
`chflags {{hidden}} {{文件路径}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 递归地给文件夹中每个文件设置 uchg 标志:
|
2019-02-26 03:09:08 +00:00
|
|
|
|
|
|
|
|
|
`chflags -R {{uchg}} {{文件夹路径}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 递归地撤销文件夹中每个文件设置的 uchg 标志:
|
2019-02-26 03:09:08 +00:00
|
|
|
|
|
|
|
|
|
`chflags -R {{nouchg}} {{文件夹路径}}`
|