linux file命令查看文件类型

发布时间 2023-08-17 18:29:36作者: 风始于青萍末

在linux系统中,linux是不根据后缀名识别文件类型的,所以使用file命令查看文件的类型。

[root@node5 ~]# file /etc/shadow
/etc/shadow: ASCII text

[root@node5 ~]# file /etc
/etc: directory

[root@node5 ~]# file /dev/sda
/dev/sda: block special
 
[root@node5 ~]# file /dev/tty
/dev/tty: character special