LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-31-2012, 10:25 PM   #1
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Rep: Reputation: 0
show cp progress with directories


So, I'm finding tons of nifty little bash scripts, scp tips, rsync tips, etc etc for copying one file to a destination while showing the progress of that copy, however, how would I go about doing this for a directory with sub-directories (cp with -r flag)

i.e. show progress for
Code:
cp -r /mnt/storage/media /mnt/usb/linuxbak
or something similar where media has a dozen files and a dozen sub-directories with files.

All help appreciated in advance! THANKS!

p.s. Running ubuntu server 11.10 so need CLI info!!
 
Old 01-31-2012, 10:40 PM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
why dont you do
Quote:
rsync -avz --progress
 
Old 01-31-2012, 11:35 PM   #3
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
good enough. I'll man rsync. thanks!
 
Old 01-31-2012, 11:44 PM   #4
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
ahhh, no. that's pretty much the same as the verbose option for cp. I'm more looking for a progress meter like wget uses. Thank you for the suggestion though.
 
Old 01-31-2012, 11:55 PM   #5
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
lol well if you want more info then do

rsync -avz --progress --stats
 
Old 02-01-2012, 12:31 AM   #6
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
ouch. I tried that and I'm only getting 5mb xfer speed going between two hard drives. Both internal sata (limited by the pci bus.) basically a 350mb file takes about 70 seconds to copy. That's kinda long considering I need to copy 661GB. is it always this slow?
 
Old 02-01-2012, 12:32 AM   #7
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
ooo. nope. with cp it takes about 5 seconds per 350mb file.
 
Old 02-01-2012, 01:06 AM   #8
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
well its a trade off, you gotta decide what you want more, speed or you want the progress info similar to wget.Well rsync does that, but its the slowest on local file systems , mv is fastest then cp then rsync.
 
Old 02-01-2012, 01:21 AM   #9
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
you can use pipe viewer for this purpose which will show you the progress bar of the amount of data copied and left

http://sourceforge.net/projects/pipeviewer/

http://blog.urfix.com/9-tricks-pv-pipe-viewer/
 
1 members found this post helpful.
Old 02-01-2012, 01:54 AM   #10
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
cool. I will definitely check that out now.
 
Old 02-08-2012, 06:55 PM   #11
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
This ended up being good enough. It shows a percentage completed of current file but not overall progress.

Code:
rsync -azv --progress /source /destination
 
Old 02-08-2012, 07:05 PM   #12
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
loll, glad you made up your mind
 
Old 02-16-2012, 07:28 PM   #13
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
meh, I swear I'm going to figure something out. When you're copying multiple TB, it'd be nice to know when the darned thing is going to finish.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Show Progress with Nautilus script handband2 Programming 4 03-31-2012 03:22 AM
[SOLVED] Is it possible to show the progress of a Perl script? The_Seraphim Programming 4 10-13-2009 10:31 PM
LXer: Radio Talk Show Blitz Progress Report: The Power Hour LXer Syndicated Linux News 0 08-21-2007 07:40 PM
How to show a progress bar on the next line? Chowroc Programming 10 10-26-2005 10:27 PM
How to use mv in console to show progress? Alinuxnoob Linux - General 4 09-15-2004 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:01 AM.

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