Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I'm trying to set up some backup scripts and am learning to copy files and directories from one server to another. I started to scp a file between ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11

    login to a server, what happens to a process if I close my terminal?


    Hi all,
    I'm trying to set up some backup scripts and am learning to copy files and directories from one server to another. I started to scp a file between two remote servers (actually im not sure, is a server considered remote if I login to it using ssh and then use my scp command?) and then realized the copying was going to take hours, so I wanted to stop the copy but I dont know what command to issue, or how to gain control of the command line again from the currently running process of the scp. When I close the terminal does the process stop?

    Thanks,
    Erin

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,376
    Yes, the scp will be killed.

    To avoid that, you can use a cronjob. This is for scripts that shall be called at a designated time and without user interaction.
    If you need/want to have an interactive shell, then a common way is to start a "screen" session, call your programs and then detach.

    This page gives a short introduction to screen:
    Linux Screen Tutorial and How To - rackAID
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Aug 2011
    Posts
    11
    Thanks, thats exactly what I needed to know.

Posting Permissions

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