Putty - FreeBSD question

If i use putty to remotely ssh connect to my FreeBSD machine and i use command that will take long time. For example to compile MySQL5 from the source.

is it possible to do it so i can give the command and then turn off putty and server still compiles MySQL until is done? So i don't have to wait with putty turn on until the end?
 
I'm not sure but you can try something like this
Code:
anyCommandHere > /dev/null
If I'm not mistaken it should redirect output from your console and be executed without your putty being connect
 
So something like this is ok:

make install > /dev/null

What abaut this character &.

What does it do if i put it in the end?
 
Attach the putty terminal to a system console (/dev/ttyv?):
Code:
watch -W /dev/ttyv2
Now start your process
Type ctrl-w and a not existing terminal name to quit watch
ttyv2 will keep on running when putty is killed.

The screen will not be updated when taking back a running terminal with watch.
 
I advise you to just install sysutils/screen and be done with it. If you don't want extra software, I'd suggest

[cmd=]somecommand > /var/log/somecommand.log 2>&1 &[/cmd]

When you log back in, just check the logfile to see whether the command has finished ((un)successfully), or run a tail -f on it.

There's also nohup(1) which does roughly the same thing.
 
Stamps said:
If i use putty to remotely ssh connect to my FreeBSD machine and i use command that will take long time. For example to compile MySQL5 from the source.

is it possible to do it so i can give the command and then turn off putty and server still compiles MySQL until is done? So i don't have to wait with putty turn on until the end?

You want to uses the terminal multiplexer, screen. It is IMHO an indispensable tool.
 
Back
Top