Sponsored Content
Full Discussion: Issue with nohup command
Top Forums Shell Programming and Scripting Issue with nohup command Post 302341700 by Corona688 on Thursday 6th of August 2009 12:03:57 PM
Old 08-06-2009
Quote:
Originally Posted by scottn
Hi.

What about:

Code:
ssh user@server "command" &

Is it neccessary to use nohup at all?
What if the command takes hours? What if, during those hours, you have an internet service outage, causing the connection to break and the command to be killed? What if its generating tons of log spamming or something? There's good reasons to want to background the remote process instead of the local ssh connection.

What shell is being used here? If you're using bash, you might want to add a 'disown' command after the &.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Nohup command on Solaris

Hi, I have a general question on using the "nohup" command. As far as I've got it, submmitting a job with no hang up specified, should result in the job running until completion, regardless of whether the session that submitted the job(parent) is still active. This is very helpful when doing... (1 Reply)
Discussion started by: errolg
1 Replies

2. UNIX for Dummies Questions & Answers

Nohup Command

Hello All, I am newbie to unix.I am trying to use NOHUP command in shell script it works fine with only "nohup test.sh 10 &" and "/opt/user/nohup test.sh 10 &" gives an error saying "ksh: /opt/user/nohup : not found". Can anybody please guide me to make it work. Thanks Blazix (9 Replies)
Discussion started by: blazix
9 Replies

3. Shell Programming and Scripting

What's the command for nohup in Oracle

Hello, I need running the process from Oracle in backround. Thank you for your help. C.Abarca (1 Reply)
Discussion started by: cabarcaj
1 Replies

4. Shell Programming and Scripting

nohup command o/p redirection

Hi I am using nohup command in script(say nohup ls- ltr > somefile 2>&1 & ). I dont want any kind of output to be displayed on screen. When i tried the above nohup it still gives me some out put on screen like 2991 Done >somefile 2>&1 Please you let me know what is... (3 Replies)
Discussion started by: ammu
3 Replies

5. UNIX for Dummies Questions & Answers

Problem with nohup command

Hello folks, I have got a script which telnets to different boxes and runs a certain script with 3 run time args. The line from the script which does it is: (sleep 1; echo $USERID ; sleep 1; echo $PASSWD ; sleep 1 ; echo y ; sleep 1 ; echo "\r" ; sleep 1 ; echo "cd $FILEPATH" ; sleep 1 ; sleep 1... (1 Reply)
Discussion started by: Rajat
1 Replies

6. Shell Programming and Scripting

nohup command in a script.......

I want to know how to use a nohup command in the script........ I have to run following command nohup /tmp/app/statuscheck.sh & After typing this command I will type ctrl D to come to the prompt and the that command will run in backround. I want to include that command in a... (2 Replies)
Discussion started by: jayaramanit
2 Replies

7. Shell Programming and Scripting

nohup command in the script....

I want to know how to use a nohup command in the script........ I have to run following command nohup /tmp/app/statuscheck.sh & After typing this command I will type ctrl D to come to the prompt and the that command will run in backround. Even after pressing & the command is not... (3 Replies)
Discussion started by: jayaramanit
3 Replies

8. UNIX for Dummies Questions & Answers

nohup command..

Hi.. Can anybody tell me, what exactly the nohup command does & when is it used? Your help is appreciated. (3 Replies)
Discussion started by: Amol21
3 Replies

9. AIX

Nohup command

I'm trying to run a compress script in the background, but I even though the script is running in the background I get "Sending nohup output to nohup.out." and the screen just stays there. How can I make the script run in background and make my command prompt come back. I was using: nohup... (2 Replies)
Discussion started by: NycUnxer
2 Replies

10. UNIX for Dummies Questions & Answers

need help in fixing the hangup issue due to nohup command

Hi All, I am very new to unix and to this forum.Suggest me a solution in fixing the below issue. Actually ia m executing java program through script. The command is like java pgm & The above cmd runs the java program continuous as a background thread. This script is executed from a... (1 Reply)
Discussion started by: sahan
1 Replies
SSH-ARGV0(1)                                                BSD General Commands Manual                                               SSH-ARGV0(1)

NAME
ssh-argv0 -- replaces the old ssh command-name as hostname handling SYNOPSIS
hostname | user@hostname [-l login_name] [command] hostname | user@hostname [-afgknqstvxACNTX1246] [-b bind_address] [-c cipher_spec] [-e escape_char] [-i identity_file] [-l login_name] [-m mac_spec] [-o option] [-p port] [-F configfile] [-L port:host:hostport] [-R port:host:hostport] [-D port] [command] DESCRIPTION
ssh-argv0 replaces the old ssh command-name as hostname handling. If you link to this script with a hostname then executing the link is equivalent to having executed ssh with that hostname as an argument. All other arguments are passed to ssh and will be processed normally. OPTIONS
See ssh(1). FILES
See ssh(1). AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. Jonathan Amery wrote this ssh-argv0 script and the associated documentation. SEE ALSO
ssh(1) Debian Project September 7, 2001 Debian Project
All times are GMT -4. The time now is 02:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy