Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] what happened to cp -g (copy with progress bar)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Mon Feb 19, 2007 6:01 pm    Post subject: [solved] what happened to cp -g (copy with progress bar) Reply with quote

by all means, Correct me if I'm wrong.
But used to remember using cp with the -g option that would enable a progress bar when copying the file took longer than 3-4 seconds.
I could see why it might have been removed...to make cp ONLY do copying...though in my opinion that what optional flags are for!

Does anyone know how do get this same functionality (on the command line)?
_________________
emerge: there are no ebuilds to satisfy "moo"


Last edited by coolsnowmen on Mon Feb 19, 2007 8:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Mon Feb 19, 2007 6:30 pm    Post subject: Reply with quote

topic 511748
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
vandien
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2006
Posts: 137

PostPosted: Mon Feb 19, 2007 6:52 pm    Post subject: Reply with quote

Code:
rsync -P FILE1 FILE2

rsync is wonderful, this will not only show your progress, but it will also resume if interrupted, and work on remote files/folders like scp. "rsync -h" or "man rsync" for more info.
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Mon Feb 19, 2007 8:04 pm    Post subject: Reply with quote

Reading the above link (thanks moocha)
I thought vandien might be interested in this comment (assuming it is accurate)
Quote:
> `rsync --progress file1 file2` works better than `cp -g file2 file2`

This is plainly wrong if you e.g. copy to a dvdram where the only reasonable
policy is to limit the number of read/write operations and where a progress bar
is really useful. You can do a little better with rsync --inplace, but this is
still worse than cp. Things become even worse if you want to copy several large
files (in which case rsync reads the destination directory data "in vain"):
rsync was simply never meant as a substitute to cp for such a purpose.
Moreover, there are other things which cp can which rsync cannot do at all
(e.g. -i and probably also some other options).

Actually, I considered it always as one of the main advantages of gentoo that
it was easy for the user to have patches like this - simply because they are
convenient - instead of forcing the user to follow some group's philosophical
considerations as in other distros. I am very sad to see that gentoo gives up
such an advantage for absolutely no reason.

_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Mon Feb 19, 2007 8:14 pm    Post subject: Reply with quote

thanks again for pointing that out to me, I commented out this line from the ebuild...

Code:
#       rm -f "${PATCHDIR}"/generic/001_*progress*


if they are going to keep the patch around, i'm surprised they don't just make a useflag for it.

I find it really useful
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Mon Feb 19, 2007 8:17 pm    Post subject: Reply with quote

Breakage in coreutils equates to pain and suffering on a wide scale. I think the coreutils maintainers shied away from it because of the sheer amount of bugs something like this can introduce in unattended scripts. coreutils is quite difficult to maintain as it is (aka, the package tends to be of the female canine persuasion), and if upstream didn't like it, that's not a good sign.
Not to say an USE flag wouldn't have made sense, but then ah well... :)
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
vandien
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2006
Posts: 137

PostPosted: Mon Feb 19, 2007 9:47 pm    Post subject: Reply with quote

coolsnowmen wrote:
I thought vandien might be interested in this comment (assuming it is accurate)

Ah, I missed that when I skimmed over the other thread. Informative, but I can't say I've ever run into a situation myself, where rsync doesn't work just as well if not better than cp :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum