How can I redirect the output from a command to the end of a file?
John Savill
August 30, 2000
1 Min Read
A. In another FAQ (How can I redirect the output from a command to a file?), we saw how to redirect a command's output to a file using a single right angle bracket (>). However this method replaces the file's existing content with the command's output.
To append the command's output to a file, you use double right angle brackets (>>). For example,
C:> dir d:temp*.* >> dirlist.txt
results in the output being appended to file dirlist.txt.
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like