someone please help!
im currently writting a python script to actually retrieve a file size that is in a local PC and a remote server. then, what i do is, i compare if the file's size are the same. below is my code :
A = "/path/of/the/file/in/my/local/PC"
B = "/path/of/the/file/in/remote/PC"
statinfo1 = os.stat(A)
statinfo2 = os.system ("ssh" " [email protected]" " stat -c%s "+B)
if statinfo1 == statinfo2 :
print 'awesome'
else :
break
problem encountered : statinfo1 is able to return the file size in the local PC, but statinfo2 is not able to return the file size.. anyone please help? i want to use SSH method
sshhave password? If it does the above would not work.%sbut then you use+; its not doing what you think its doing.%sis not meant for Python, but for thestatcommand (it means "show the total size in bytes")" "in the string doesn't give me much confidence :)stat -c%son the local file aswell..