Очень удобная штука. Создается виртуальный терминал. Если отваливается коннект от реального терминала (например, проблемы с сетью), заходим снова на хост (по ssh или telnet) заходим с скрин, а тут все работает, что работало не в bg а в fr режиме. Классная штука.
k4@k4-desktop:~$ screen
Screen version 4.00.03jw4 (FAU) 2-May-06
Copyright (c) 1993-2002 Juergen Weigert, Michael Schroeder
Copyright (c) 1987 Oliver Laumann
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program (see the file COPYING); if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Send bugreports, fixes, enhancements, t-shirts, money, beer & pizza to
screen@uni-erlangen.de
[Press Space for next page; Return to end.]
Жмем enter.
k4@k4-desktop:~$ tail -f /var/log/syslog
May 6 11:55:16 k4-desktop snmpd[1597]: error on subcontainer 'ia_addr' insert (-1)
May 6 11:56:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:57:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:58:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:59:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:59:46 k4-desktop snmpd[1597]: error on subcontainer 'ia_addr' insert (-1)
May 6 12:00:01 k4-desktop CRON[21925]: (www-data) CMD (php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log)
May 6 12:00:16 k4-desktop snmpd[1597]: error on subcontainer 'ia_addr' insert (-1)
May 6 12:01:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 12:02:25 k4-desktop snmpd[1597]: last message repeated 2 times
Закрываю putty. Захожу заново.
k4@k4-desktop:~$ screen -ls
There is a screen on:
22124.pts-3.k4-desktop (06.05.2011 12:02:51) (Detached)
1 Socket in /var/run/screen/S-k4.
k4@k4-desktop:~$
k4@k4-desktop:~$ screen -r 22124.pts-3.k4-desktop
k4@k4-desktop:~$ tail -f /var/log/syslog
May 6 11:55:16 k4-desktop snmpd[1597]: error on subcontainer 'ia_addr' insert (-1)
May 6 11:56:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:57:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:58:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:59:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 11:59:46 k4-desktop snmpd[1597]: error on subcontainer 'ia_addr' insert (-1)
May 6 12:00:01 k4-desktop CRON[21925]: (www-data) CMD (php /usr/share/cacti/site/poller.php >/dev/null 2>/var/log/cacti/poller-error.log)
May 6 12:00:16 k4-desktop snmpd[1597]: error on subcontainer 'ia_addr' insert (-1)
May 6 12:01:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 12:02:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 12:03:25 k4-desktop snmpd[1597]: last message repeated 2 times
May 6 12:04:25 k4-desktop snmpd[1597]: last message repeated 2 times
Вот так.