2

I know using command > file will write the stdout of command to file, but is there a similar method to append to file?

10

command > file will clobber the file and replace all data with stdout.

command >> file will append stdout to the file. (meaning the value of stdout is tacked to the end of the file).

  • I've edited Q and A to remove some <> for clarity. If you disagree, please revert my edit. – RedGrittyBrick Jun 27 '11 at 17:00
  • No, by all means. I couldn't edit the question, so I just made my answer match! – Babu Jun 27 '11 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.