Operating System - HP-UX
1828219 Members
1983 Online
109975 Solutions
New Discussion

/bin and /lib links to /usr/bin and /usr/lib

 
SOLVED
Go to solution
Vernita Hall
Occasional Advisor

/bin and /lib links to /usr/bin and /usr/lib

The /bin and /lib symbolic links to /usr/bin and /usr/lib (respectively) have disappeared on a server for reasons unknown. I need to recreate them quickly. I suspect that the following commands would ALMOST do the trick:

umask 222
ln -s /usr/bin /bin
ln -s /usr/lib /lib

This would create links with permissions of
lr-xr-xr-x. The problem is /bin's permissions should be lr-xr-xr-t.
How do I reestablish these links?
Thanks, anyone....
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: /bin and /lib links to /usr/bin and /usr/lib

To get them to work you can just recreate the links. The 't' bit does not give an special permission, it only marks the link as a "Transition Link".

If there is a lot of use of /bin and /lib in programs, those really need to be moved to /usr/bin and /usr/lib. Transition links have been around since HP-UX 10.20 and can go away with any future release without any notice.
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: /bin and /lib links to /usr/bin and /usr/lib

Hi Vernita,

Remove the links you made and use the tlinstall command.

# rm lib
# rm bin

# tlinstall -v

Regards,
Robert-Jan

Peter Godron
Honored Contributor

Re: /bin and /lib links to /usr/bin and /usr/lib

Hi,
please see earlier thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=926834

For potential reasons of links disappearing:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=877389

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.


A. Clay Stephenson
Acclaimed Contributor

Re: /bin and /lib links to /usr/bin and /usr/lib

You are actually fine as you are. The mode of a symbolic link doesn't matter at all --- only the mode of ther object that the soft link points to matters. However, if this really bugs you then you can use the undocumented system call, lchmod(), to make the change on the symbolic link.

Please see the attached small C program that I wrote in this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=910500&admit=-682735245+1172677359404+28353475
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: /bin and /lib links to /usr/bin and /usr/lib

Hi:

These are so-called "transition" links. They will become reguar symbolic links in 11.31 having appeared with the advent of 10.0 when the HP-UX filesystem layouts changed. You can recreate them with:

# /opt/upgrade/bin/tlinstall

Regards!

...JRF...
Vernita Hall
Occasional Advisor

Re: /bin and /lib links to /usr/bin and /usr/lib

You guys totally rock!

Thank you so much for all your prompt replies and great info.
tlinstall worked beautifully in about two shakes...
Vernita Hall
Occasional Advisor

Re: /bin and /lib links to /usr/bin and /usr/lib

---