how to make a text file from terminal easily
you have to do just only two small steps
open the terminal and go to location which you want to create a text file
Type the command as below
cat > file.txt
now enter anything which should include inside of the file.txt
now press ctrl+d to save that file.
ok you are done.