Results 1 to 3 of 3

Thread: how to foreground after backgrounding and closing shell?

  1. #1
    Join Date
    Jun 2008
    Location
    Brisbane, Australia
    Posts
    207

    Arrow how to foreground after backgrounding and closing shell?

    I secure-copied (scp) a file from one box to another. I ctrl-z, I backgrounded, and then quit/exited the parent shell (konsole). I can see the job is still running with "ps aux" but I have no access to it anymore. I can't view the 'progress bar' to see ... well ... the PROGRESS!

    Can I foreground it again somehow? I googled - but nothing.
    NVIDIA! Listen to your customers! We want Free drivers.
    Petition #1. Petition #2. Use your VOICE! Sign the petitions!

  2. #2
    Join Date
    Sep 2008
    Location
    USA
    Posts
    60

    Default Re: how to foreground after backgrounding and closing shell?

    use the fg command to bring it back to the forground
    My Karma ran over your dogma.
    Unknown

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: how to foreground after backgrounding and closing shell?

    You can't reconnect it to a terminal again.

    Next time you want to do some long operation but you also want to watch the progress at intervals from different terminals, have a look at the program "screen". It starts off a terminal session with a CLI shell and you can detach the session and reattach later. Something like this

    Code:
    $ screen
    # in new session now
    $ some long command
    Ctrl-A D
    # session detached, back at original shell
    $
    Sometime later, from anywhere:

    Code:
    $ screen -r
    # reattached to floating session
    # your command may or may not have finished

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •