touch

From NetBSD Wiki

Jump to: navigation, search
This article is a stub. You can help by editing it.

The touch(1) command updates a file's timestamps of last access and last modification to the current time. If the file doesn't exist, it is created.

This command is particularly useful if you wish to force make or another tool that looks at the file's last modification date to run its actions on the file as if it were actually modified. It is also a nice quick way to create an empty file.

Example:

$ ls
Makefile test.c
$ make test
<make output>
$ ls
Makefile test test.c test.o
$ make
$ touch test.c
$ make
<make output>

See also

View source code (Please report any bugs or suggestions here).

Retrieved from "http://wiki.netbsd.se/touch"
Personal tools