This is how the output of screen -ls looks like for many years on one older Debian machine:

artax:~> screen -ls
There are screens on:
        46785.pts-6.artax       (08/26/2019 04:41:05 AM)        (Detached)
        2499.pts-0.artax        (05/11/2019 07:30:55 PM)        (Detached)
artax:~> screen --version
Screen version 4.01.00devel (GNU) 2-May-06

But now, on the new CentOS, the output doesn't contain the date & time:

user@comp:~$ screen -ls
There is a screen on:
        1759.pts-0.user-comp     (Detached)
1 Socket in /var/run/screen/S-user.

user@comp:~$ screen --version
Screen version 4.01.00devel (GNU) 2-May-06

The date & time of the session is important for me - I have a nice script which uses this information. How do I invoke it in the CentOS version of the screen command?

I searched the manpage but with no success.

EDIT: there is also a difference on manual pages: Debian version:

-ls [match] -list [match] does not start screen, but prints a list of pid.tty.host strings and creation timestamps identifying your screen sessions.

CentOS version:

-ls [match] -list [match] does not start screen, but prints a list of pid.tty.host strings identifying your screen sessions.

  • are you sure the process 1759 is still here ? – EchoMike444 Nov 22 at 23:57
  • @EchoMike444 yes it is. And I was able to attach the session using screen -dr. – Tomas Nov 22 at 23:58

version 4.0.1 is very old :)

the creation timestamp is a debian specific patch

source :


because the number is the pid of screen , you can use ps to display the starting time of one process .

 ps -o lstart= -p 21628
 Fri Nov 22 18:49:50 2019

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.