LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gui file copy progress indicator? (https://www.linuxquestions.org/questions/linux-software-2/gui-file-copy-progress-indicator-341754/)

zero79 07-09-2005 11:53 PM

gui file copy progress indicator?
 
say i want to copy a file manually (ala via the shell); is there anyway to produce a gui file copy progress indicator? the files i'm copying are large, and i would like to see how long it's going to take. i'm looking to get something that looks like the nautilus file copy, but anything that has a percentage copied is fine by me. anyway, thanks for any thoughts.

chakkerz 07-09-2005 11:56 PM

sorta

open a shell and change directory to the destination

now type:
watch "ls -s"

And that tells you how much of the total size has been achieved. Not graphical but tells you progress.

zero79 07-10-2005 01:11 AM

i'm looking for something a little more user-friendly. i need something that will apease a novice user (preferably a gui).

could i achieve this trick by somehow using gnomevfs-copy?

thanks.

zero79 07-10-2005 02:00 AM

ok, i've come up with a horrendous hack. this makes a gui progress dialog, but it's not very accurate...and the dialog takes a while to pop up...and the copy seems to finish with the gui showing only 25% completion...not quite what i'm looking for. any ideas are greatly appreciated. peace.

Code:

#!/bin/bash

source=bigfile
dest=out

(     
        fullsize="$(ls -l $source | awk '{print $5}')"
        size="0"
        while [ "$size" -lt "$fullsize" ] ; do
                sleep 2

                size="$(ls -l $dest | awk '{print $5}')"

                progress="$(echo $size $fullsize | awk '{print 100*$1/$2}')"
                echo $progress
        done
) | zenity --progress --percentage=0 --auto-close & cp $source $dest



All times are GMT -5. The time now is 05:09 PM.