首页 > 系统服务 > 详细

linux 文件类型识别

时间:2015-04-17 13:28:18      阅读:362      评论:0      收藏:0      [点我收藏+]
使用 ls -al
drwxr-xr-x. 4 root root 100 Apr 26 15:05 cpu
lrwxrwxrwx. 1 root root 13 Apr 26 15:05 fd -> /proc/self/fd
brw-rw----. 1 root disk 7, 0 Apr 26 15:05 loop0
crw-rw----. 1 root lp 6, 2 Apr 26 15:05 lp2
仔细看第一位 d代表文件目录文件,l代表链接文件,b代表块设备文件,c代表字符设备文件
`-‘
regular file

`b‘
block special file

`c‘
character special file

`C‘
high performance ("contiguous data") file

`d‘
directory

`D‘
door (Solaris 2.5 and up)

`l‘
symbolic link

`M‘
off-line ("migrated") file (Cray DMF)

`n‘
network special file (HP-UX)

`p‘
FIFO (named pipe)

`P‘
port (Solaris 10 and up)

`s‘
socket

`?‘
some other file type

linux 文件类型识别

原文:http://www.cnblogs.com/penciler/p/4434400.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!