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
在使用Git的过程中,不想每次都输入用户名和密码去拉取代码,所以就需要保存这些信息,那么既然有保存了,就必须有清除功能。
PHP中使用Skywalking
ip命令是iproute软件包中的一个强大的网络配置工具,用于显示和管理Linux系统的路由、网络设备、策略路由和隧道。Centos7推荐使用ip命令代替传统的ipconfig和route[该命令我们没有进行说明,需要学习的请参考网上资料]命令。
Flutter的第一个程序“Hello World”
快速生成表格
Electron页面跳转、浏览器打开链接和打开新窗口
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问题
在Mac电脑中,如何对Git的用户名和密码进行修改呢?起初不懂Mac,所以整了很久,本文将记录如何对这个进行操作,以便后期使用。