Quick Answer: How Do I Touch Files in Linux?

Quick Answer: How Do I Touch Files in Linux?
Contents

Touch command Syntax to create a new file: You can create a single file at a time using touch command. The file which is created can be viewed by ls command and to get more details about the file you can use long listing command ll or ls -l command . Here file with name ‘File1’ is created using touch command.

How do I open a touch file in Linux?

You can open the Terminal either through the system Dash or the Ctrl+Alt+T shortcut.

  1. Create a single empty file with the touch command. …
  2. Create multiple files at once with touch command. …
  3. Force avoid creating a new file with touch command. …
  4. Change both access and modification times of a file.

Can you touch a folder in Linux?

yes, the definition of “FILE” in the documentation does include directories, so you can use touch to change their timestamps, BUT… touch is a standard Unix program used to change a file’s access and modification timestamps. It is also used to create a new empty file.

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.