Examples of creating files

To create a file with the cat command:

   cat > memo
   remember to make appointment at opticians
   get cost of scheduled flight to Athens Ctrl-d

This creates a file called memo in the current directory containing two lines of text.


To create a file with the echo command:

   echo use an editor for large files > tips

This creates a file called tips in the current directory containing a single line of text.


[Home] [Search] [Index] This site maintained by unixhelp@ed.ac.uk