In linux, how do I do something like
echo 'hello world' > log.txt
but instead of overwriting the contents of log.txt, it appends to the end of of log.txt?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityIn linux, how do I do something like
echo 'hello world' > log.txt
but instead of overwriting the contents of log.txt, it appends to the end of of log.txt?
In Linux you can also use the useful HERE TAG for multiline append :
cat >> log.txt << EOF
hello word 1
hello word 2
hello word 3
EOF
Linux shell's are more more powerful than windows command prompt! ;)