Why isn’t screen saving my serial session to a log file?

0
0
Asked By VelvetPine42 On

I'm using screen to connect to a serial port for administering some storage hardware, but the session isn't being logged. This is the command I tried:

`/usr/bin/screen /dev/ttyUSB0 115200 -L -logfile /home/davidkmcw/Logfiles/2026-07-24_08:30:14.txt`

I have write access to the destination directory and have checked the path carefully. What am I missing?

1 Answer

Answered By CopperMango7 On

The screen options need to come before the serial device and baud-rate arguments. Try putting `-L` and `-Logfile` immediately after the screen command:

`/usr/bin/screen -L -Logfile /home/davidkmcw/Logfiles/2026-07-24_08-30-14.txt /dev/ttyUSB0 115200`

The filename doesn’t need special quoting just because it contains colons; the important issue is the argument order.

VelvetPine42 -

That fixed it. I didn’t realize screen was that strict about the order of its command-line options.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.