LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to redirect output to a file? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-redirect-output-to-a-file-411774/)

mus1402 02-04-2006 11:01 PM

How to redirect output to a file?
 
Anyone know how to redirect output to a file?

perfect_circle 02-04-2006 11:11 PM

add > filename in the command.
for example:
Code:

ls > ls_output

pixellany 02-05-2006 09:42 AM

Good tutorials on redirection are out there. Google on "Linux redirection"

> send to file (create if neccesary)
>> append to file
< read from file
<< read from "here"--eg the terminal
2> redirect errors to file

you can also use "exec" to change file descriptors--eg for the life of a script or segment.


All times are GMT -5. The time now is 03:44 PM.