import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect('hostname', username='test1234', password='test')
path = ['/home/test/*.txt', '/home/test1/*.file', '/home/check/*.xml']
for i in path:
for j in glob.glob(i):
print j
client.close()
I am trying to list the wildcard files on remote server by using glob.glob
. But glob.glob()
is not working.
Using Python 2.6.
Remote server contains these files: /home/test1/check.file
, /home/test1/validate.file
, /home/test1/vali.file
Can anyone please help on this issue.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…