ITPub博客

首页 > 应用开发 > Java > 记录输出结果工具-script

记录输出结果工具-script

原创 Java 作者:jlttt 时间:2008-06-26 17:11:54 0 删除 编辑

今天转到eygle的网站上,学到一个好用的工具script,可以将接下来所做的操作都记录到一个叫typescript的文件里。

[root@xh root]# script
Script started, file is typescript
[root@xh root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 39G 5.6G 32G 16% /
/dev/sda1 99M 9.2M 85M 10% /boot
none 291M 0 291M 0% /dev/shm
[root@xh root]# ls
1.dbf anaconda-ks.cfg install.log log monitor.sh time.sh
1.sh dd.sh install.log.syslog log.txt Shareplex_Chk.sql typescript
[root@xh root]# su - oracle
[oracle@xh oracle]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 26 17:10:25 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 88082676 bytes
Database Buffers 75497472 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@xh oracle]$ exit
logout
[root@xh root]# ls
1.dbf anaconda-ks.cfg install.log log monitor.sh time.sh
1.sh dd.sh install.log.syslog log.txt Shareplex_Chk.sql typescript
[root@xh root]# cat typescript
[root@xh root]# exit
exit
Script done, file is typescript
[root@xh root]# cat

爆好用~~~~

[@more@]

[root@xh root]# more typescript
Script started on Thu 26 Jun 2008 05:09:50 PM CST
[root@xh root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 39G 5.6G 32G 16% /
/dev/sda1 99M 9.2M 85M 10% /boot
none 291M 0 291M 0% /dev/shm
[root@xh root]# ls
1.dbf anaconda-ks.cfg install.log log monitor.sh
time.sh
1.sh dd.sh install.log.syslog log.txt Shareplex_Chk.sql
typescript
[root@xh root]# su - oracle
[oracle@xh oracle]$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 26 17:10:25 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 88082676 bytes
Database Buffers 75497472 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@xh oracle]$ exit
logout
--More--(75%)
[root@xh root]# ls
1.dbf anaconda-ks.cfg install.log log monitor.sh
1;32mtime.sh84%)
1.sh dd.sh install.log.syslog log.txt Shareplex_Chk.sql
mtypescript(92%)
[root@xh root]# cat typescript
[root@xh root]# exit
exit

Script done on Thu 26 Jun 2008 05:11:40 PM CST
[root@xh root]#

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9533994/viewspace-1006163/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 恋上shell编程
请登录后发表评论 登录
全部评论

注册时间:2008-06-28

  • 博文量
    75
  • 访问量
    686125