By Sean Reifschneider Date 2010-01-17 13:56 Tags linux, screen, sean reifschneider
On some systems I have long-running screen sessions, like on one system where I run folding under it, and I've also started running the zfs-fuse daemon under screen. The normal naming causes me to end up with a bunch of screens that I have to hunt through to find the one I want:
guin:~$ screen -x
You may wish for a screen, what do you want?
13658.pts-13.guin (Detached)
13639.pts-13.guin (Detached)
13678.pts-13.guin (Attached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
zsh: exit 1 screen -x
guin:~$
I started hunting for a way to get some more information about what was on each screen, and found the "-S [sessionname]" option. Just what I need:
root@stow:~# screen -x
There are several suitable screens on:
20873.pts-4.stow (Detached)
20303.zfs (Detached)
20224.folding (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
root@stow:~#
So now I can see which one s the one I started for just whatever (the "pts" one), and I can resume screen sessions with "screen -x folding" or "screen -x pts" to get to the generic one.
comments powered by Disqus