[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to save output when working in runlevel 3 (Lenny)



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    <zlinuxman@wowway.com>
 : :'  :
 `. `'`
   `-


-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 2079979563.19797171268841796924.JavaMail.root@md01.wow.synacor.com">http://lists.debian.org/[🔎] 2079979563.19797171268841796924.JavaMail.root@md01.wow.synacor.com


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


Reply to: