Chinaunix首页 | 论坛 | 博客
  • 博客访问: 867593
  • 博文数量: 179
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1546
  • 用 户 组: 普通用户
  • 注册时间: 2015-01-27 11:05
个人简介

MySQL工程师 QQ:1815357042

文章分类

全部博文(179)

文章存档

2015年(179)

分类: LINUX

2015-02-10 11:11:37

参考:http://blog.csdn.net/zgmzyr/article/details/8026166

文件-》属性


设置所有会话同一配置,设置了之后只对新建的会话有效!!!!!!


设置终端

设置字体大小,字体为12


自动着色




数字键盘为普通模式,不乱码

在Xshell中使用vim编辑时,插入模式过程中,小键盘输入字出现字母的现象解决方案:  
    属性 -> 终端->VT模式->初始数字键盘模式


选择 设置为普通。


看一下当前连接的是哪一台机器



使用技巧
复制多一个tab窗口,再次连接先前那个tab的服务器


使背景透明
Alt+r

再多一次Alt+r回复原来



--------------------------------------------------------------------------------------------
论坛里有一个需求
请问有什么方法能把terminal(终端)里面的输出内容导出为文件呢(如图内容里面的东西导出。)?
shell想建立文件存储terminal(终端输出的内容。重定向(>)的方法我尝试了但是不理想,所以特来求助。


方法主要有两个
1、利用Xshell的日志功能,开启了日志功能之后,当你在终端里输入的任何东西都会保存到一个日志文件里
你可以用记事本打开这个日志文件

保存日志的路径


退出Xshell


文本文件里面的内容就是刚才我在终端里打的命令

其实刚才可以不退出Xshell,但是不退出Xshell,那么你就不能删除那个log文件


2、用script 命令
  1. script -t 2> timing.log -a output.session
  2. scriptreplay timing.log output.session

 Options:

     -a      Append the output to file or typescript, retaining the prior contents.
     -c COMMAND
             Run the COMMAND rather than an interactive shell.  This makes it easy for a script to capture the output of
             a program that behaves differently when its stdout is not a tty.
     -f      Flush output after each write. This is nice for telecooperation: One person does ‘mkfifo foo; script -f
             foo’ and another can supervise real-time what is being done using ‘cat foo’.
     -q      Be quiet.
     -t      Output timing data to standard error. This data contains two fields, separated by a space. The first field
             indicates how much time elapsed since the previous output. The second field indicates how many characters
             were output this time. This information can be used to replay typescripts with realistic typing and output
             delays.


  1. [root@localhost ~]# script -a output.session
  2. Script started, file is output.session
  3. [root@localhost ~]# uname
  4. Linux
  5. [root@localhost ~]# hostname -i
  6. 127.0.0.1 127.0.0.1
  7. [root@localhost ~]# script -q

阅读(2812) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~