linux命令 cat
存在一些问题#cd /sys/class/leds/green
# ls -al
....
-rw-rw-r-- root root 4096 1970-01-02 08:00 duty_pcts
....
#cat duty_pctys
此时发生错误
__/system/bin/sh: cat:duty_pcts:I/O error__
答案 0 :(得分:0)
cat
命令告诉你"嘿,我试图读取名为duty_pcts的文件,但由于某种原因,读取失败。我向操作系统询问了errno
变量中的错误代码,操作系统告诉我这是一个I / O错误(EIO)。"
阅读errno的手册页,打开(2),读取(2)和关闭(2)[例如使用man 2 read
]并查看是否有任何系统调用可以将errno
设置为EIO
。对于read(2)
,您会找到例如
EIO I/O error. This will happen for example when the process is in a background process group, tries to read from its controlling tty, and either it is ignoring or blocking SIGTTIN or its pro- cess group is orphaned. It may also occur when there is a low-level I/O error while reading from a disk or tape.