Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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...
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 .
Originally posted by hanzerik 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 .
what about if i am using an app for a while, and then want to put it in the background, thats why i mention the ctrl-something
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.
Last edited by ryanstrayer; 01-29-2002 at 05:26 PM.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.