1

I can do this:

mkdir tmp
cd tmp
screen -L some_command

and I get a screenlog.0 file in the local directory.

But when I do this, no log exists:

screen -Logfile /tmp/log.txt

Giving a full filename does not work? What else would work?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy
2
  • 2
    -L and -Logfile are two different options, and neither implies the other, so you still need to add -L to tell screen to log to a file: screen -L -Logfile /tmp/log.txt
    – kos
    Commented Jun 13 at 22:21
  • Wow. That is just lame. I mean, I am telling it about a log file. And I would do this while not wanting to log. So, I need to say: "Oh, and where I told you to log. You need to log." Just, wow.
    – Ray Kiddy
    Commented Jun 15 at 5:02

1 Answer 1

1

Apparently if I use the -Logfile <file> option to tell it where to log, I need to ALSO use the -L option.

1
  • When you're inside a screen session, you can start / stop logging using Ctr+A / Shift+H. Being able to specify a log file without -L allows to start a session without logging right away, and to start logging, when needed, to a specific file.
    – kos
    Commented Jun 15 at 9:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .