Saturday, September 10, 2011

Create text files in Linux from terminal

If you are in terminal in certain folder and would like to quickly create a text file in that folder use the 'cat' command

To create a text file called parameters.txt, enter:
$ cat > parameters.txt

Then type the text. In case you want to paste something do Shift Insert to paste into Terminal.
Press CTRL+D to save file

To display file contents, type
$ cat parameters.txt

1 comment: