它是基于字符的(而不是基于块的)设备文件.

基于块的设备是在(令人惊讶的)块中传输数据有意义的任何事物.通过这个,我的意思是像磁盘.

基于字符的设备(同样,这应该不足为奇)倾向于一次传输字符.诸如终端,串口,打印机等等.

如果您正在运行一个不错的Linux发行版,那么可以使用以下命令获取该信息(加上您可能需要的信息):

info ls

其中包含这个小片段:

The file type is one of the following characters:

- 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

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐