0

rsync --recursive用来查找所有文件和目录:

 command = subprocess.Popen(['sshpass', '-p', password, 'rsync', '--recursive', source],
                           stdout=subprocess.PIPE)
    command = command.communicate()[0]

我得到我的输出:

 drwxr-xr-x 4,096 2013/01/20 22:37:39 files

如何提取文件大小以及何时在 Python/Django 中创建文件?

4

1 回答 1

0
command  = "drwxr-xr-x 4,096 2013/01/20 22:37:39 files".split()
filesize = command[1] 
date = command[2] 
于 2013-01-21T07:11:31.387 回答