title: erasing terminal output on linux
body: <p>I was writing a command line program which will have a status bar, much like wget.</p>
  
  <p>The main problem I'm facing is: how do I delete what I've already sent into stdout/stderr?</p>
  
  <p>I had on idea: use the backspace char '\b' and erase the output I've sent. Is that the best way? Is it the only way? Is there a better way?</p>
  
  <p>PS: I don't want to use anything like ncurses. Plain old C please.</p>
  
  <p>Thanks</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>Can I also go up and/or down? Example: I have 10 lines of output, I want to change the 3rd line from <code>Doing ABC</code> to <code>ABC: Done</code>. How can I do that?</p>
  
  <p>Also, can anyone post more details about what VT102 characters are? What are its capabilities? Please post good links on this if you have any.</p>
  
  <p>Thanks</p>