chown:更改文件或目录的用户和用户组
简介chown命令用于改变文件或目录的用户或用户组
说明
chown命令用于改变文件或目录的用户或用户组
格式
chown [option] [用户].[用户组] [file]
常用格式:
- chown 用户 文件或目录
- chown :用户组 文件或目录
- chown 用户:用户组 文件或目录
注意:”:”可以使用”.”代替
常用参数
- -R:递归更改目录的用户和用户组
[root@localhost dir1]# ll
total 0
----------. 1 root root 0 May 7 22:34 test1.txt
----------. 1 root root 0 May 7 22:34 test2.txt
----------. 1 root root 0 May 7 22:34 test3.txt
[root@localhost dir1]# chown skip test1.txt #更改文件的用户
[root@localhost dir1]# ll
total 0
----------. 1 skip root 0 May 7 22:34 test1.txt
----------. 1 root root 0 May 7 22:34 test2.txt
----------. 1 root root 0 May 7 22:34 test3.txt
[root@localhost dir1]# chown .skip test2.txt #更改文件的用户组
[root@localhost dir1]# ll
total 0
----------. 1 skip root 0 May 7 22:34 test1.txt
----------. 1 root skip 0 May 7 22:34 test2.txt
----------. 1 root root 0 May 7 22:34 test3.txt
[root@localhost dir1]# chown skip.skip test2.txt #更改文件的用户和用户组
[root@localhost dir1]# ll
total 0
----------. 1 skip root 0 May 7 22:34 test1.txt
----------. 1 skip skip 0 May 7 22:34 test2.txt
----------. 1 root root 0 May 7 22:34 test3.txt
[root@localhost dir1]# chown -R root.root ./* #递归更改文件的用户和用户组
[root@localhost dir1]# ll
total 0
----------. 1 root root 0 May 7 22:34 test1.txt
----------. 1 root root 0 May 7 22:34 test2.txt
----------. 1 root root 0 May 7 22:34 test3.txt
网页扫描二维码库:Html5-Qrcode,官网地址:https://scanapp.org/html5-qrcode-docs/
tail命令用于显示文件内容的尾部,默认显示文件的最后10行
Go-Micro rpc调用注册的服务
在使用电脑的过程中,我们经常需要一些工具来帮助我们提高工作效率,本文主要记录生活中日常能提高工作效率的小工具和简要的使用说明,以便后期使用需要。
快速生成表格
Electron页面跳转、浏览器打开链接和打开新窗口
在使用Git的过程中,不想每次都输入用户名和密码去拉取代码,所以就需要保存这些信息,那么既然有保存了,就必须有清除功能。
在Mac电脑中,如何对Git的用户名和密码进行修改呢?起初不懂Mac,所以整了很久,本文将记录如何对这个进行操作,以便后期使用。
Docker编译镜像出现:fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.12/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.2c4ac24e.tar.gz: No such file or directory问题