os.stat()
import osfilename = "/etc/fstab"statbuf = os.stat(filename)print("Modification time: {}".format(statbuf.st_mtime))Linux不记录文件的创建时间(对于大多数fileystems)。

os.stat()
import osfilename = "/etc/fstab"statbuf = os.stat(filename)print("Modification time: {}".format(statbuf.st_mtime))Linux不记录文件的创建时间(对于大多数fileystems)。