Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need name and size of files in directory on remote server

Status
Not open for further replies.

nmccormick

Technical User
Jan 15, 2002
2
US
I need to get the name and size of files in a directory on a remote server. I need the results of this listing to be stored in a file on the local server. I have tried starting an ftp session and executing
ls -l remotedirectory localfilename
but ftp apparently doesn't like the -l. I have tried other sub-commands like nlist and dir but they don't appear to have an option to print the list on the local server. By the way in case it makes a difference, the local server is Solaris, the remote server is AIX.

I am fairly inexperienced at Unix scripting so I am not sure what other options I may have. Can someone offer some guidance or directions to reading material?

Thanks.
Nancy
 
You could look at rsh, which allows you to run commands on a remote machine. Read the man page for rsh. Then when you have it set up correctly, you should be able to do rsh remote_server_name ls -l /path/to/dir

Greg.
 
Since I wrote my note I also found rsh. I have tested some but not successfully yet. I will keep trying.
Thanks,
Nancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top