run scp in background

for scping large files, its very comfortable to let them run in the background.

especially when you are at home and want to turn off the pc and let the servers do their work over night.

how to:

execute the normal scp command, eg:

$ scp localfile.tar.bz2 user@server.ch:/path/on/server/

after confirming the key and authentificating (if necessary), you can "stop" the job by pressing : ctrl + Z

[1]+  Stopped                 scp localfile.tar.bz2 user@server.ch:/path/on/server/

then you can proceed the job in the background by typing

$ bg
[1]+  scp localfile.tar.bz2 user@server.ch:/path/on/server/  &

finally, to make sure the process is working in background, control it with the command

$ jobs
[1]+  Running                 scp localfile.tar.bz2 user@server.ch:/path/on/server/   &

now, you can go to bed and turn off your pc. :)

oh yeah, by the way... you can to this with every command you like to.

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Sie können syntax highlighting von Quelltext aktivieren, indem Sie folgende Tags einsetzen: <code>, <blockcode> The supported tag styles are: <foo>, [foo]. PHP-Quelltext kann auch in "<?php ... ?>" oder "<% ... %>" eingepackt werden.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zeilen und Absätze werden automatisch erzeugt.
  • Sie dürfen andere Beitrage mit [quote] Tags Zitieren.

Weitere Informationen über Formatierungsoptionen

CAPTCHA
Diese Frage dient dazu festzustellen, ob Sie ein Mensch sind und um automatisierte SPAM-Beiträge zu verhindern.
S
4
e
F
1
a
Enter the code without spaces and pay attention to upper/lower case.
 

Too Cool for Internet Explorer