Operating System - HP-UX
1847841 Members
5488 Online
104021 Solutions
New Discussion

Re: /usr/lib/... file coruption

 
SOLVED
Go to solution
Carlo Henrico_1
Regular Advisor

/usr/lib/... file coruption

I somehow got it right to corrupt the /usr/lib/lib2.c file and now nothing works. I cannot do ll, cp, mv etc. The system is currently useless. I cannot even ftp to it.

I do have a backup copy of the file on the server, and I am sure a normal cp would have done the trick, however even cp looks for the shared lib2.c file.

Any ideas how to get out of this one please?

Thanks

Carlo
Live fast, die young - enjoy a good looking corpse!
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: /usr/lib/... file coruption

Hi Carlo,

You are in a bind.

We can take advantage of 2 commands in /sbin:
cat or mv (sbin/mv is not the same as /usr/bin/mv).

Try this:
/sbin/cat < goodlibcopy > newlib

or
1) /sbin/mv badcopy safecopy
2) /sbin/mv goodlibcopy newlib

If it were me, I would come up in single user
and do an /sbin/mount /usr.

Hope this helps, Clay
If it ain't broke, I can fix that.
Carlo Henrico_1
Regular Advisor

Re: /usr/lib/... file coruption

Thanks Clay, that was excellent. /sbin/mv did the trick, and suddenly all is well again.

Much appreciated

Carlo
Live fast, die young - enjoy a good looking corpse!