Languages
[Edit]
EN

Bash - how to reset modification date of any file

3 points
Created by:
Zeeshan-Peel
850

Easiest way is to use touch command like in this example:

Description: It will set current date as change, modification and access date.

If you would like to set specific date you can use -d parameter like in this example:

To precise which date should be changed useful are:

  • -a - it changes only access date
  • -m - it changes only modification date


To copy dates from other file -r parameter can be used:

Note: file1 dates will be set to file2.

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

Bash - reset modification date of any file
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join