Running process in background
Hi All,
Is there any way to run a long process in background so that it still remain in running state even if the user logout the system. NOTE: In BASH shell. |
Yes, use nohup or start it in 'screen'.
Code:
nohup command-here >/dev/null 2>&1 & |
Hi AlucardZero,
I think this command dosent work in BASH shell. |
It doesn't matter what shell you're in; it will work if nohup (or screen) is installed.
Would you like to post the exact command you are running and exactly what you get back? Copy and paste and use code tags. |
coproc
Quote:
|
Where does one find this coproc? It's not in "man bash" on my bash 3.2.39 (Debian Lenny), nor is it a binary in Lenny
|
Quote:
Code:
which nohup if it depends on xorg then it wont keep running when you exit (and kill xorg). |
Quote:
GNU bash, version 4.1.7(2)-release (i486-slackware-linux-gnu) on Slackware 13.1 The way to do it with screen is screen -dmS -X <command to execute> |
Thanks for all your inputs,
last confusion is scenario- i login to server through PUTTY and the server has a property that if a user is inactive lets say 20 odd mins. then that user auto logout even if the user is running an long copy command. please tell me where to set this type of property, or tell me where to get this knowledge. second thing is if i run that long time taking command through screen then would this auto logout property also inherit to the virtual sub-shell also. Cannot open your terminal '/dev/pts/20' - please check. i am getting this for screen command is this means i have no access to screen then how to do this. I know i am demanding lot of things. Any help highly appreciated. |
adding to my last post is there any alternative to screen command as nohup command is not working as i am using BASH shell.
|
^ please post the output of:
Code:
which nohup Code:
nohup cp <source> <whatever-floats-your-boat> Code:
[schneidz@hyper ~]$ which nohup |
Quote:
|
Quote:
And when not using screen, putting an & at the end of a cp command will ensure the jobs will keep running if they get disconnected. |
All times are GMT -5. The time now is 05:00 PM. |