HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: nohup command from sudo
Operating System - HP-UX
1826466
Members
2357
Online
109692
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
08-30-2001 07:28 AM
08-30-2001 07:28 AM
nohup command from sudo
We have a script that we run from sudo that checks environment variables, and then we can run one of several jobs. The jobs are submitted using:
nohup cmd >> log 2>&1 &
This should put the command in the background and log to the log file. The original script (sudo run_script) never releases the nohup command. You can do ps and see the parent/child process ids, and it just sits there. We can ctrl-z & bg to push both processes into the background. Is there a limitation about running nohup jobs from sudo. I have tried nohup cmd & >> log 2>&1, but this sends the output to nohup.out, and not the log file. The original way also sends output to nohup.out.
nohup cmd >> log 2>&1 &
This should put the command in the background and log to the log file. The original script (sudo run_script) never releases the nohup command. You can do ps and see the parent/child process ids, and it just sits there. We can ctrl-z & bg to push both processes into the background. Is there a limitation about running nohup jobs from sudo. I have tried nohup cmd & >> log 2>&1, but this sends the output to nohup.out, and not the log file. The original way also sends output to nohup.out.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2001 01:55 PM
08-30-2001 01:55 PM
Re: nohup command from sudo
Try enclosing the entire line in grave quotes `` such as;
`nohup cmd >> log 2>&1 &`
Grave quotes are the backward quote next to the 1 key.
`nohup cmd >> log 2>&1 &`
Grave quotes are the backward quote next to the 1 key.
There are 10 types of people in the world, those who understand binary and those who don't - Author Unknown
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP