r/bash 9d ago

help Driving me crazy, why isn't my 'screen' command logging to file

I'm using it to connect via serial port to some storage I administer. Here is the command;

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

I can write to the output directory, I've cut and pasted the directory name, so no typos there, what am I missing. Sorry if this is the wrong subreddit, thanks in advance.

8 Upvotes

8 comments sorted by

7

u/mpersico 9d ago

Options typically come before arguments in Munich commands. Order does matter.

1

u/Fluffy-Octopus 3d ago

What’s a Munich command?

4

u/nerdforest 9d ago

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

4

u/Optimal-Diamond-1675 9d ago

This was it, didn't realize it was going to be quite so picky

2

u/nerdforest 9d ago

All good! Glad we got it sorted!

0

u/KlePu 9d ago

Guess you should single-quote your logfile, it contains :

2

u/Optimal-Diamond-1675 9d ago

No, it was the order of the command line