August 18, 2015

What is the difference between list commands?

Hi, does anybody know the difference between the 'ls > list' and 'ls >> list' commands. Thanks

The first will redirect a current directory listing into a file called list,...

The first will redirect a current directory listing into a file called list, if list exists, it will overwrite it. The second will do the same thing except with the ">>" operator, it will append the listing to whatever is already in the file. If list doesn't exist, it will create it first.

Like  (1 like)
Click Here!