Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to log console output to a file?

Answer:

Use the script command, example:

# script /tmp/output.txt (start logging, everything from now will go to output.txt)
# date
# exit (finish logging)
# cat /tmp/output.txt

  1. Sending both output and error message to same file
  2. How to redirect output to a file
  3. Copy the output from Mac OSX Terminal to clipboard
  4. How to combine the output of multiple commands into a single file?
  5. Output the last N bytes of a file in Linux

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>