How to redirect output to a file Basic Linux, Commands Add comments Jan 032008 How to redirect output to a file Answer: Use the > for output (standard output) redirection, e.g. echo "foo" > bar.txt Related posts: How to redirect output to more than one place How to redirect error message to a file How to combine the output of multiple commands into a single file? Ignoring the program’s output Sending both output and error message to same file Leave a Reply Cancel reply Name (required) E-mail (required) URI Your Comment 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>