Link Search Menu Expand Document

touch

Let’s learn how to make some files. A very simple way is to use the touch command. Touch allows you to create new empty files.

$ touch mysuperduperfile

And boom, new file!

Touch is also used to change timestamps on existing files and directories. Give it a try, do ls -l on a file and note the timestamp, then touch that file, and it will update the timestamp.

There are many other ways to create files that involve other things like redirection and text editors, but we’ll get to that in the Text Manipulation course.

–https://web.archive.org/web/20221020141729/https://linuxjourney.com/lesson/touch-command