使用Linux下script工具记录Oracle输出

http://www.sina.com.cn 2008年06月26日 16:25  《程序员》

  在Linux下使用Oracle数据库时,很多时候我们想记录输出信息,当然有很多方法可以选择,但是这里我想说的是script工具。

  在Linux下有一个script工具,可以将当前终端会话中的所有输入输出结果捕获到一个指定的文件里。

  看一下这个工具的man输出:

  [oracle@jumper oracle]$ which script

  /usr/bin/script

  [oracle@jumper oracle]$ man script

  SCRIPT(1) BSD General Commands Manual SCRIPT(1)

  NAME

  script - make typescript of terminal session

  SYNOPSIS

  script [-a] [-f] [-q] [-t] [file]

  DESCRIPTION

  Script makes a typescript of everything printed on your terminal. It is

  useful for students who need a hardcopy record of an interactive session

  as proof of an assignment, as the typescript file can be printed out

  later with lpr(1).

  If the argument file is given, script saves all dialogue in file. If no

  file name is given, the typescript is saved in the file typescript.

  当然最重要的是看一下实际效果。

上一页 1 2 下一页
本文导航:
·输出结果
·测试过程

发表评论 _COUNT_条
Powered By Google
·城市对话改革30年 ·新浪城市同心联动 ·诚招合作伙伴 ·企业邮箱畅通无阻