In [132]:import os
# 查看文件属性
In [133]: os.stat('package-lock.json')
Out[133]: os.stat_result(st_mode=33206, st_ino=7036874417947173, st_dev=651824810, st_nlink=1, st_uid=0, st_gid=0, st_size=304, st_atime=1523547919, st_mtime=1523547919, st_ctime=1523547919)
st_mode: inode 保护模式
st_ino: inode 节点号。
st_dev: inode 驻留的设备。
st_nlink: inode 的链接数。
st_uid: 所有者的用户ID。
st_gid: 所有者的组ID。
st_size: 普通文件以字节为单位的大小;包含等待某些特殊文件的数据。
st_atime: 上次访问的时间。
st_mtime: 最后一次修改的时间。
st_ctime: 由操作系统报告的”ctime”。在某些系统上(如Unix)是最新的元数据更改的时间,在其它系统上(如Windows)是创建时间(详细信息参见平台的文档)。
Help on built-in function utime in module posix:
utime(...)
utime(path, (atime, mtime))
utime(path, None)
Set the access and modified time of the file to the given values. If the
second form is used, set t