5

How can I run a console command (like cp or tar, for example) without needing to keep an open SSH?

Ivan
  • 3,288
  • 19
  • 48
  • 70
  • See http://serverfault.com/questions/311593/keeping-a-linux-process-running-after-i-logout/312265#312265 – w00t Jan 05 '14 at 19:57

5 Answers5

10
nohup command &
Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
7

Depending on exactly what you want to do, screen may work out for you.

You can run the command with screen, screen command then detach that screen and terminate your ssh session. Whatever is running in that screen session will still run, and you can re-attach to that session later, from another terminal.

Alex
  • 6,477
  • 1
  • 23
  • 32
2

When running commands remotely with ssh the -T option will also help.

Banis
  • 166
  • 3
1

Since you don't provide a lot of detail, it is also possible that disown will do what you want.

Nathan Powell
  • 579
  • 2
  • 6
0

If it is a task you anticipate repeating over and over again, you can create a cron job.

http://en.wikipedia.org/wiki/Cron

Tyler K
  • 256
  • 1
  • 6