Linux 基础_type file stat 的区别(扩展)
type :查看命令类型;例如该命令是alias,内置命令,还是某个文件
-a : 列出该命令的所有类型
eg:[root@tslite ~]# type ll
ll is aliased to `ls -l --color=auto'
[root@tslite ~]# type ls
ls is aliased to `ls --color=auto'
[root@tslite ~]# type cd
cd is a shell builtin //builtin 内置命令
[root@tslite ~]# type for
for is a shell keyword //keyword 关键字
[root@tslite ~]# type useradd
useradd is /usr/sbin/useradd
file 查看文件类型,例如文本文件,还是二进制文件,管道文件,设备文件,连接文件
[root@tslite ~]# file /etc/hosts
/etc/hosts: ASCII text
stat 查看文件的属性,名称,大小,权限,atime ctime mtime


浙公网安备 33010602011771号