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
在使用Laravel中如果要进行复杂的查询,那么通过模型中的函数来查询是不行的,所以本文主要记录如何通过aggregate来进行复杂的查询。
无向图(Undirected Graph)
这里收集一些好用的Golang的第三方库,供后期能快速进行查找使用,持续进行更新...
fsck命令用于检查并修复文件系统中的错误,即针对有问题的系统或磁盘进行修复。
快速生成表格
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问题