How do you start Unix screen command with a command?

后端 未结 6 1256
情歌与酒
情歌与酒 2020-12-13 03:20

According to the docs for the Unix \"screen\" command, you can configure it in .screenrc to start with a bunch of default screens, each running a command that you specify.

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 03:41

    Try this:

    $ screen -S 'tailf messages' -d -m tailf /var/log/messages
    

    Then later you can do:

    $ screen -ls
    1234.tailf messages
    

    Followed by:

    $screen -r 1234
    

提交回复
热议问题