- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: what's the difference between -sh and 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
06-28-2004 05:19 PM
06-28-2004 05:19 PM
what's the difference between -sh and sh
can find /usr/bin/sh or sh process,
and i use telnet and can find -sh process,
what's the difference of -sh ,and sh?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2004 05:44 PM
06-28-2004 05:44 PM
Re: what's the difference between -sh and sh
Still wondering why -sh for the first time.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2004 05:47 PM
06-28-2004 05:47 PM
Re: what's the difference between -sh and sh
-sh is a login shell.
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2004 05:56 PM
06-28-2004 05:56 PM
Re: what's the difference between -sh and sh
-sh process (who's PPID parent pid is not equal to 1 (init process )) are being created for login with it's shell type /sbin/sh.
sh is used to execute the shell scripts without having the execution permission (by creating the sub shell to execute that file).
We can get the extented long format with ps -exlf | grep -v grep | grep sh to know the difference.
Regards,
Muthukumar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2004 03:51 AM
06-29-2004 03:51 AM
Re: what's the difference between -sh and sh
After a successful login, the accounting files are updated, initializing the user and group ids, group access
list, and working directory. If the session type chosen is tsm, the SHELL to start in each tsm session is
determined from corresponding user entries in the /etc/passwd file. cue then forks the appropriate
shell by using the last component of the shell pathname preceded by a - (for example, -sh or -ksh).
When the session type is invoked with its name preceded by a minus in this manner, the shell performs its
own initialization, including execution of profile, login, or other initialization scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2004 03:57 AM
06-29-2004 03:57 AM
Re: what's the difference between -sh and sh
Ater a successful login, the accounting files are updated, user and group IDs, group access list, and working
directory are initialized, and the userâ s command interpreter (shell) is determined from corresponding user
entries in the files /etc/passwd and /etc/logingroup (see passwd(4) and group(4)). If
/etc/passwd does not specify a shell for the user name, /usr/bin/sh is used by default. login
then forks the appropriate shell by using the last component of the shell path name preceded by a - (for
example, -sh or -ksh). When the command interpreter is invoked with its name preceded by a minus in
this manner, the shell performs its own initialization, including execution of profile, login, or other initialization
scrip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2004 06:48 AM
06-29-2004 06:48 AM
Re: what's the difference between -sh and sh
To find all the processes by name, don't use grep. It does not understand where to search for the process name is located and will find things like hashdaemon and sherry as well as sh, csh and ksh. Instead, use the powerful options in ps to locate programs by an exact name:
UNIX95= ps -f -C sh
This will find -sh, sh, even /usr/bin/sh, but will not find ksh or csh, etc.
Bill Hassell, sysadmin