Hello, can I change creating date of some file using python in Linux?
+2
A:
You can use os.utime to change access and modify time but not the creation date.
Nadia Alramli
2009-05-20 12:15:28
>Set the access and modified timesBut i need creating date.
Ockonal
2009-05-20 12:16:56
Quote from the docs on that function: "Set the access and modified times of the file specified by path." .. so you can't use it to set the creation date.
Epcylon
2009-05-20 12:20:25
It would be nice to add that there the concept of file creation date does not exist in most native *nix filesystems.
ΤΖΩΤΖΙΟΥ
2009-05-21 08:58:37
A:
You can use the [touch][1]
-command to do this.
Example:
import os
cmd = 'touch...'
os.system(cmd)
alexn
2009-05-20 12:18:43
+3
A:
I am not a UNIX expert, so maybe I'm wrong, but I think that UNIX (or Linux) don't store file creation time.
Nick D
2009-05-20 12:34:29
+6
A:
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)
Ólafur Waage
2009-05-20 12:44:51