- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: 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
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-28-2000 04:37 PM
11-28-2000 04:37 PM
nohup command
I have used the nohup command in a script and was running fine. I decided to put the script into cron job, it runs fine but there is no nohup.out.
Appreciate any advise.
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 04:45 PM
11-28-2000 04:45 PM
Re: nohup command
...Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 05:19 PM
11-28-2000 05:19 PM
Re: nohup command
I have checked "/" but not available. Is there a way to specify where the nohup.out to go to.
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 05:20 PM
11-28-2000 05:20 PM
Re: nohup command
nohup /full_pathname/your_program >> /var/tmp/your_log 2>&1
This will append all output from nohup into the file named above.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 05:47 PM
11-28-2000 05:47 PM
Re: nohup command
Since cron is run by root, the nohup.out should be created at home directory of root which is "/" (According to man pages).
Because I have run a script at cron which creates a file (Not giving absolute path name). It created at "/".
It should be the same for nohup as well.
Thanks,
...Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 08:15 PM
11-28-2000 08:15 PM
Re: nohup command
Sorry for the confusion, I ran the cron job by su - "login name" -c "Command to execute the script".
In the script, it "cd" to the directory to perform the necessary which it had. I expected the nohup.out to be generated in that directory as it was all the while through command line but it doesn't exist in this case.
Rgds,
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 08:31 PM
11-28-2000 08:31 PM
Re: nohup command
it might sound simple, but did you run a find command to see if the file exists on your system?
Try
find / -name nohup.out
That might give you a hint where the file is. If you can't find any nohup.out file, then please provide us with more information on how the cronjob is setup exactly.
Steffi Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 10:34 PM
11-28-2000 10:34 PM
Re: nohup command
I will be trying Bill Hassel's suggestion but like to find out how to put the "&" for background job.
Example:
Original statement is:
nohup /full_path/my_program&
should the new statement be (1) or (2)
(1) nohup /full_pathname/my_program >> /var/tmp/your_log 2>&1 &
or
(2) nohup /full_pathname/my_program& >> /var/tmp/your_log 2>&1
Rgds,
YC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 10:44 PM
11-28-2000 10:44 PM
Re: nohup command
Both ways are correct. It's a matter of preference.
I would write it the first way, because the ampersand at the end makes the background status more obvious.
Best regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2000 11:06 PM
11-28-2000 11:06 PM