Examples of creating files

Examples of creating files

1. 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.

2. 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.


Top document