免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1627 | 回复: 6
打印 上一主题 下一主题

script命令 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-06-28 09:38 |只看该作者 |倒序浏览
script命令,各位高手有熟悉的吗?怎么能隐藏掉typescript文件名?为什么同一个用户telnet登录两次,只能运行一个script,有知道的麻烦帮指导一下,谢谢!

论坛徽章:
0
2 [报告]
发表于 2006-06-28 09:40 |只看该作者
你不会man 一下script吗?

论坛徽章:
0
3 [报告]
发表于 2006-06-28 09:43 |只看该作者
看帮助了,它只有一个-a 的参数,是改变所存文件名的,没写别的。

论坛徽章:
0
4 [报告]
发表于 2006-06-28 09:44 |只看该作者
SYNOPSIS
     script [ -a ]  [ filename ]

DESCRIPTION
     script makes a record of everything printed on your  screen.
     The record is written to filename. If no file name is given,
     the record is saved in the file typescript.

     The  script command forks and creates a sub-shell, according
     to  the  value  of   $SHELL,  and records the text from this
     session. The script ends when the forked shell exits or when
     CTRL-D is typed.

OPTIONS
     -a    Append the session record  to  filename,  rather  than
           overwrite it.

论坛徽章:
0
5 [报告]
发表于 2006-06-28 09:51 |只看该作者
script aaa 就保存成aaa
script bbb就保存成bbb
-a是添加到某个文件的尾部。
建议再仔细阅读一下 man script

论坛徽章:
0
6 [报告]
发表于 2006-06-28 09:51 |只看该作者
看看帮助,-a是追加记录,描述中The script ends when the forked shell exits or when
     CTRL-D is typed的意思是不是,script子shell存在了,再启script 就会结束,所以同一个用户登录两次,只能记录后一个登录?高手指点!

论坛徽章:
0
7 [报告]
发表于 2006-06-28 09:56 |只看该作者
明白了,不用-a这个参数,解决了登录两次记录一次的问题,谢谢版主的提醒!麻烦能否隐藏所存名?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP