How to Create a File With a touch Command on CentOS

Share this Article :

This post will guide you on how to create a file using “touch” command. The touch command is easy to use and there are two reason to use it.

1. To create a file.
2. To update a file’s modification date.

The touch command is part file utilities package and has several options.

How to create new files using touch ?

    [[email protected] ~]# touch newtestfile1
    [[email protected] ~]# ls -l
    total 0
    -rw-r--r-- 1 root root 0 Jan 11 10:43 newtestfile1
    

Descriptions :
As you can see, touch creates a file with a length, or size, of zero


Leave a Reply