You will create new empty file using touch command in Linux, this command also used to change the time stamps such as modification time and access time on existing files.
Syntax of touch command:
$ touch [option] filename
Examples-1: To create a file in present working directory, just use the following command:
$ touch mydata.txt
Examples-2: Use the absolute path to create file other than the present working directory:
$ touch /tmp/LinuxBasics/mydata.txt
In next coming lessons we will learn how to write data in text and config files by using vi text editor.
If you have any question please leave comment and donâ€™t forget to say thanks, as itâ€™s free.:)