#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    REST Command Equivalent for SFTP (SSH-FTP)


    Hi,

    I have 2 doubts regarding FTP and SFTP.

    1. I need to download only a certain part of a file located on an ftp source.. i.e. about the last 200 bytes. I was able to use the "REST <location>" to start download from <location> point to the end of the file. But, SSH-FTP or SFTP does not support the REST command. Is there an alternative to REST in SFTP? My basic task is to download a file from an offset of my choice.

    2. I need only a limited amount of data from the file, i.e. about 50 bytes from the 200th byte of the file. I could start download from 200th byte using REST, but, am unable to find a mechanism by which I can download only the necessary content by specifying its size.

    Thanks in advance.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0

    REST Command Equivalent for SFTP (SSH-FTP)


    Hey,

    Can somebody help me out.. This is real urgent and has been delaying my work for long.

    Waiting for some response in anticipation.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    829
    Rep Power
    275
    check out cUrl and its range option. http://curl.haxx.se/docs/manpage.html
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    3
    Rep Power
    0
    Originally Posted by DonR
    check out cUrl and its range option.
    Thank you DonR. I've already seen that.. but I need to connect and download from the ftp using my JAVA code, and it needs to be cross platform. Do you know of any command sequence or procedure to implement using some java compatible library?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    829
    Rep Power
    275
    sorry, but, I know nothing about JAVA

IMN logo majestic logo threadwatch logo seochat tools logo