Pages

Friday, June 23, 2017

8 Practical Examples of Linux “Touch” Command

In Linux every single file is associated with timestamps, and every file stores the information of last access time, last modification time and last change time. So, whenever we create new file, access or modify an existing file, the timestamps of that file automatically updated.
Linux Touch Command
Linux Touch Command Examples
In this article we will cover some useful practical examples of Linux touch command. The touch command is a standard program for Unix/Linux operating systems, that is used to create, change and modify timestamps of a file. Before heading up for touch command examples, please check out the following options.

Touch Command Options

  1. -a, change the access time only
  2. -c, if the file does not exist, do not create it
  3. -d, update the access and modification times
  4. -m, change the modification time only
  5. -r, use the access and modification times of file
  6. -t, creates a file using a specified time

1. How to Create an Empty File

The following touch command creates an empty (zero byte) new file called sheena.
# touch sheena

2. How to Create Multiple Files

By using touch command, you can also create more than one single file. For example the following command will create 3 files named, sheenameena and leena.

      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1n6ZXf
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment