To make a new file and write the informaton out of command output you do > folder location/filename

echo "Yo yo wassup lit fam" > hey.txt

We use cat to display the contents of a file on the terminal window

cat hey.txt

How to append a file

echo "heyagain again" >> hey.txt

We use >> to append and > to overwrite or make a new file

We use append to like make lists and append items to a list

How to make a new file

touch newfile.txt

How to write in a file

nano newfile.txt

Nano is basically a terminal file editor and lets your write stuff in it .We can use it to create scripts and stuff.

If you dont wanna use a terminal though.You can use gedit it opens up a gui text editor