Operating System - HP-UX
1822894 Members
3618 Online
109645 Solutions
New Discussion юеВ

Re: restoring /dev/null file

 
SOLVED
Go to solution
Ron Bromwell
Frequent Advisor

restoring /dev/null file

I deleted the /dev/null file. I tried to rcp it from another machine, but received a message stating it was not a plain file. I tried to restore it from tape, the file came back, but it is a plain file. How do i get the file back to its original state?

Thanks,
Ron
life's a journey, not a destination
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: restoring /dev/null file

As root:

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

If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: restoring /dev/null file

This should work:

# mknod /dev/null c 3 0x000002
# chown bin:bin /dev/null
chmod 666 /dev/null
Robert-Jan Goossens
Honored Contributor

Re: restoring /dev/null file

Hi Ron,

Follow these steps,

# mknod /dev/null c 3 0x000002

# chown bin:bin /dev/null

# chmod 666 /dev/null


Robert-Jan.
Ron Bromwell
Frequent Advisor

Re: restoring /dev/null file

Thanks all.
That worked.
life's a journey, not a destination
doug hosking
Esteemed Contributor

Re: restoring /dev/null file

Another solution:

# insf -d mm
insf: Installing special files for pseudo driver mm