Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mv - sort of progress bar?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Lawless
l33t
l33t


Joined: 03 Nov 2003
Posts: 638
Location: Germany

PostPosted: Sat May 06, 2006 8:18 am    Post subject: mv - sort of progress bar? Reply with quote

Hi,

I just seem to missed since when 'mv' has got a progress bar showing me in wget style how long moving a bigger file will take.

I didn't found a reference in the man page so I'm just wondering and I don't quite understand where that comes from and for what purpose it is.
And why doesn't have 'cp' the same progress bar since most of the time it will take much longer than mv.

Code:

file                   | 100% |  6602 KiB |  1032 KiB/s | ETA 00:00.05


*confused*
_________________
Kernel panic: I have no root and I want to scream
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Sat May 06, 2006 8:57 am    Post subject: Reply with quote

It does? When did that happen?
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2508
Location: Silver City, NM

PostPosted: Sat May 06, 2006 9:00 am    Post subject: Re: mv - sort of progress bar? Reply with quote

Lawless wrote:
And why doesn't have 'cp' the same progress bar since most of the time it will take much longer than mv.

Code:
$ cp --prog file_a file_b
Back to top
View user's profile Send private message
RlC
Guru
Guru


Joined: 30 Jul 2005
Posts: 358
Location: austria

PostPosted: Sat May 06, 2006 9:49 am    Post subject: Re: mv - sort of progress bar? Reply with quote

BitJam wrote:
Code:
$ cp --prog file_a file_b


this does nothing for me (except copying the file)
do i need a special version?
Back to top
View user's profile Send private message
voytas
Apprentice
Apprentice


Joined: 31 Mar 2004
Posts: 203
Location: Poland, Lodz

PostPosted: Sat May 06, 2006 10:08 am    Post subject: Re: mv - sort of progress bar? Reply with quote

RlC wrote:
this does nothing for me (except copying the file)
do i need a special version?
tbhe progressbar will apear only if copying takes more than a few seconds, try bigger file
_________________
LAPTOP: ThinkPad T530
Back to top
View user's profile Send private message
Lawless
l33t
l33t


Joined: 03 Nov 2003
Posts: 638
Location: Germany

PostPosted: Sat May 06, 2006 10:12 am    Post subject: Reply with quote

I did not even found out under which circumstances the progress bar appears.
When I move a 100 mb file it is done in a second (which is normal because it is just a move and no copy) but sometimes it needs longer (even within the same partition) and then the progress is shown..
But when I move a 600 mb file from one partition to another there is no progress...
I have no idea... I cannot even reproduce it.

--
Edit

Ah ok, cp --prog and mv --prog do show the progress with bigger files but this option is not mentioned in the man page and sometimes mv just shows it automatically without the --prog
?!?
_________________
Kernel panic: I have no root and I want to scream
Back to top
View user's profile Send private message
RlC
Guru
Guru


Joined: 30 Jul 2005
Posts: 358
Location: austria

PostPosted: Sat May 06, 2006 4:15 pm    Post subject: Reply with quote

ah... wonderful
a pity that this doesn´t work for moving/copying multiple files.

in my opinion the progbar should be enabled by default
Back to top
View user's profile Send private message
Lawless
l33t
l33t


Joined: 03 Nov 2003
Posts: 638
Location: Germany

PostPosted: Sat May 06, 2006 4:16 pm    Post subject: Reply with quote

I just set an alias from "mv/cp" to "mv/cp --prog"
_________________
Kernel panic: I have no root and I want to scream
Back to top
View user's profile Send private message
neylitalo
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2006
Posts: 81

PostPosted: Sat May 06, 2006 5:33 pm    Post subject: Reply with quote

cp -g also works rather nicely. (Not in man pages)
Back to top
View user's profile Send private message
Lawless
l33t
l33t


Joined: 03 Nov 2003
Posts: 638
Location: Germany

PostPosted: Sat May 06, 2006 5:36 pm    Post subject: Reply with quote

And what's the difference or better: where to look for these options?

---
Edit

Of course it is on wikipedia ;)

http://de.wikipedia.org/wiki/Cp_(Unix)

Sorry, it's in german... the english article doesn't mention --prog
_________________
Kernel panic: I have no root and I want to scream
Back to top
View user's profile Send private message
voytas
Apprentice
Apprentice


Joined: 31 Mar 2004
Posts: 203
Location: Poland, Lodz

PostPosted: Sat May 06, 2006 8:05 pm    Post subject: Reply with quote

RlC wrote:
ah... wonderful
a pity that this doesn´t work for moving/copying multiple files.

in my opinion the progbar should be enabled by default
if you really want sth with progresbar try
Code:
emerge app-misc/vcp
it's curses based, pretty cool
_________________
LAPTOP: ThinkPad T530
Back to top
View user's profile Send private message
Lawless
l33t
l33t


Joined: 03 Nov 2003
Posts: 638
Location: Germany

PostPosted: Sat Sep 16, 2006 4:26 pm    Post subject: Reply with quote

With one if the last system updates the --prog option vanished... does anybody know why and if there is a way to get it back.
I found it quite usefull...
_________________
Kernel panic: I have no root and I want to scream
Back to top
View user's profile Send private message
register_again
n00b
n00b


Joined: 07 Feb 2005
Posts: 3

PostPosted: Fri May 18, 2007 6:41 pm    Post subject: Reply with quote

Lawless wrote:
With one if the last system updates the --prog option vanished... does anybody know why and if there is a way to get it back.
I found it quite usefull...


for some reason the patch was removed from portage, apparently the upstream maintainers didnt like it.

however, the patch is still available here @ http://dev.gentoo.org/~vapier/dist/

it is included in coreutils-6.7-patches-1.0.tar.bz2 :
patch/generic/001_all_coreutils-gen-progress-bar.patch

i installed it this way: emerge -v coreutils

- when it says: " * Done with patching " i suspend emerge with ctrl+z
- cd /var/tmp/portage/sys-apps/coreutils-6.7-r1/work/coreutils-6.7/
- apply the patch with patch -p1 < /path/to/patch/generic/001_all_coreutils-gen-progress-bar.patch

and resume the merge with 'fg'

also look here for another way:
http://ubuntuforums.org/showthread.php?p=2061158
Back to top
View user's profile Send private message
luminoso
n00b
n00b


Joined: 13 Oct 2005
Posts: 60
Location: Portugal, Aveiro

PostPosted: Fri Jun 22, 2007 9:21 am    Post subject: Reply with quote

Does anybody knows why is progress bar disabled from portage?!?
_________________
luminoso @ irc.ptnet.org
Back to top
View user's profile Send private message
N0n0
n00b
n00b


Joined: 12 Nov 2007
Posts: 4

PostPosted: Mon Nov 12, 2007 7:22 pm    Post subject: Reply with quote

Here is an other simple method

put this code in a file (my_patch)
Code:

--- coreutils-6.9-r1.ebuild
***************
*** 13 ****
-    mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2
--- 12 ----
***************
*** 53 ****
-    rm -f "${PATCHDIR}"/generic/001_*progress*
--- 51 ----


Code:

cd /usr/portage/sys-apps/coreutils
patch -p1 < my_patch
ebuild coreutils-6.9-r1.ebuild digest


after that tape emerge coreutils
:D
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1179

PostPosted: Thu Nov 15, 2007 11:32 am    Post subject: Reply with quote

N0n0 wrote:
Here is an other simple method

put this code in a file (my_patch)
Code:

--- coreutils-6.9-r1.ebuild
***************
*** 13 ****
-    mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2
--- 12 ----
***************
*** 53 ****
-    rm -f "${PATCHDIR}"/generic/001_*progress*
--- 51 ----


tried but copy with -g or --prog options says
unrecognized option `--prog

Code:

cd /usr/portage/sys-apps/coreutils
patch -p1 < my_patch
ebuild coreutils-6.9-r1.ebuild digest


after that tape emerge coreutils
:D

_________________
this is a strange strange world.
Back to top
View user's profile Send private message
schorsche
Apprentice
Apprentice


Joined: 27 Jan 2005
Posts: 230

PostPosted: Thu Nov 15, 2007 11:09 pm    Post subject: Getting "cp: invalid option -- g" Reply with quote

When trying to copy some files over to my usbstick I get
Code:

cp: invalid option -- g
Try `cp --help' for more information.


Never got it before, couldn't find any info on it in google.
Any hints?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Thu Nov 15, 2007 11:14 pm    Post subject: Reply with quote

-g was an option in some versions of 'cp' to graphically show progress. Not all versions of cp (fileutils) have this - it's a patch I think. You probably have an alias, remove the -g, and it should work fine again.

If your copy of 'cp' was unintentionally changed, make sure a hacker didn't slip a new copy of 'cp' in its place...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Thu Nov 15, 2007 11:15 pm    Post subject: Reply with quote

Gentoo used to patch cp to add the -g, --prog option to display a progress bar. That patch was not accepted by upstream, so has since been removed.

EDIT: ugh, beat me to it. :P
_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
schorsche
Apprentice
Apprentice


Joined: 27 Jan 2005
Posts: 230

PostPosted: Fri Nov 16, 2007 9:31 am    Post subject: Reply with quote

So which package do I need to update to get it working again?
I haven't done an emerge world in ages.
Back to top
View user's profile Send private message
ocin
Guru
Guru


Joined: 01 Jan 2006
Posts: 500

PostPosted: Fri Nov 16, 2007 12:08 pm    Post subject: Reply with quote

The mv and cp's -g option was VERY useful, it's a shame that it got removed :(
Back to top
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Fri Nov 16, 2007 12:09 pm    Post subject: Reply with quote

see mv - sort of progress bar?
_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Fri Nov 16, 2007 2:49 pm    Post subject: Reply with quote

merged above six posts here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
N0n0
n00b
n00b


Joined: 12 Nov 2007
Posts: 4

PostPosted: Sun Nov 18, 2007 8:03 pm    Post subject: Reply with quote

tranquilcool wrote:
Here is an other simple method

tried but copy with -g or --prog options says
unrecognized option `--prog



which is the version of your coreutils installed ?
Code:
emerge -p -v coreutils

To get it
Back to top
View user's profile Send private message
N0n0
n00b
n00b


Joined: 12 Nov 2007
Posts: 4

PostPosted: Sun Nov 18, 2007 8:06 pm    Post subject: Reply with quote

schorsche wrote:
So which package do I need to update to get it working again?
I haven't done an emerge world in ages.

The coreutils ones. But you have to patch its ebuild.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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