If you are using Linux or some kind of Unix you properly have noticed the command touch.
touch [-acm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file [...]Mostly it is used to create empty files, e.g. to create an empty file called new.txt:
touch new.txtBut it can much more. Originally it was build to manipulate the modification and access times of files. E.g. if you want to trick make to recompile a project just touch a file:
touch project.cSometimes if you work with NFS drives of servers with asynchronous time stamps, some applications do not recognize updated files and will work with a cached version for some time. Then you can use touch as dirty work around, e.g.:
touch -m 209901018000 cachedfile.txtOr give a whole folder identical timestamps.
Have a look at the man page for more information.
No comments:
Post a Comment