Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Why do you use vnc?
Use a X server instead, it is better on all grounds (perf, multiuser collision, CPU usage, memory usage, bandwidth, scalability, monitoring etc...)
Anyway,
if you let the terminal open, the gzip will continue even after you close the vnc session, because there is no link between the vnc session and the gzip command. However, if you close the terminal, which is the parent process, the gzip will terminate.
Use nohup if you want it to continue after the parent terminates.
That's good to know!
Can you bring it back to the foreground after logging in again at a later time?
There is no such thing as foreground and background.
If you want the output of gzip after you close the terminal, you can't because the standard output of gzip is the terminal. What you can do is redirect the output to somewhere else and check that where you redirected it.
gzip -f -r * 2>&1 >somewhere &
When you log back on, a new shell is created which only knows about the child (job) processes that it has created. You can't re-connect to a child that was launched by another shell, even if that child is still running.
If you want to capture and peruse its output, use the '>', '2>' directives to pipe the stdout/stderr output to a permanent disk file.
Can you bring it back to the foreground after logging in again at a later time?
I use screen for this. Before running the program in the console, type 'screen' which puts the output to a virtual terminal. To detach the screen and get back to regular console, type 'ctrl+a + ctrl+d'. If you want to reattach the screen to view the output; 'screen -r'. I run a bittorrent client on the console and use this to check the status of it remotely w/ ssh.
I use screen for this. Before running the program in the console, type 'screen' which puts the output to a virtual terminal. To detach the screen and get back to regular console, type 'ctrl+a + ctrl+d'. If you want to reattach the screen to view the output; 'screen -r'. I run a bittorrent client on the console and use this to check the status of it remotely w/ ssh
I use screen for this. Before running the program in the console, type 'screen' which puts the output to a virtual terminal. To detach the screen and get back to regular console, type 'ctrl+a + ctrl+d'. If you want to reattach the screen to view the output; 'screen -r'. I run a bittorrent client on the console and use this to check the status of it remotely w/ ssh.
regards,
...drkstr
meh, cheers mate,
Wanted something like this for the exact same purpose a little while ago.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.