ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    SSH with progress bar?

    IT Discussion
    9
    14
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dafyreD
      dafyre
      last edited by

      If you use SCP you can get a progress bar... or as @Romo mentioned, rsync with --progress.

      1 Reply Last reply Reply Quote 2
      • AmbarishrhA
        Ambarishrh
        last edited by

        Just saw this one http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/

        dafyreD gjacobseG 2 Replies Last reply Reply Quote 3
        • dafyreD
          dafyre @Ambarishrh
          last edited by

          @Ambarishrh said in SSH with progress bar?:

          Just saw this one http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/

          That looks pretty slick.

          1 Reply Last reply Reply Quote 1
          • gjacobseG
            gjacobse @Ambarishrh
            last edited by

            @Ambarishrh said in SSH with progress bar?:

            Just saw this one http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/

            While the appearance is a bit different - it appears to be much like the progress bar used in Chocolatey.org

            1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates
              last edited by

              You might be able to pipe into pv for a progress. I know it works with dd, so it might work with cp or mv.

              scottalanmillerS 1 Reply Last reply Reply Quote 1
              • scottalanmillerS
                scottalanmiller @stacksofplates
                last edited by

                @stacksofplates said in SSH with progress bar?:

                You might be able to pipe into pv for a progress. I know it works with dd, so it might work with cp or mv.

                I have never played with pv so don't know what it relies on or when it is likely to work or not.

                travisdh1T 1 Reply Last reply Reply Quote 0
                • travisdh1T
                  travisdh1 @scottalanmiller
                  last edited by

                  @scottalanmiller said in SSH with progress bar?:

                  @stacksofplates said in SSH with progress bar?:

                  You might be able to pipe into pv for a progress. I know it works with dd, so it might work with cp or mv.

                  I have never played with pv so don't know what it relies on or when it is likely to work or not.

                  pv is kinda a pain because you have to tell it how much data is moving.

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @travisdh1
                    last edited by

                    @travisdh1 said in SSH with progress bar?:

                    @scottalanmiller said in SSH with progress bar?:

                    @stacksofplates said in SSH with progress bar?:

                    You might be able to pipe into pv for a progress. I know it works with dd, so it might work with cp or mv.

                    I have never played with pv so don't know what it relies on or when it is likely to work or not.

                    pv is kinda a pain because you have to tell it how much data is moving.

                    That's why most things can't show progress bars because they don't know how much there is.

                    1 Reply Last reply Reply Quote 1
                    • thwrT
                      thwr
                      last edited by thwr

                      What works in some cases is to look at the target side for file operations. That depends a bit on the filesystem and doesn't work for thin provisioned files for example, but for a lot of other things. The watch-command will execute any given command ever N seconds, for example:

                      watch -n10 'ls -lsah /path/to/target'
                      watch -n30 'du -sh /path/to/target'
                      watch -n1 'df -sh | grep /mnt/point/of/the/target'
                      

                      In some other cases, you can send specific tools a signal to report stats, for example

                      kill -USR1 PROCESSID_OF_RUNNING_DD_OPERATION
                      kill -USR1 PROCESSID_OF_RUNNING_CP_OPERATION
                      killall -USR1 rm
                      

                      Replace USR1 with SIGINFO if you are on BSD or OSX. USR1 is specific to Linux, most other *nix are using SIGINFO.

                      This will also work with watch or a while-command-sleep loop (watch is basically doing the same in the background).

                      Quite a few long running operations will report back on USR1/SIGINFO. Check the manpages or just try it.

                      travisdh1T 1 Reply Last reply Reply Quote 2
                      • travisdh1T
                        travisdh1 @thwr
                        last edited by

                        @thwr That does work, I've done it many a time.

                        I miss my

                        kill -HUP pid
                        

                        Yeah, I like a dead OS 😕

                        1 Reply Last reply Reply Quote 1
                        • 1 / 1
                        • First post
                          Last post