创建screen自启动脚本

SYNOPSIS
       screen [ -options ] [ cmd [ args ] ]
       screen -r [[pid.]tty[.host]]
       screen -r sessionowner/[[pid.]tty[.host]]

COMMAND-LINE OPTIONS
       Screen has the following command-line options:

       -a   include all capabilities (with some minor exceptions) in each win‐
            dow's termcap, even if screen must redraw parts of the display  in
            order to implement a function.

       -A   Adapt  the  sizes of all windows to the size of the current termi‐
            nal.  By default, screen tries to restore  its  old  window  sizes
            when  attaching to resizable terminals (those with "WS" in its de‐
            scription, e.g. suncmd or some xterm).

       -c file
            override the default configuration file from "$HOME/.screenrc"  to
            file.

       -d|-D [pid.tty.host]
            does  not  start screen, but detaches the elsewhere running screen
            session. It has the same effect as typing "C-a  d"  from  screen's
            controlling  terminal.  -D  is  the equivalent to the power detach
            key.  If no session can be detached, this option  is  ignored.  In
            combination  with  the  -r/-R  option more powerful effects can be
            achieved:

       -d -r   Reattach a session and if necessary detach it first.

       -d -R   Reattach a session and if necessary detach or  even  create  it
               first.

       -d -RR  Reattach  a  session  and if necessary detach or create it. Use
               the first session if more than one session is available.

       -D -r   Reattach a session. If necessary  detach  and  logout  remotely
               first.

       -D -R   Attach here and now. In detail this means: If a session is run‐
               ning, then reattach. If necessary detach  and  logout  remotely
               first.   If  it  was not running create it and notify the user.
               This is the author's favorite.

       -D -RR  Attach here and now. Whatever that means, just do it.

            Note: It is always a good idea to check the status  of  your  ses‐
            sions by means of "screen -list".

       -e xy
            specifies the command character to be x and the character generat‐
            ing a literal command character to y (when typed after the command
            character).   The default is "C-a" and `a', which can be specified
            as "-e^Aa".  When creating a screen session, this option sets  the
            default  command character. In a multiuser session all users added
            will start off with this command character. But when attaching  to
            an  already  running session, this option changes only the command
            character of the attaching user.  This option is equivalent to ei‐
            ther the commands "defescape" or "escape" respectively.

       -f, -fn, and -fa
            turns  flow-control  on, off, or "automatic switching mode".  This
            can also be defined through the "defflow" .screenrc command.

       -h num
            Specifies the history scrollback buffer to be num lines high.

       -i   will cause the interrupt key (usually C-c) to interrupt  the  dis‐
            play  immediately  when  flow-control  is  on.   See the "defflow"
            .screenrc command for details.  The use of this option is discour‐
            aged.

       -l and -ln
            turns  login  mode  on  or off (for /run/utmp updating).  This can
            also be defined through the "deflogin" .screenrc command.

       -ls [match]
       -list [match]
            does not start screen, but prints a list of  pid.tty.host  strings
            and  creation  timestamps  identifying your screen sessions.  Ses‐
            sions marked `detached' can be resumed  with  "screen  -r".  Those
            marked  `attached' are running and have a controlling terminal. If
            the session runs in multiuser mode, it is marked `multi'. Sessions
            marked  as  `unreachable'  either  live on a different host or are
            `dead'.  An unreachable session is considered dead, when its  name
            matches either the name of the local host, or the specified param‐
            eter, if any.  See the -r flag for a description how to  construct
            matches.   Sessions  marked as `dead' should be thoroughly checked
            and removed.  Ask your system administrator if you are  not  sure.
            Remove sessions with the -wipe option.

       -L   tells screen to turn on automatic output logging for the windows.

       -Logfile file
            By  default logfile name is "screenlog.0". You can set new logfile
            name with the "-Logfile" option.

       -m   causes screen  to  ignore  the  $STY  environment  variable.  With
            "screen  -m"  creation  of  a  new session is enforced, regardless
            whether screen is called from within  another  screen  session  or
            not.  This  flag has a special meaning in connection with the `-d'
            option:

       -d -m   Start screen in "detached" mode. This creates a new session but
               doesn't  attach  to  it.  This  is  useful  for  system startup
               scripts.

       -D -m   This also starts screen in "detached" mode, but doesn't fork  a
               new process. The command exits if the session terminates.

       -O   selects  an optimal output mode for your terminal rather than true
            VT100 emulation (only affects auto-margin terminals without `LP').
            This  can  also  be  set in your .screenrc by specifying `OP' in a

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值