user3667569 user3667569 - 1 year ago 83
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?


Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download