Stop Microsoft
Welcome,
Guest
. Please
login
or
register
.
Have you missed your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length.
News:
Home
Help
Login
Register
Stop Microsoft
»
Operating Systems
»
Linux and UNIX
»
Running a command when I logout
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Running a command when I logout (Read 558 times)
TheQuirk
VIP
Member
Posts: 2,154
Kudos: 315
Running a command when I logout
«
on:
18 December 2002, 10:25 »
I'm running "rsync" now for about 7 hours, and I want to log off (it's a remote computer). How would I make the command still be in effect? I put "rsync" to run at 11:59pm, but that's two hours away. . .
Logged
voidmain
VIP
Member
Posts: 5,605
Kudos: 184
Running a command when I logout
«
Reply #1 on:
18 December 2002, 10:30 »
Are you redirecting the output of the command to a file? If so you should be able to stop the job with a ^Z (CTRL+z) and put it into background by typing "bg". Now if the remote machine is not a linux box or not a bash shell you might have to "nohup" it.
But since it is an rsync you should be able to kill it and it should pick up where it left off when you restart it. To start it in the background you would:
$ rsync -option1 -option2 -etc > rsync.log 2>&1 &
By running it in the background you will be able to log off and it will continue to run.
[ December 18, 2002: Message edited by: void main ]
Logged
Someone please remove this account. Thanks...
Print
Pages: [
1
]
Go Up
« previous
next »
Stop Microsoft
»
Operating Systems
»
Linux and UNIX
»
Running a command when I logout