“Linux 文件属性”的版本间的差异
		
		
		
		
		
		跳到导航
		跳到搜索
		
				
		
		
	
Jihongchang(讨论 | 贡献)  | 
				Jihongchang(讨论 | 贡献)   | 
				||
| 第58行: | 第58行: | ||
==== owner、group、others 和 read、write、execute ====  | ==== owner、group、others 和 read、write、execute ====  | ||
| + | {| class="wikitable"  | ||
| + | |r  | ||
| + | | colspan="3" |read  | ||
| + | |-  | ||
| + | |w  | ||
| + | | colspan="3" |write  | ||
| + | |-  | ||
| + | |x  | ||
| + | | colspan="3" |execute  | ||
| + | |}  | ||
2024年7月17日 (三) 22:50的版本
[root@iZ8vbcjkeqbrdmmbt23vboZ ~]# ls -al
total 9712172
dr-xr-x---. 11 root root         4096 Jul 16 10:22 .
dr-xr-xr-x. 18 root root         4096 Nov 29  2021 ..
drwxr-xr-x   2 root root         4096 Jan 28  2023 9194654_www.jihongchang.top_apache
-rw-r--r--   1 root root         5260 Jan 28  2023 9194654_www.jihongchang.top_apache.zip
-rwxr--r--   1 root root         2172 Feb 10  2023 backup.sh
-rw-------   1 root root        42508 Jul 16 15:08 .bash_history
-rw-r--r--.  1 root root           18 Dec 29  2013 .bash_logout
-rw-r--r--.  1 root root          176 Dec 29  2013 .bash_profile
……
以
-rwxr--r--   1 root root         2172 Feb 10  2023 backup.sh
为例
文件的类型与权限
“-rw-r--r--”表示这个文件的类型与权限,共10个字符,是4个部分:
| 文件类型 | 文件所有者的权限
 owner  | 
文件所属用户组的权限
 group  | 
其他人对此文件的权限
 others  | ||||||
|---|---|---|---|---|---|---|---|---|---|
| - | r | w | - | r | - | - | r | - | - | 
文件类型
| - | 文件 | 
| d | directory,目录 | 
| l | linkfile,链接文件 | 
| b | 设备文件里面的可供存储的接口设备 | 
| c | 设备文件里面的串行端口设备,如键盘、鼠标 | 
owner、group、others 和 read、write、execute
| r | read | ||
| w | write | ||
| x | execute | ||