LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-09-2005, 11:53 PM   #1
zero79
Member
 
Registered: Nov 2003
Location: Ohio
Distribution: Debian Unstable
Posts: 460

Rep: Reputation: 30
Question 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.
 
Old 07-09-2005, 11:56 PM   #2
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: a few...
Posts: 654

Rep: Reputation: 32
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.
 
Old 07-10-2005, 01:11 AM   #3
zero79
Member
 
Registered: Nov 2003
Location: Ohio
Distribution: Debian Unstable
Posts: 460

Original Poster
Rep: Reputation: 30
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.

Last edited by zero79; 07-10-2005 at 01:23 AM.
 
Old 07-10-2005, 02:00 AM   #4
zero79
Member
 
Registered: Nov 2003
Location: Ohio
Distribution: Debian Unstable
Posts: 460

Original Poster
Rep: Reputation: 30
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

Last edited by zero79; 07-10-2005 at 02:04 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display file copy progress bar bmcneely0 Linux - General 12 02-19-2012 03:19 PM
md5sum progress indicator Ianmcc Linux - Software 3 02-04-2009 02:50 PM
How the Progress Bar of a copy file/directory process is progressed?(any logic)? kiranprashant Programming 3 03-08-2005 06:16 AM
cp command with progress indicator exodist Linux - Software 1 07-21-2004 06:27 PM
bash: How can I create a progress indicator? apeekaboo Programming 5 06-27-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration