1

I was wondering what the difference is between ls > list and ls >> list is and what the purpose of these commands is?

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Jess Louise
  • 1,651
  • 2
  • 11
  • 6
  • 1
    Which commands? `ls`? Or the two redirection operators `>` and `>>`? Does [this](http://unix.stackexchange.com/a/159514/22222) answer your question? – terdon Sep 11 '15 at 10:58
  • I know what ls does, but what is the purpose of the redirection operators > and >> and what do they do? Thanks – Jess Louise Sep 11 '15 at 11:00
  • OK, then that is answered in the duplicate. Please leave me a comment if it isn't. – terdon Sep 11 '15 at 11:00

1 Answers1

3

> writes to a file, replacing its contents. >> appends to a file, adding on more contents. this is set up by the shell with a open file descriptor (handle) passed on to the program (ls in your case)

Skaperen
  • 706
  • 1
  • 5
  • 14