Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 926 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 926 Bytes
by just-do-halee

Today I learned

2022-11-29


  • Linux

    • ::ETC

      • Output Redirection

        • > is the output redirection operator used for overwriting files that already exist in the directory or a new will be created.
        ls > test.txt  # creates test.txt that has ls information.
        echo "some string" > test.txt  # overwrites test.txt with 'some string'
        cat test.txt  # it will be 
        # files...
        # folders...
        # some string
        • >> is an output operator as well, but, it appends the data provided to the file.
        echo "hello" >> test2.txt  # creates test2.txt with 'hello'
        echo "world" >> test2.txt  # appends 'world' to the test2.txt
        cat test2.txt  # it will be
        # hello
        # world