Reputation: 64276
Can I change creation date of some file using Python in Linux?
Upvotes: 18
Views: 27844
Reputation: 31880
It's no longer true that Linux doesn't support creation time. See:
Note this specific answer to view C-code that displays the field:
If the author of that post can help I might be able to create a wrapper with ctypes to modify it from Python.
Upvotes: 3
Reputation: 70001
Linux and Unix file system stores :
File access, change and modification time (remember UNIX or Linux never stores file creation time, this is favorite question asked in UNIX/Linux sys admin job interview)
Understanding UNIX / Linux file systems
Upvotes: 18
Reputation: 43120
I am not a UNIX expert, so maybe I'm wrong, but I think that UNIX (or Linux) don't store file creation time.
Upvotes: 2
Reputation: 114943
You can use os.utime to change access and modify time but not the creation date.
Upvotes: 17