how to identify a particular directory / file on remote machine

S

Swarna

Hi all,

I am trying to find out whether a particular directory is present on a
remote machine or not from my local Python script in Linux . Can anyone
help me with the command that i need to issue to os.system in my python
script to acheive this?

Thanks, for all your time !
 
M

Mike Meyer

Swarna said:
Hi all,

I am trying to find out whether a particular directory is present on a
remote machine or not from my local Python script in Linux . Can anyone
help me with the command that i need to issue to os.system in my python
script to acheive this?

Lots of possibilities, depending on whats running on the remote
machine. My first try would be to use os.popen (or the subprocess
module) and read the output of an "ssh remotemachine ls -d /path/to/dir".

<mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top