- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- nohup command
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
11-02-2000 06:40 AM
11-02-2000 06:40 AM
nohup command
We have groups of users that cover for each other but have their own login. I would like th nohup command to create the nohup.out with -rw-rw---- as the permissions.
Here was my solutions.
1. in the script that gets executed add a chmod g+rw nohup.out. The users did not wat this because it would mean work on their part.
2. create an alias nohup='>>nohup.out; chmod 660 nohup.out; /usr/bin/nohup '
The users liked this
The question I have is when I do the alias command, it shows nohup='nohup '
When I do type nohup it shows
nohup is an exported alias for nohup
Where does the nohup command alais gets set.
I can not seem to find it.
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2000 06:53 AM
11-02-2000 06:53 AM
Re: nohup command
If you do 'man sh-posix' and search for nohup you will find that it is one of the set of exported aliases that are compiled into the shell. You can remove it with 'unalias nohup'.
Rather than creating an alias, I think that you will have more success by defining a shell function called nohup.
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2000 06:54 AM
11-02-2000 06:54 AM
Re: nohup command
The nohup alias is compiled into ksh (see; man ksh), you can unset or redefine it though.
Greetz, Danny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2000 06:57 AM
11-02-2000 06:57 AM
Re: nohup command
'nohup' is one of several aliases that is compiled into the shell. It can still be redefined as you have done. If you want, you could place your alias into the user's $HOME/.profile. If the use of the alias as you have defined it is a "special case", however, I think you should consider aliasing it within the script that the users run, and NOT their global profile.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2000 06:59 AM
11-02-2000 06:59 AM
Re: nohup command
nohup $1;
chmod 660 nohup.out
Or something like.
And use the shell as alias of nohup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2000 07:04 AM
11-02-2000 07:04 AM
Re: nohup command
The second part of the question is why do they do it for nohup? Page 4 of the man ksh shows all of the others have a default parameter set.
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2000 07:44 AM
11-02-2000 07:44 AM
Re: nohup command
OK, second question's answer:
If you look at the nohup alias you will see that the last character of the alias value is a blank, as: nohup='nohup '. If you look at the man page for sh-posix, it notes: "If
the last character of the alias value is a blank, the word following the alias is also checked for alias substitution."
Thus, the alias as defined, allows you to use the 'nohup' command AND check the command following it for alias substitution.
...JRF...