Unix: Create a new file - how it works
This guide shows you how to create a new file in the console under Unix.
Create a new file on Unix
- First open the terminal. We also explain how this works for Mac OS. For Linux, press [Ctrl] + [Alt] + [T].
- Navigate to the directory where you want to create the file.
- Now enter "touch file extension". For example, the "touch Praxistipp.txt" command creates an empty txt file called "Praxistipp".
- If you want to fill the text file with content, call it up using the Vi internal text editor. Alternatively, open the file using an editor outside the terminal.
In another practical tip, we show the most important commands in the Mac terminal. The practical tip and the picture show a solution under Mac OS X 10.9.5 on a MacBook Air.