I need to log into my server and tar up a huge directory of about 150GB, but I need to run the command so when I get back home, it's still running.
can I just SSH into my server from my laptop, run the tar command, and head home? how do I check the status of the tar when I get back home, etc...
thank you
You could first execute
screen
and then run the command within screen.or
You could run the command using
nohup
I would prefer
screen
as you can resume the session and see the progress.. When you get home runscreen -r
and it will "reattach" the session you left on your laptop.You need screen, which lets you start one or more shell sessions and then detach from them and reattach to them. If you've never heard of it before, run and read the web page now! It's a fantastically useful tool for just the situation you describe.
Why not just run your command using
at
orcron
.at
is easy but it is not always installed by default, but it should be available from your package manager. Install it then run it like so.it will open a shell, type you commands there
press control-D and start
/etc/init.d/atd
. Logoff and check back later. Look at/tmp/out
for output log.Or you could use
cron