Search This Blog

2014-06-09

Working With Device Node Files /dev/null

If /dev/null ever disappears you will need to re-create

To do this you need to run a special command called mknod
mknod -m 666 /dev/null c 1 3

From what I've read the major minor numbers are subject to change so see
man null
for further details

You cannot just touch new files in /dev/ you will always get denied so you need to be a root user as well as use the mknod command.

References:
http://superuser.com/questions/512005/dev-null-missing-how-can-i-replace
http://fearless-assassins.com/tutorials/article/245-restorere-create-deleted-devnull-linux-special-file/
http://xpt.sourceforge.net/techdocs/nix/general/gnl10-SystemMaintain/ar01s28.html
http://www.tldp.org/LDP/lfs/LFS-BOOK-6.1.1-HTML/chapter06/devices.html

No comments:

Post a Comment