开发者

Linux: /dev/null/: Is a directory

开发者 https://www.devze.com 2023-01-30 14:22 出处:网络
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\

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

精彩评论

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

关注公众号