The touch command is typically used for 2 purposes, to create a new file and to modify the access and modification times of the file. If the file already exist, it will update the both the access and modification times of the file and if it does not exist, it will create a new file. The latter is probably the most common usage of the command.
For example, to update the access and modification time stamp on a file to the current time;
# touch helloworld.c
You can also use a specific time by using the –t option or just modify either the access or modification time only, using the –a and –m options respectively.



No comments yet.