Loading…
> and >>You can send command output to a file instead of the screen:
echo "text" > file.txt — overwrites the fileecho "text" >> file.txt — appends to the fileecho "Hello" > greeting.txt # Creates file with "Hello"
echo "World" >> greeting.txt # Adds "World" to the end
Create a file called myfile.txt that contains the text Linux is fun. Use output redirection to write the text directly into the file. Then verify it worked by reading the file.
Loading terminal engine...
This may take a moment on first load