Reputation: 1333
I'd like to know if someone has tried logging their gnu-screen session to a logfile (other than the default screenlog.N where N is the session number).
I tried doing the following
~$ screen -L custom_screenlog -S test_session
but screen would terminate. It's not also in the screen manual. Tried searching Google and I can't seem to see an answer.
Thanks.
Upvotes: 8
Views: 3663
Reputation: 4384
My 4.0.2 version of GNU screen has no argument to -L
switch. The log file is systematically named screenlog.0
and created in the current directory.
Then you may simply try:
screen -L -S test_session
Edit:
you can customize your .screenrc
file, adding for instance
logfile /tmp/screenlog-%Y%m%d-%c:%s
This way log files may be stored in a predefined directory (/tmp
in this example)
and may be named after logfile opening date
Upvotes: 16