我正在使用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中创建文件?
答案 0 :(得分:0)
command = "drwxr-xr-x 4,096 2013/01/20 22:37:39 files".split()
filesize = command[1]
date = command[2]