how to run a process after closing the terminal


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users how to run a process after closing the terminal
# 1  
Old 09-03-2007
Data how to run a process after closing the terminal

i want to execute a shell script even if the terminal is closed. how to do?
# 2  
Old 09-03-2007
Code:
man nohup

<message too short>
# 3  
Old 09-03-2007
execute it as background process

script&
# 4  
Old 09-03-2007
Executing the process from the background using the ampersand (&) at the end of the command and closing the terminal/shell will result in the command getting interrupted/exiting.

nohup will work and so will screen. Have a look at the screen command.

Code:
man screen

You will need the screen package installed first.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run script in new terminal

Hi Guys, I have a script that runs certain simulations in batch mode. I need to schedule some simulations to run over night. For each simulation to complete it should be run in separate terminal. My script is as follows sh run_test.sh <arg1> <arg2> <arg3> ... I need to launch this... (5 Replies)
Discussion started by: aelhosiny
5 Replies

2. Shell Programming and Scripting

Who -u gives different output if run from cron than if run from terminal?

If I run 'who -u' interactively or from a script invoked through bash in a tty on my Ubuntu 12LTS box I get an output like this: testuser pts/0 Dec 9 02:32 . 2163 (host.xx.yy) running the same through cron I get: testuser pts/0 2012-12-09 02:32 00:05 2163... (2 Replies)
Discussion started by: latimer
2 Replies

3. UNIX for Dummies Questions & Answers

Prevent terminal from closing after command execution

Hello, I want to create application which launches some terminal, then some command is executed on that terminal and then prevent terminal from closing. I started to do on gnome-terminal because the Gnome is the most widely used desktop-manager in the Linux distributions. I want to do... (3 Replies)
Discussion started by: tyanata
3 Replies

4. Emergency UNIX and Linux Support

Nohup process getting killed after closing PUTTY session

I am running a process in nohup . nohup getkeys.ksh 132 > 132.out & When I close the putty terminal,The process is getting killed . default_signal_handler called for signal no: 1 Is there a way to keep the process running even If I close the terminal (2 Replies)
Discussion started by: prasperl
2 Replies

5. UNIX for Dummies Questions & Answers

Script to run a command in a new terminal

Hey, I am trying to write a script that will open all of my session windows, and then secure shell into the appropriate server in the new windows. Seems simple, but I cant get it to work! Please help! :confused: (1 Reply)
Discussion started by: sojo1024
1 Replies

6. Shell Programming and Scripting

script to monitor the process system when a process from user takes longer than 15 min run.

get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same. hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
Discussion started by: kirankrishna3
1 Replies

7. Shell Programming and Scripting

bash: closing file descriptors from a process

Below is a test script to illustrate a problem from a larger script I am writing. $ cat /tmp/loggingtest #!/bin/bash lvcreate -s -l 100%FREE -n var-data-snapshot vg00/var-data 2> >(logger -t "loggingtest.crit") 1> >(logger -t "loggingtest.info") sync & wait lvremove -f... (1 Reply)
Discussion started by: jelloir
1 Replies

8. Shell Programming and Scripting

Terminal is closing on exit in ksh

hi while executing the following script, my terminal window is getting closed if I enter a invalid option. I want the script should go back the the command prompt. how to do achive it. i execute the script as . ./test #! /usr/bin/ksh Printf " Type of Installer : \n\t\t 1. Whole Build... (3 Replies)
Discussion started by: vij_krr
3 Replies

9. Linux

run script through terminal

for all friends i am using linux enterprise 4. i installed oracle 10g in user name oracle.at the end of install i got a pop up window saying that u should run the following scripts(root.sh,orainstRoot.sh) in terminal from root account(cui) without log out oracle account . how i can run these... (5 Replies)
Discussion started by: sadiquep
5 Replies

10. UNIX for Dummies Questions & Answers

Closing ssh when process run on remote

Hi! I currently run a very long script (two hour left...) on a remote computer through a ssh session. I wonder whats happend if I close the ssh session, or even, the terminal. Is the script running on remote will stop? Thanks for your answers, Tp (1 Reply)
Discussion started by: tipi
1 Replies
Login or Register to Ask a Question