The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
Google UNIX.COM



Thread: SFTP help
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-30-2007
bsandeep_80 bsandeep_80 is offline
Registered User
 

Join Date: Jul 2007
Posts: 103
SFTP help

HI All,

I am trying to figure out a thing in solaris . The basic requirement is as follows:

I will need to login from my solaris server (which should be non interactive to a cleint server )which has only Sftp option. i have generated the required keys and able to do the same. I am using the below command to accomplise the same :

sftp -b batchfile username@hostname

I am able to login non interactively to the client server. In the batch file i have specified some command like this for example:

cd somefilder/some sub directory
ls -l some folder
bye


The real trouble starts here. Now what i would to accomplise is :
once i am into the sftp server

The file is called data-sandeep<date stamp>.xml with latest date ( under somefilder/some sub directory) on the machine(sftp machine) needs to be transferred to my solaris server to a folder that I have created called “File_transfer_data” .

There are 20 such files in this folder like:

data-sandeep-01011900.xml
data-sandeep-01011901.xml
data-sandeep-01011902.xml


Which have a differant time stamps. I need to get a file with lastest time stamp.

The problem is i cannot use unix commands here.

Does any one know how this can be accomplised.

Will be grateful
Remove advertisements
!!
Forum Sponsor