5 ms·
"Why?" Why not? In my case, the reason is because it's shorter to type. I would expect most longtime UNIX users have experienced what happens when, for one r
by gwu78 13y ago
"Why?" Why not?
In my case, the reason is because it's shorter to type.
I would expect most longtime UNIX users have experienced what happens when, for one reason or another, /dev/null is not a null character device and you have scripts or programs writing to it as if it was. By the time you realize that this has happened, it's too late -- data has already been saved to this file.
There may be various workarounds for this. I'm not a professional sysadmin.
But in my case, for my own personal usage systems, by using my own null character device in my own tmpfs mounted folders, I can just test for the success/failure of the mknod command before I start redirecting anything to it.
I don't need a /dev/null. But I do need mknod.
- anyfoo 13y agoAnd you need to be root, apparently.
- gwu78 13y agosetuidgid luser mknod ... Are you sure?
- anyfoo 13y agoGreat. You just gave luser at least read access to a whole lot of your hardware, including your whole hard disks, swap space, and some device nodes which potentially crash the system upon random reading.
- gwu78 13y agoMy system has only one user: me. I am the only one using it. Multiuser UNIX is a relic from a long past era of shared computing. The "root" concept creates more security issues than it solves. That's why Plan 9 did away with it.