0

I am new to terminal. I started moving 30 gigs of data, from my desktop to my portable harddisk with the command mv location1 location2.

The problem is, I cannot see, how much data has been transferred.

How to see the progress in a bar format or in percentage format?

2

I found this https://github.com/atdt/advcpmv it adds the -g option to cp and mv which will display a progress bar.

Here's how I got it to work on El Captain:

Requirements:

Then:

wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
tar xvJf coreutils-8.21.tar.xz
cd coreutils-8.21/
wget https://raw.githubusercontent.com/atdt/advcpmv/master/advcpmv-0.5-8.21.patch
patch -p1 -i advcpmv-0.5-8.21.patch
./configure
make

At this point you will have cp and mv binaries in src/ give them a try and if you don't have problem with them you can move them to /usr/local/bin.

You may also rename the two binaries to cpgres and mvgres (or other unique names) so that you can use the standard cp/mv commands also.

2
  • @klanomath You are wrong, I just tried and it works fine. Thanks for downvoting without trying. So I will the answer with the steps. Jul 27 '16 at 20:10
  • I downvoted the answer because it was almost a link-only answer. But I also upvote answer after they got improved ;-)!
    – klanomath
    Jul 27 '16 at 21:23
1

rsync can do that for you, with a nice progress meter that (as the man page says) "gives a bored user something to watch".

rsync --progress --remove-source-files {source file} {destination}

There's a lot else that rsync can do, such as mirroring directories, recursing large trees, throttling bandwidth usage, and much more. man rsync is your friend.

Oh, and since you're moving a directory tree, be sure to include the --recursive option.

1
  • it does not give a progress meter for the whole set of files.it shows for each specific file. which is just occupying terminal space, no actual knowledge is achieved from it. Jul 27 '16 at 20:20
0

The standard mv command doesn't offer an option to show progress. What you can do instead is

  • open a new Terminal tab with Cmd-T
  • check the size of the target file by running ls -l location2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .