首页 > 系统相关 >linux screen 常用

linux screen 常用

时间:2022-11-22 11:45:51浏览次数:48  
标签:常用 .- screen possible window session linux detached

  1. 安装
    •  yum install screen
  2. 常用命令
    • Use: screen [-opts] [cmd [args]]
      or: screen -r [host.tty]

      Options:
      -4 Resolve hostnames only to IPv4 addresses.
      -6 Resolve hostnames only to IPv6 addresses.
      -a Force all capabilities into each window's termcap.
      -A -[r|R] Adapt all windows to the new display width & height.
      -c file Read configuration file instead of '.screenrc'.
      -d (-r) Detach the elsewhere running screen (and reattach here).
      -dmS name Start as daemon: Screen session in detached mode.
      -D (-r) Detach and logout remote (and reattach here).
      -D -RR Do whatever is needed to get a screen session.
      -e xy Change command characters.
      -f Flow control on, -fn = off, -fa = auto.
      -h lines Set the size of the scrollback history buffer.
      -i Interrupt output sooner when flow control is on.
      -l Login mode on (update /var/run/utmp), -ln = off.
      -ls [match] or
      -list Do nothing, just list our SockDir [on possible matches].
      -L Turn on output logging.
      -m ignore $STY variable, do create a new screen session.
      -O Choose optimal output rather than exact vt100 emulation.
      -p window Preselect the named window if it exists.
      -q Quiet startup. Exits with non-zero return code if unsuccessful.
      -Q Commands will send the response to the stdout of the querying process.
      -r [session] Reattach to a detached screen process.
      -R Reattach if possible, otherwise start a new session.
      -s shell Shell to execute rather than $SHELL.
      -S sockname Name this session <pid>.sockname instead of <pid>.<tty>.<host>.
      -t title Set title. (window's name).
      -T term Use term as $TERM for windows, rather than "screen".
      -U Tell screen to use UTF-8 encoding.
      -v Print "Screen version 4.01.00devel (GNU) 2-May-06".
      -wipe [match] Do nothing, just clean up SockDir [on possible matches].
      -x Attach to a not detached screen. (Multi display mode).
      -X Execute <cmd> as a screen command in the specified session.

  3. 测试

                      开启一个screen会话 # screen -L
                                                   [screen is terminating]

                      执行命令  # myloader  -u root -a -S /data/3306/mysql.sock -t 8 -d /data/backup/ -o

                      放入后台知行:control+a+d

                      回到screen: # screen -r

                                         [detached from 22910.pts-0.bigdata-client05]

 

标签:常用,.-,screen,possible,window,session,linux,detached
From: https://www.cnblogs.com/bygnee/p/16914645.html

相关文章

  • Golang常用的工具函数,无依赖,常更
    util.go//Executef()ntimesonfailfuncRetryHandler(nint,ffunc()(bool,error))error{ok,er:=f()ifok&&er==nil{returnnil}ifn-1>0......
  • 换行、回车、空格等常用的ASCII码值
    换行符的ASCII码值为10,十六进制表示为0x0A回车符的ASCII码值为13,十六进制表示为0x0D空格符的ASCII码值为32,十六进制表示为0x20以下列出其他一些常用到的符号的ASCII码......
  • Linux学习记录
    Linux学习记录学习背景:当今IT世界,一个合格的后端程序员,熟练掌握Linux系统和容器化部署是必备的,在这里重温加进一步学习这里安装具体过程不作记录,网上有很多一、Ubuntu18.......
  • 使用linux的特点
    1、稳定性和高效性:因为Linux是由Unix发展而来,因此Linux与Unix有许多相似之处,不只是用户接口和操作方式,Linux还继承了Unix卓越的稳定性和高效性。对于使用Linux......
  • ASP.NET CORE MVC 开发常用代码备份
    1.在页面中进行注入配置文件操作注册对象classProgram{staticvoidMain(){Host.CreateDefaultBuilder().ConfigureWebHostDefaults(builder=>......
  • C#中byte[]字节数组复制的常用方法
    简单总结了5种字节数组的复制方法for循环实现复制较为原始的遍历写法,不太推荐byte[]data=newbyte[]{0,1,2,3,4,5,6,7,8,9};byte[]data1=newbyte[data.length]......
  • linux常用命令
    文件解压#压缩tar-czvftinyproxy.tar.gztinyproxy/#解压tar-zxvftinyproxy.tar.gz/usr/local/tinyproxy/软链接#ln-s文件或目录软链接的名称ln-s/va......
  • Linux无头模式使用mat分析dump的方法
    摘要mat可以很好的进行jvm的内存dump的分析.但是大部分服务器是没有GUI界面的.而且就算是有GUI界面也很难直接使用.但是随着jvm堆区越来越大.WindowsPC机器已经很难......
  • Springboot整合Swagger常用注解(三)
    swagger注解主要是用来给swagger生成的接口文档说明用的1、@Api使用范围:用在类上注解,控制整个类生成接口信息的内容,表示对类的说明,也代表了这个类是swagger2的资源参......
  • Linux运维笔记[6]-备份和恢复
    备份[https://www.cnblogs.com/OneDirection/articles/9797833.html]因为服务器主要是通过docker容器运行微服务,所以主要备份docker镜像docker退出状态码[https://z......