mirror of
https://github.com/sahinakkaya/til.git
synced 2024-12-23 07:39:36 +01:00
15 lines
307 B
Markdown
15 lines
307 B
Markdown
You can use `touch` to change modification date or time of a file:
|
|
```bash
|
|
touch -d 20210703 filename
|
|
|
|
# Set the times on a file to a specific date and time:
|
|
touch -t YYYYMMDDHHMM.SS filename
|
|
```
|
|
|
|
|
|
... or use the times from a file to set the times on a second file:
|
|
|
|
```bash
|
|
touch -r filename filename2
|
|
```
|