To create an empty file called testfile within your current directory, use the following command:
To edit this file, you must use a text editor.
You can create a file in a different location by changing what is after touch. To create a new file in /home/hadi/testdirectory, if you are already in your home directory, you can use the following:
Of from anywhere using an absolute path, you can use this:
Or from anywhere using a path shortcut, you can use the following command: