put task in backgrond with keystroke
i have been using a motion of ctrl-z, followed by bg, to put tasks in the background. this can be inneficient, and dosent work for some tasks that cant be stopped or they mess up, example: a download. if anyone knows a ctrl-something, or how to set one up to put a task directly in the backround, and avoid stopping it i would greatly appreciate it.
|
You can append '&' after the command name it will put the task on background but you'll get all the warnings and errors that the task you are running may throw in your face, so you can redirect the output of it to a file or /dev/null if it's not imporatnt to you. To redirect error channel use as this
[shell]$ command > to_file.txt 2>&1 & |
i know you can just put an & after it, but i am talking about a prog, that i use for a while, and then put in the background, so i can logout or get it out of the way while its doing whatever. ctrl-z and bg does exactly what i want, but it stops the task, i am looking for a ctrl-something to do the same thing as ctrl-z, except put it in the background, instead of stopping it.
|
sorry man, I don't have a clue, I understand what you are talking about, and unfortunately there is no answer from me; I've looked over all my UNIX books and I couldn't find it.
|
Try using the 'disown" command - that might be what your looking for.
List your processes then type ' disown 123 ' ... 123 being your process ID. |
that is actually something i didnt know and may be useful, but what i was looking for was a ctrl-something, so you could just do it to the running task. There must be a way to do this, as there is one of these for just about everythign else. ie. ctrl-z - stop, ctrl-c - stop, etc.etc.etc...
|
Hmm you must be using some window manager I don't know about - never heard of what you're trying to do either.. ;)
|
i am thinking of mainly console applications
|
use screen.
this is what i use for setiathome: screen /home/hanzerik/setiathome . After I type that i can close my ssh connection and it will stay running. To switch back to that program use screen -r . |
Quote:
|
Why don't you just leave it up - and switch consoles? That's what I do.. if I'm running something and I want to leave it up, but do other stuff - I'll just switch to tty2 or whatever... that's essentially the best way locally... screen as mentioned above, also works very well, esspecially if you want to resume a session of something from a SSH console or something.
|
i would be using this mainly remotely. there is a ctrl-z to stop a proccess, what i need to know is if there is a ctrl-something to put it in the background.
|
All times are GMT -5. The time now is 11:17 PM. |