Discuss / Python / 要"dir -l",而不是简单"dir"吧

要"dir -l",而不是简单"dir"吧

Topic source

航__宇

#1 Created at ... [Delete] [Delete and Lock User]

比如

drwxrwxrwx 1 root root 0 Jul 13 17:23 py27

前4列用什么方法啊,刚才把os和os.path都看了一遍,也没找到

第5列用os.path.getsize 第6、7、8用os.path.getmtime,但事后怎么转换为 Jul这种月份?

航__宇

#2 Created at ... [Delete] [Delete and Lock User]

知道了。时间转换用 time.ctime(timestamp)


  • 1

Reply