recreating /dev/null

Something (I'm still trying to find out what) has clobbered our /dev/null and made it into an ordinary file. I know I need to recreate it with mknod, but I'm unsure what the major and minor device numbers should be - I know enough to know that they vary on different systems and I've seen 1 3, 2 2, even 4 0 offered as options in different places on the Web. We're running HP-UX 10.20 on an old D-class HP 9000 (yes, I know, steam driven, but it works). I'm just a bit chary of getting the numbers wrong and clobbering something else - /dev/kmem looks as if it has 1 3 as its major and minor as well (unless I'm reading those wrong way round).

Anyone help?

Paul

Don't knock it, it's the only dual CPU machine I have.... :slight_smile:

Anyway, the best I can offer is for HPUX 11.11

$ uname -a
HP-UX electra B.11.11 U 9000/725 2013052205 unlimited-user license
$ ls -ld /dev/null
crw-rw-rw-   1 bin        bin          3 0x000002 Dec 16 13:01 /dev/null

similar here:

$ uname -a ; echo '' ; ls -al /dev/null
HP-UX mdirect B.11.23 U ia64 2587410573 unlimited-user license

crw-rw-rw-   1 bin        bin          3 0x000002 Dec 18 11:57 /dev/null

Did you eventually find out how /dev/null got clobbered ??

It's been 3 and 2 for a while including 10.20.

mknod /dev/null c 3 0x000002
chown bin:bin /dev/null
chmod 666 /dev/null

thanks, guys, that's enormously helpful. God I love the Internet!

Paul