Search code examples
linuxcommandls

What do these commands mean and do?


What do these commands mean and do? "ls > l" and "ls >> l". I have tried them, but it seems as if they do the same thing - create a file named "l".


Solution

  • ls > l
    

    It create the file and write the output of ls into it.

    ls >> l
    

    But this command append the data to existing file if it exist else it does same as above mentioned .