Messing with /dev/null

Have you ever deleted /dev/null? Well I did, and it was unintentional at first but I managed to get it back. Here is how i reproduced the problem and its solution:

[root@robocop root]# cd /dev
[root@robocop dev]# rm null
rm: remove character special file `null'? y
[root@robocop dev]# mknod null c 1 3
[root@robocop dev]# chmod 666 null
[root@robocop dev]# ls -l null
crw-rw-rw- 1 root root 1, 3 Apr 24 09:58 null

No comments: