Unix Create a File Command

Unix Create a File Command

To create a new, empty file in Unix, you can use the touch command.

For example, to create a new file called myfile.txt, you can use the following command:

refer t‮l:o‬autturi.com
touch myfile.txt

This will create a new, empty file called myfile.txt in the current directory.

You can also use the touch command to update the modification and access times of an existing file without modifying its contents. For example, to update the modification and access times of the file myfile.txt, you can use the following command:

touch myfile.txt

Note that the touch command does not create a file with any particular content or formatting. To create a file with specific content or formatting, you can use a text editor such as vi, nano, or emacs.

Overall, the touch command is a simple and convenient tool for creating and updating empty files in Unix.

Created Time:2017-10-30 14:27:29  Author:lautturi