Suse & OpenSuse : Tips, Tricks, Tutorials, How Tos and Troubleshooting

Short and quick tutorial for the command “touch”

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.

touch

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.

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.