user3667569 user3667569 - 2 months ago 7
Bash Question

How to change the created and last modified date of a file to present time in Linux Shell?

I am looking for a command in bash to change the last modified and created timestamp to be changed to present time.
How do I do it using shell command/script?

Thanks!

Answer

touch will update the access and modification times (or only one of the two with -a or -m respectively).