Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6343281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:24:26+00:00 2026-05-24T20:24:26+00:00

I am going to initiate download (scp user@remote.computer.com/tmp/file /backup/) from a web browser ajax

  • 0

I am going to

  • initiate download (scp user@remote.computer.com/tmp/file /backup/) from a web browser
  • ajax (could be jQuery) the request to web server (suse)
  • where php will run the scp command

Is there any way that user could see the scp download progress bar in the browser?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:24:26+00:00Added an answer on May 24, 2026 at 8:24 pm

    Not without a lot of messing around.

    Of the top of my head you could redirect the output of SCP to a file, then have an AJAX request to a script that parses that file, and when a new line appears (assuming scp increments it’s progress bar by seperating lines with \r) the PHP script exits in some way that instructs the browser to increment it’s progress bar, then initiate the AJAX process again… and so on until scp terminates.

    I have done stuff like this before, and I would say that it’s not worth the massive effort for such a small nicety – unless you feel you don’t have enough to do already…

    It would be much easier to do stuff like this if browsers would let you read ajax.responseText before ajax.readyState == 4, but they don’t, so it isn’t.

    EDIT

    Just thought of an alternative approach to this that might be easier in some ways but more difficult in others:

    If you put the progress bar in an <iframe> you wouldn’t need to have the huge number of AJAX calls, and you could do it all by server-pushing javascript – but you will need a web server that supports this, and are somewhat relying on a browser that will handle the setup sensibly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Going from the example given here... http://ericswann.org/blog/archive/2009/04/06/linq-to-sql-datacontext-provider-revisited.aspx I'm trying to use the datacontext between
Going to http://www.example.com/node/NID/edit , where NID is any valid nid referring to a node
Going mad now. I have a MVC solution that i've upgraded from MVC 1
While going through university and from following the development of SO, I've heard a
I've got some complex AJAX going in a project that is fetching inner page
Going from a lambda to an Expression is easy using a method call... public
Going slightly crazy here. I'm making an Ajax call using jQuery.post as follows: $.post('php/print.php',{data:dS},function(res){...
Going by the instructions here: http://www.propelorm.org/wiki/Documentation/1.5/Existing-Database I've created a folder and placed a file
Going back to my previous question on OCSP, does anybody know of reliable OCSP
Going through some of my older Delphi projects and upgrading them to D2009, as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.