檔案類型 權限 硬連結數 所屬使用者名 檔案大小 檔案名字
- rw- r-- r-- 1 root root 122 07-22 11:07 abc.c
所屬使用者權限 所屬組權限 其它權限 所屬組名 時間
6 4 4
讀 寫 執行
r w x
1 1 1
r w -
1 1 0
權限表示 最大權限0777
0644
裝置類型
塊裝置 (block device)
字元裝置 (character device)
網絡裝置 (sock device)
檔案類型
- 普通檔案(normal file) 黑色
可執行檔案(excute file) 綠色 (所屬使用者的可執行權限決定)
d 目錄(directory)
藍色
c 字元裝置檔案(character) 黃色
b 塊裝置(block device)
黃色
s 網絡裝置(sock device) 粉紅
l 連結檔案(link) 青綠
p 管道檔案(pipe) 棕色
chmod 0777 xxxx 将某個檔案設定成一個對應的權限
chmod a+x xxxx 将這個檔案所有權限加上可執行 a-x 相反
chmod 777 directory -R 将檔案夾directory内的所有檔案設定成滿權限