command 'touch -c file/dir'

Dear expert,

what is this command touch -c filename using for?
I find if execute and filename is existed, it update the date to now.
If the filename is not exeisted, it don't create the file..
so what is this command using for?

Thank a lot!

You've answered your own question. :smiley: The 'touch' command is there to change file dates. When run with no particular paramaters except filenames, it sets the date on those files to the current time. It will create nonexistent filenames, except when the '-c' flag is given, as you've observed.

For details, refer to 'man touch'.