用這個命令,我只得到該文件稱爲輸出(在現實中我有很多更--include標誌) - 所以按預期工作:蟒蛇系統調用
os.system("rsync --rsh=ssh -arvuP --include='OUTPUT' --exclude='*' [email protected]:there/ ./here")
在這種情況下,--include和 - 排除標誌被忽略:
subprocess.call("rsync --rsh=ssh -arvuP --include='OUTPUT' --exclude='*' [email protected]:there/ ./here".split())
我想知道我在做什麼錯?非常感謝!
編輯:對不起,這是OS X Leopard中,我得到的所有文件...
當你說「 - 包括和 - 排除標誌被忽略:」你得到的所有文件都沒有文件? – 2009-09-22 22:11:26
您不指定它是在Linux,Windows還是其他操作系統上。這對調試非常重要。 – 2009-09-22 22:14:58