How do I prevent Linux from automatically timestamping recently created files?

0

To be short I would like a directory's permissions to prevent any future timestamping of new files created or edited.

In other words, is there any onetime solution that would leave a folder's contents with a fixed date stamp?

Any commands that can be used for what I intend to do?

Travis Wells

Posted 2018-05-21T20:17:19.133

Reputation: 121

6XY problem? What are you really trying to do? – Kamil Maciorowski – 2018-05-21T20:40:18.077

Just some testing. – Travis Wells – 2018-05-21T23:24:33.240

Answers

3

What you want is to disable mtime (modify) or ctime (change), which I don't think is possible. At least not without modifying the kernel. It's common to disable atime (access) with a mount option: noatime. But that won't give you what you desire.

See:

https://serverfault.com/questions/787940/linux-no-modify-time-nomtime/787942

Erik L

Posted 2018-05-21T20:17:19.133

Reputation: 46