Shell学习2:文件类型

[root@localhost ~]# ls -l /etc/passwd
-rw-r--r--. 1 root root 2262 Oct 26 15:02 /etc/passwd
[root@localhost ~]# file /etc/passwd
/etc/passwd: ASCII text        # 普通文本文件
[root@localhost ~]# ls -l /etc -d
drwxr-xr-x. 138 root root 8192 Oct 30 09:39 /etc
[root@localhost ~]# file /etc
/etc: directory                # 目录文件
[root@localhost ~]# ls -l /dev/sda
brw-rw----. 1 root disk 8, 0 Oct 26 14:08 /dev/sda
[root@localhost ~]# file /dev/sda
/dev/sda: block special        # 块文件
[root@localhost ~]# ls -l /dev/tty1
crw--w----. 1 root tty 4, 1 Oct 26 14:08 /dev/tty1
[root@localhost ~]# file /dev/tty1
/dev/tty1: character special   # 字符文件
[root@localhost ~]# mkfifo /tmp/fifo
[root@localhost ~]# ls -l /tmp/fifo
prw-r--r--. 1 root root 0 Oct 30 09:41 /tmp/fifo
[root@localhost ~]# file /tmp/fifo    
/tmp/fifo: fifo (named pipe)   # 管道文件

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值