LINUX.ORG.RU

Каждый раз новый screenlog.0 при запуске screen

 , , ,


0

1

Запускаю screen с параметрами screen -AmdSL, где L - логирование экрана. Выход из screen осуществляется командой screen -X quit. Вопрос: как сделать, чтобы при каждом запуске screen записывался новый screenlog.0? Т.к. сейчас все запуски записываются в один файл screenlog.0.

Не знаю, в тему или нет, но:

@kindex H
@deffn Command log [state]
(@kbd{C-a H})@*
Begins/ends logging of the current window to the file
@file{screenlog.@var{n}} in the window's default directory, where
@var{n} is the number of the current window.
This filename can be changed with the @samp{logfile} command.
If no parameter is given,
the logging state is toggled.  The session log is
appended to the previous contents of the file if it already exists. The
current contents and the contents of the scrollback history are not
included in the session log.  Default is @samp{off}.
@end deffn

das_tier ★★★★★
()
Ответ на: комментарий от das_tier

Короче там в исходниках O_APPEND, так что только пересобирать

das_tier ★★★★★
()
cat ~/.screenrc

## Устанавливаем расположение и именование лог-файлов
logfile /var/log/screen/$USER@%H-%Y%m%d-%c:%s.log

## By default, screen uses an 8-color terminal emulator. Use the following line to enable more colors, which is useful if you are using a more-capable terminal emulator:
term screen-256color

## Устанавливает функцию записи отметок времени в лог-файл
logtstamp on
vtVitus ★★★★★
()
Ответ на: комментарий от das_tier

при каждом запуске будет создаваться новый screenlog - всё остальное уж дело техники и рук.

vtVitus ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.