On Wed, 17 Mar 2010 12:03:16 -0400 (EDT), Stephen Powell wrote:
> 
> I think what you're asking is "How do I save a copy of my terminal output
> when I'm not logged on via xterm (or some equivalent program)?"  Is that
> what you are asking?  If that is what you want to do, the "script" command
> works well for this purpose.  For example,
> 
> # script install.log
> Script started, output file is install.log
> # aptitude update
> ...
> # aptitude full-upgrade
> ...
> # exit
> Script done, output file is install.log

One thing I neglected to mention is that escape sequences and other
control codes are preserved literally in the log file.  This
can lead to strange-looking output when perusing the log
file afterwards with less.  To circumvent this problem, use the
-r and -f options of less.  For example,

   $ less -fr install.log

-r is the "raw" option and allows the escape sequences and control
codes to take effect, so that you see the colors as the were
originally.  -f eliminates the message

   "install.log" may be a binary file.  See it anyway?

and causes less to display the file without asking for permission.

-- 
  .''`.     Stephen Powell    <zlinux...@wowway.com>
 : :'  :
 `. `'`
   `-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/2079979563.19797171268841796924.javamail.r...@md01.wow.synacor.com


-- 
  .''`.     Stephen Powell    <zlinux...@wowway.com>
 : :'  :
 `. `'`
   `-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/408698709.19882721268859617428.javamail.r...@md01.wow.synacor.com

Reply via email to