It is currently Thu, 20 Jan 2022 05:22:05 GMT



 
Author Message
 /bin/sh .vs. /sbin/sh
What is the difference between these two shells?  The manpage only
speaks to /bin/sh.  But, the executables are sizeably different.
On my Solaris 8 server, they look like this:

saturn[1]% ls -la /bin/sh
-r-xr-xr-x   4 root     root       95316 Mar 19 15:25 /bin/sh
saturn[2]% ls -la /sbin/sh
-r-xr-xr-x   2 root     root      286884 Mar 19 15:25 /sbin/sh

Any ideas?  Someone from Sun?

ed



 Mon, 04 Oct 2004 04:34:13 GMT   
 /bin/sh .vs. /sbin/sh

On my system (and everywhere else, I assume):
$ file /bin/sh /sbin/sh
/bin/sh:        ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
/sbin/sh:       ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped

HTH, Dragan

--
Dragan Cvetkovic,

To be or not to be is true. G. Boole
No it isn't.  L. E. J. Brouwer



 Mon, 04 Oct 2004 05:00:55 GMT   
 /bin/sh .vs. /sbin/sh
In article <13879265.0204171234.831b...@posting.google.com>,
        fra...@plk.af.mil (Ed Franks) writes:

/sbin/sh is a static linked shell for use by root, so that
root can still login and repair the problem if something
happens to{*filter*}up dynamic linking.

The file command will show you...
% file /bin/sh /sbin/sh
/bin/sh:        ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
/sbin/sh:       ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped
%

--
Andrew Gabriel
Consultant Software Engineer



 Mon, 04 Oct 2004 05:10:00 GMT   
 /bin/sh .vs. /sbin/sh

Nice in theory, but you still need to have a number of tools statically
linked (or included in /sbin/sh) for this to work. Things like mv, cp,
ln, ls are all very useful; other programs (tar, gzip, etc.) are useful,
but you probably could live without them if you had to.

--
I'm waiting for tech support to call me back. I'm also waiting for the
second coming of Jesus. Wanna take bets on which happens first?



 Mon, 04 Oct 2004 06:32:50 GMT   
 /bin/sh .vs. /sbin/sh

Kind of hard to live without fsck, though, unless you use "logging":

/usr/sbin/fsck: ELF 32-bit LSB executable 80386 Version 1, dynamically
linked, stripped

and note where it is installed ;-)

My /usr directory is on the / partition for just this reason even
though I use the logging option to mount.



 Mon, 04 Oct 2004 06:39:10 GMT   
 /bin/sh .vs. /sbin/sh

There are a few in /usr/sbin/static.

For what reason?  It seems to me that anything that would make it
unusable in the split /usr case would make it unusable in your case
too..

I am *not* arguing the merits of a combined /usr (I prefer it in fact),
just that I don't think the fact that fsck is on /usr is a big reason
for it.

--
Darren Dunham                                           ddun...@taos.com
Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
          < How are you gentlemen!! Take off every '.SIG'!! >



 Mon, 04 Oct 2004 07:44:07 GMT   
 /bin/sh .vs. /sbin/sh
On 17 Apr 2002, Stuart Lamble wrote:

Agreed; hence:

        rich@grover8808# ls /usr/sbin/static
        .    ..   cp   ln   mv   rcp  tar
        rich@grover8809# file /usr/sbin/static/*
        /usr/sbin/static/cp:    ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped
        /usr/sbin/static/ln:    ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped
        /usr/sbin/static/mv:    ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped
        /usr/sbin/static/rcp:   ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped
        /usr/sbin/static/tar:   ELF 32-bit MSB executable SPARC Version 1, statically linked, stripped

(No, I don't know why /usr/sbin/static is under /usr, rather than being
called /sbin/static.  /sbin/static makes more sense to me, given that
some people like to have a separate /usr partition.)

--
Rich Teer

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.**-**.com/



 Mon, 04 Oct 2004 07:45:41 GMT   
 /bin/sh .vs. /sbin/sh

/usr/sbin/static includes staticly linked copies of cp, ln, mv, rcp,
tar. I am not sure why they didn't include there utilities there as well.

-akop



 Mon, 04 Oct 2004 07:54:03 GMT   
 /bin/sh .vs. /sbin/sh
[on static tools]

You learn something new every day.

--
I'm waiting for tech support to call me back. I'm also waiting for the
second coming of Jesus. Wanna take bets on which happens first?



 Mon, 04 Oct 2004 08:27:02 GMT   
 /bin/sh .vs. /sbin/sh

There are additional tools in /usr/sbin/static (cp, ln, mv, rcp, tar)
assuming that package SUNWsutl is installed.

If not, there is enough in /sbin (namely mount) to be able to
mount /usr from somewhere else, including the network.

All these are useful in a disaster or admin error situations,
without having to resort to the trouble of locating a cdrom drive and the
Solaris bootable media.



 Mon, 04 Oct 2004 10:33:10 GMT   
 /bin/sh .vs. /sbin/sh

There are a limited number of partitions available with a standard
filesystem.  Placing /usr onto the / partition makes room for /u03 or
whatever you wish to call your added partition.

If after a crash you can mount your / partition and cannot mount the
/usr partition because of uncorrectible errors then your system is
going to have to be fixed by booting from CDROM.  You may as well have
/usr on the / partition since your basic utilities are there, along
with their required libs.



 Mon, 04 Oct 2004 12:20:09 GMT   
 /bin/sh .vs. /sbin/sh

If you merge / & /usr, the kernel can *always* mount it because it
can almost always mount root, even if, e.g., your device tree is hosed.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.



 Mon, 04 Oct 2004 16:01:34 GMT   
 /bin/sh .vs. /sbin/sh
In article <Pine.GSO.4.44.0204171643310.19624-100...@grover.rite-group.com>,
Rich Teer  <r...@rite-group.com> wrote:

/sbin carries a mount binary, so there is no problem to acccess binaries
from /usr/sbin/stattic later....

What really is missing in /sbin is drvconfig and friends in order
to allow you to e.g. move a disk to a different machine where
the /devices tree would not look the same.

--
EMail:jo...@schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin
      j...@cs.tu-berlin.de                (uni)  If you don't have iso-8859-1
      schill...@fokus.gmd.de              (work) chars I am J"org Schilling
URL:  http://www.fokus.gmd.de/usr/schilling    ftp://ftp.fokus.gmd.de/pub/unix



 Mon, 04 Oct 2004 16:42:06 GMT   
 /bin/sh .vs. /sbin/sh
On Wed, 17 Apr 2002 23:45:41 GMT in comp.unix.solaris Rich Teer wrote:

[...]

: (No, I don't know why /usr/sbin/static is under /usr, rather than being
: called /sbin/static.  /sbin/static makes more sense to me, given that
: some people like to have a separate /usr partition.)

Or better yet, just put them all in /sbin.

fpsm
--
| Fredrich P. Maney              my_last_name AT my_last_name DOT org |
|   Do NOT send me HTML formatted E-mail or copies of netnews posts!  |
|  Address in header is a spamtrap. Use one in signature for replies. |
|  Please review http://www.maney.org/fred/site/uce/ before emailing. |



 Mon, 04 Oct 2004 20:33:46 GMT   
 /bin/sh .vs. /sbin/sh

Of course.  I agree!! :-) I give! (really, I like comboroot).

My thought was just that anything that was likely to corrupt /usr to the
point that you couldn't mount it read-only would likely have corrupted
your root filesystem to the same extent if they had been one big
filesystem.  In both cases it would have been "break out the CD" time.

--
Darren Dunham                                           ddun...@taos.com
Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
          < How are you gentlemen!! Take off every '.SIG'!! >



 Tue, 05 Oct 2004 00:43:35 GMT   
 
   [ 17 post ]  Go to page: [1] [2]

Similar Threads

1. difference between /bin/sh and /sbin/sh

2. diff /sbin/sh and /bin/sh?

3. Any difference between /sbin/sh and /bin/sh?

4. why /bin/sh and not /sbin/sh

5. /sbin/sh and /bin/sh

6. root's shell, /sbin/sh, /bin/sh and /usr/ksh

7. /sbin/sh and /bin/sh

8. /sbin/sh and /sbin/sh

9. #!/bin/sh #!/usr/bin/sh can I do both for 2 diff machines

10. /bin/ksh vs /usr/xpg4/bin/sh


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software