/etc/passwd 「 thomas:x:1000:1000:wenhuangwei:/home/thomas:/bin/bash 」
/etc/shadow 「 thomas:04Ru0f1ABltJQ::0:99999:7::: 」
/etc/group 「 thomas:x:1000:thomas 」
d[ 类型 ] rwx[ 主u ] r-x[ 组g ] r-x[ 他o ] . 2[ 硬连接 ] root[ 作者 ] root[ 组 ] 4.0K[ 大小 ] Jun 22 15:45[ 时间 ] run[ 文件名 ]
-普通文件、d目录、b存储设备、c鼠标键盘tty设备、l软连接
ls -lh /dev/sda1 「 硬盘文件 brw-rw----. 」
ls -lh /dev/tty 「终端文件 crw-rw-rw-. 」
r读 w写 x执行 -缺省
a=ugo
chmod u+x,g+w,o-r a.txt
chmod ug-rw a.txt
chmod a=r a.txt
chmod +x a.txt 「 所有」
4=r 2=w 1=x 0=-
755=rwx r-x r-x
chmod 755 a.txt
ls -ld ~ 「 -d目录自身 」
chmod -R 755 /a/ 「 -R 递归改目录」
chown tom /a/
chown tom:tom /a/ 「 用户:所属组」
chgrp root /a/ 「 改组」
chown -R tom /a/ 「 -R 递归改目录」
x:对于文件可运行;对于文件夹可cd
文件后缀 「 无实际意义 」
file nginx.pid 「 查看文件类型 」