故事
首页
指南
  • Java
  • Python
  • Linux
  • 前端
  • Docker
  • 实践
  • 折腾
  • 分类
  • 标签
  • 归档
壁纸 (opens new window)
GitHub (opens new window)
首页
指南
  • Java
  • Python
  • Linux
  • 前端
  • Docker
  • 实践
  • 折腾
  • 分类
  • 标签
  • 归档
壁纸 (opens new window)
GitHub (opens new window)
  • 服务器环境

    • Centos7安装Python3环境
    • 从零搭建Linux虚拟机环境
    • bash常用的快捷键
    • 阿里云服务器挂载阿里云盘
    • centos7防火墙命令
    • 阿里云服务器启用密钥登录并禁用密码登录
    • Linux服务器文件目录共享映射配置
    • 腾讯云服务器存在对外攻击行为的处理
    • Linux设置swap空间
    • 链接和别名(ln、alias)
    • nginx配置
    • Linux访问权限控制之ACL
    • Linux私钥登陆提示server refused our key
  • 应用相关

    • canal部署
    • Linux中使用selenium
    • screen的进阶用法
      • 以detatch模式创建daemon会话
      • 向会话窗口中发送文本
      • 清理screen窗口
    • iptables
  • 硬件

    • linux磁盘操作相关
  • 简介
  • linux
  • 应用相关
storyxc
2022-06-07

screen的进阶用法

# screen的进阶用法

# 以detatch模式创建daemon会话

screen -dmS <name>

# 向会话窗口中发送文本

screen -S <name> -X stuff <text>

例如:screen -S <name> -X stuff abc,当attach之后,窗口中已经有了abc

如果想执行命令:

screen -S <name> -X stuff "<command> \n"
screen -S <name> -X stuff "<command> \r"
---
screen -S centos -X stuff  $'<command> \n'
---
screen -S new_screen -X stuff "cd /dir
"
1
2
3
4
5
6
7

# 清理screen窗口

screen -S <name> -X quit

编辑 (opens new window)
#screen#linux
上次更新: 2023/03/24, 23:40:02
Linux中使用selenium
iptables

← Linux中使用selenium iptables→

Theme by Vdoing | Copyright © 2019-2023 story | 豫ICP备19046036号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式