Dchris Dchris - 1 year ago 63
Linux Question

How do I append text to a file?

What is the easiest way to append text to a file in Linux?

I had a look at this question, but the accepted answer uses an additional program (

) I'm sure there should be an easier way with
or similar.

Answer Source

Or maybe

cat >> filename
This is text, perhaps pasted in from some other source.
Or else entered at the keyboard, doesn't matter. 

Essentially, you can dump any text you want into the file. CTRL-D sends an end-of-file signal, which terminates input and returns you to the shell.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download