- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- re-directing nohup to the terminal output instead ...
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
Discussions
Discussions
Discussions
Forums
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
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-12-2002 05:52 AM
тАО06-12-2002 05:52 AM
bit emabarressed about asking this one.... I have gone completely blank.
how do you re-direct the output of the nohup command to the terminal (std.out) ?
nohup /scriptfile > ?????
thanks in advance
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:04 AM
тАО06-12-2002 06:04 AM
Re: re-directing nohup to the terminal output instead of nohup.out
The whole point of nohup is that it keeps processes running when the tty disconnects (and sends a HUP signal to the process) If you are going to have your output going to the terminal the you shouldn't use nohup.
From the man page for nohup:
If output from nohup is redirected to a terminal, or is not redirected
at all, the output is sent to nohup.out.
What exactly are you trying to acheieve here?
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:06 AM
тАО06-12-2002 06:06 AM
Re: re-directing nohup to the terminal output instead of nohup.out
If in a long running process you wish to follow the progress, you can do a-
tail -f outputfile
This will then display the output as it is generated.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:06 AM
тАО06-12-2002 06:06 AM
Re: re-directing nohup to the terminal output instead of nohup.out
Nohup is meant to be run in background....why do you want to redirect it to a terminal. You can redirect it to a file instead.
piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:07 AM
тАО06-12-2002 06:07 AM
Re: re-directing nohup to the terminal output instead of nohup.out
Try
nohup /scriptfile 1>/dev/ttydevice
1 is notation for std out.
You'll need to know just *which* tty to use - which could be problematic if run at odd times
/dev/console may be best bet to cover those situations.
But also note this entry in the man pages
"If output from nohup is redirected to a terminal, or is not redirected at all, the output is sent to nohup.out"
So you'll probably get the nohup.out files as well.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:12 AM
тАО06-12-2002 06:12 AM
Re: re-directing nohup to the terminal output instead of nohup.out
You have to
Redirecting 1 alone does not work - the output will go to the file.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:15 AM
тАО06-12-2002 06:15 AM
Re: re-directing nohup to the terminal output instead of nohup.out
It's weird and I have never used it, prefering to use tail -f like someone mentioned to monitor the output, when and if I wish. Other wise you might as well forget the nohup and just use "&".
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:18 AM
тАО06-12-2002 06:18 AM
Re: re-directing nohup to the terminal output instead of nohup.out
if you whish your process dont hup... just trap HUP signal
trap "" HUP
yourprocess
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:18 AM
тАО06-12-2002 06:18 AM
Re: re-directing nohup to the terminal output instead of nohup.out
the reason is just for running a script file and checking whether it is actually running when I log off. The script file generates lot of repetetive garbage so I wanted to have something visible that was scrolling to stdout as soon as I log in. Just a test though!
cheers
john
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:21 AM
тАО06-12-2002 06:21 AM
Re: re-directing nohup to the terminal output instead of nohup.out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:30 AM
тАО06-12-2002 06:30 AM
Re: re-directing nohup to the terminal output instead of nohup.out
Rememeber that you cant choose what pseudo-terminal you want to use.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2002 06:44 AM
тАО06-12-2002 06:44 AM
Re: re-directing nohup to the terminal output instead of nohup.out
Yea, that is weird.
Works just like a tail if the output is intermittent.
But you & Carlos are correct - tail -f on the output file should be used.
Jeff