开发者

Linux: /dev/null/: Is a directory

In an attempt to throw away my errors, I am getting this error. /dev/null/: Is a directory

What does that mean? and how can I make it so I ca开发者_JS百科n throw away my errors like so: echo "hello" 2>/dev/null/?


Get rid of the trailing slash.

echo "hello" 2>/dev/null


If /dev/null is a directory, something is wrong in your Linux system and you need to restore it. You do it with the following bash commands as root:

mknod /dev/null c 1 2
chmod 666 /dev/null

after having removed the null directory,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜