- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /sbin/sh -vs- /usr/bin/sh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 05:58 AM
05-29-2002 05:58 AM
N4000
I have two different file sizes for the POSIX shell. The one root is mapped to and the one general users are mapped to are different sizes. Both are dated April 23 2001:
/usr/bin/sh 221184
/sbin/sh 421888
Is this correct, or do I have a version problem? If so, which is correct?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:02 AM
05-29-2002 06:02 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:04 AM
05-29-2002 06:04 AM
Re: /sbin/sh -vs- /usr/bin/sh
(linker used archived libraries):
file /sbin/sh
/sbin/sh: s800 shared executable
Whereas the file /usr/bin/sh is incomplete (linker used shared
libraries):
file /usr/bin/sh
/usr/bin/sh: s800 shared executable dynamically linked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:05 AM
05-29-2002 06:05 AM
Re: /sbin/sh -vs- /usr/bin/sh
The other is for multi user mode.
Cheers
George
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:05 AM
05-29-2002 06:05 AM
Re: /sbin/sh -vs- /usr/bin/sh
Both the files are correct....
normally for the general users you can use /usr/bin/sh
and for root and equivalent users you can use /sbin/sh
Well for normal users also you can use /sbin/sh
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:06 AM
05-29-2002 06:06 AM
Re: /sbin/sh -vs- /usr/bin/sh
Seems normal
ll /sbin/sh /bin/sh /usr/bin/sh
-r-xr-xr-x 2 bin bin 221184 Apr 23 2001 /bin/sh
-r-xr-xr-x 1 bin bin 421888 Apr 23 2001 /sbin/sh
-r-xr-xr-x 2 bin bin 221184 Apr 23
2001 /usr/bin/sh
file /sbin/sh /bin/sh /usr/bin/sh
/sbin/sh: PA-RISC1.1 shared executable
/bin/sh: PA-RISC1.1 shared executable dynamically linked
/usr/bin/sh: PA-RISC1.1 shared executable dynamically linked
/sbin/sh linker used archived libraries
otherones linker used shared libraries
/sbin/sh is installed when system installed others are built at install.
steve steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:08 AM
05-29-2002 06:08 AM
Re: /sbin/sh -vs- /usr/bin/sh
The directory /sbin has all static binaries while /usr/bin has all dynamic binaries.
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:09 AM
05-29-2002 06:09 AM
Re: /sbin/sh -vs- /usr/bin/sh
The files in '/sbin' are staticly linked. Those in '/usr/bin' are dynamically linked. Generally you would use objects in '/usr/bin' when '/usr' is mounted since their runtime environment is smaller by virtue of the fact that they share library entrypoints. In single-user mode, '/usr' isn't mounted, so then you need to use commands in '/sbin'. Note, too, that you *always* want the default shell for root to be '/sbin/sh' for the reason just stated!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:13 AM
05-29-2002 06:13 AM
Re: /sbin/sh -vs- /usr/bin/sh
Thanks for the confirmation, that is what I was suspecting, but wasn't 100% sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:15 AM
05-29-2002 06:15 AM
Re: /sbin/sh -vs- /usr/bin/sh
Moreover, as /sbin/sh doesn't use shared libraries, NLS functionalities aren't available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:18 AM
05-29-2002 06:18 AM
Re: /sbin/sh -vs- /usr/bin/sh
As alll the other ones told you this is normal and I won't repeat what they say. I just want to advise you to keep the root account with /sbin/sh as the default shell. This is very important because when you are booting your system /usr is not mounted during the startup so the system won't be able to execute the startup scripts.
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2002 06:58 AM
05-29-2002 06:58 AM
Re: /sbin/sh -vs- /usr/bin/sh
I would like to throw more light on /usr/bin. /usr/bin/sh or ksh is the right location for all the shells.The reason i am telling this is still there are lot of folks using /bin/sh and /bin/ksh in their scripts. /bin and /lib are mere symbolic links that are kept for the old codes. The correct location would be /usr/bin.
Thanks
Giri.