Operating System - HP-UX
1752805 Members
5397 Online
108789 Solutions
New Discussion юеВ

Re-create trashed /dev/null

 
Andrew Wu_4
New Member

Re-create trashed /dev/null

Hi,

I just noticed that on one of my B180L workstation /dev/null had been trashed
and it looks like:

ls -l /dev/null
-rw-r--r-- 1 root sys 0 Mar 28 20:02 /dev/null

While on the other system /dev/null looks like:

ls -l /dev/null
crw-rw-rw- 1 bin bin 3 0x000002 Mar 28 20:08 /dev/null

My question now is how to I re-create /dev/null? Any input will be greatly
appreciated. TIA.

Andrew.
2 REPLIES 2
Frank Broeer
Frequent Advisor

Re: Re-create trashed /dev/null

Hi
try following

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


Hope this helps
Andrew Wu_4
New Member

Re: Re-create trashed /dev/null

Frank,

Thanks a lot for your prompt response. Your method works and I've got /dev/null
restored on that system. Thanks a lot.

Andrew.