View previous topic :: View next topic |
Author |
Message |
Lawless l33t
Joined: 03 Nov 2003 Posts: 638 Location: Germany
|
Posted: Sat May 06, 2006 8:18 am Post subject: mv - sort of progress bar? |
|
|
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 |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Sat May 06, 2006 8:57 am Post subject: |
|
|
It does? When did that happen? _________________ Thomas S. Howard |
|
Back to top |
|
|
BitJam Advocate
Joined: 12 Aug 2003 Posts: 2508 Location: Silver City, NM
|
Posted: Sat May 06, 2006 9:00 am Post subject: Re: mv - sort of progress bar? |
|
|
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 |
|
|
RlC Guru
Joined: 30 Jul 2005 Posts: 358 Location: austria
|
Posted: Sat May 06, 2006 9:49 am Post subject: Re: mv - sort of progress bar? |
|
|
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 |
|
|
voytas Apprentice
Joined: 31 Mar 2004 Posts: 203 Location: Poland, Lodz
|
Posted: Sat May 06, 2006 10:08 am Post subject: Re: mv - sort of progress bar? |
|
|
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 |
|
|
Lawless l33t
Joined: 03 Nov 2003 Posts: 638 Location: Germany
|
Posted: Sat May 06, 2006 10:12 am Post subject: |
|
|
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 |
|
|
RlC Guru
Joined: 30 Jul 2005 Posts: 358 Location: austria
|
Posted: Sat May 06, 2006 4:15 pm Post subject: |
|
|
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 |
|
|
Lawless l33t
Joined: 03 Nov 2003 Posts: 638 Location: Germany
|
Posted: Sat May 06, 2006 4:16 pm Post subject: |
|
|
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 |
|
|
neylitalo Tux's lil' helper
Joined: 29 Jan 2006 Posts: 81
|
Posted: Sat May 06, 2006 5:33 pm Post subject: |
|
|
cp -g also works rather nicely. (Not in man pages) |
|
Back to top |
|
|
Lawless l33t
Joined: 03 Nov 2003 Posts: 638 Location: Germany
|
Posted: Sat May 06, 2006 5:36 pm Post subject: |
|
|
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 |
|
|
voytas Apprentice
Joined: 31 Mar 2004 Posts: 203 Location: Poland, Lodz
|
Posted: Sat May 06, 2006 8:05 pm Post subject: |
|
|
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 |
|
|
Lawless l33t
Joined: 03 Nov 2003 Posts: 638 Location: Germany
|
Posted: Sat Sep 16, 2006 4:26 pm Post subject: |
|
|
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 |
|
|
register_again n00b
Joined: 07 Feb 2005 Posts: 3
|
Posted: Fri May 18, 2007 6:41 pm Post subject: |
|
|
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 |
|
|
luminoso n00b
Joined: 13 Oct 2005 Posts: 60 Location: Portugal, Aveiro
|
Posted: Fri Jun 22, 2007 9:21 am Post subject: |
|
|
Does anybody knows why is progress bar disabled from portage?!? _________________ luminoso @ irc.ptnet.org |
|
Back to top |
|
|
N0n0 n00b
Joined: 12 Nov 2007 Posts: 4
|
Posted: Mon Nov 12, 2007 7:22 pm Post subject: |
|
|
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
|
|
Back to top |
|
|
tranquilcool Veteran
Joined: 25 Mar 2005 Posts: 1179
|
Posted: Thu Nov 15, 2007 11:32 am Post subject: |
|
|
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
|
_________________ this is a strange strange world. |
|
Back to top |
|
|
schorsche Apprentice
Joined: 27 Jan 2005 Posts: 230
|
Posted: Thu Nov 15, 2007 11:09 pm Post subject: Getting "cp: invalid option -- g" |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9645 Location: almost Mile High in the USA
|
Posted: Thu Nov 15, 2007 11:14 pm Post subject: |
|
|
-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 |
|
|
tarpman Veteran
Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Thu Nov 15, 2007 11:15 pm Post subject: |
|
|
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. _________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
|
schorsche Apprentice
Joined: 27 Jan 2005 Posts: 230
|
Posted: Fri Nov 16, 2007 9:31 am Post subject: |
|
|
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 |
|
|
ocin Guru
Joined: 01 Jan 2006 Posts: 500
|
Posted: Fri Nov 16, 2007 12:08 pm Post subject: |
|
|
The mv and cp's -g option was VERY useful, it's a shame that it got removed :( |
|
Back to top |
|
|
JeliJami Veteran
Joined: 17 Jan 2006 Posts: 1086 Location: Belgium
|
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Nov 16, 2007 2:49 pm Post subject: |
|
|
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 |
|
|
N0n0 n00b
Joined: 12 Nov 2007 Posts: 4
|
Posted: Sun Nov 18, 2007 8:03 pm Post subject: |
|
|
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 |
|
|
N0n0 n00b
Joined: 12 Nov 2007 Posts: 4
|
Posted: Sun Nov 18, 2007 8:06 pm Post subject: |
|
|
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 |
|
|
|