System Administration
Showing results for 
Search instead for 
Do you mean 

/usr/bin/ls is replaced by /sbin/ls?

Frequent Advisor

/usr/bin/ls is replaced by /sbin/ls?

1、/usr/bin/ls is replaced by /sbin/ls;
2、now, the 11.31 system running well;
3、 is there any bad influence to the system ?
4、 shoud i copy a "ls" file from other system to cover the "ls" in /sbin/?
5 REPLIES
Trusted Contributor [Founder]

Re: /usr/bin/ls is replaced by /sbin/ls?

copying /sbin/ls to /usr/bin/ls shouldn't be a probably. It may be useful for users that do not have /sbin in their PATH to copy the file to /usr/bin.
I drive way too fast to worry about calories.
Trusted Contributor [Founder]

Re: /usr/bin/ls is replaced by /sbin/ls?

copying /sbin/ls to /usr/bin/ls shouldn't be a problem. It may be useful for users that do not have /sbin in their PATH to copy the file to /usr/bin.
I drive way too fast to worry about calories.
Highlighted
Acclaimed Contributor [Founder]

Re: /usr/bin/ls is replaced by /sbin/ls?

Hi:

Why would you copy '/sbin/ls' over '/usr/bin/ls' ?

The variations in '/sbin' are intended to by used in single-user mode where '/usr' isn't mounted and thus binaries with dynamically linked libraries that live in '/usr' aren't available.

The variations in '/usr' use dynamically linked libraries and therefore afford a slightly smaller memory footprint (overall) when there are multiple instantiations.

You should maintanin and retain the correct variations.

Regards!

...JRF...
Acclaimed Contributor [Founder]

Re: /usr/bin/ls is replaced by /sbin/ls?

I took this from a 11.11 system, but IMHO it is very similar on 11.31 too:

# whereis ls
ls: /sbin/ls /usr/bin/ls /usr/share/man/man1.Z/ls.1
# file /sbin/ls
/sbin/ls: PA-RISC1.1 shared executable
# file /usr/bin/ls
/usr/bin/ls: PA-RISC1.1 shared executable dynamically linked

You see the difference. I assume it must be in /usr/bin by default. Did you delete it?


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Acclaimed Contributor [Founder]

Re: /usr/bin/ls is replaced by /sbin/ls?

>3ã is there any bad influence to the system?

swverify will be upset. Also ls(1) will take more memory to run. It also won't support locales.
The question is why do this, as JRF asked?