Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is is possible to display a progress bar when copying files in Terminal using cp?

share|improve this question
…you could also consider using rsync instead. – Asmus Jul 28 '11 at 19:25
up vote 25 down vote accepted

You can use rsync instead.

rsync --progress /copy/from /copy/to
share|improve this answer
Thanks you very much! – daviesgeek Jul 29 '11 at 17:07
Speedwise, which is faster, rsync or cp? – daviesgeek Jul 29 '11 at 17:08
If all files being copied do not exist in the destination I don't think there will be a noticeable difference. If some of the files do exist in the destination then it will vary because rsync does some checking. Rsync will usually (but not always) be faster in that case. – bahamat Jul 29 '11 at 17:11
Ok, thanks so much! – daviesgeek Jul 29 '11 at 17:34
   strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \
      | awk '{
        count += $NF
            if (count % 10 == 0) {
               percent = count / total_size * 100
               printf "%3d%% [", percent
               for (i=0;i<=percent;i++)
                  printf "="
               printf ">"
               for (i=percent;i<100;i++)
                  printf " "
               printf "]\r"
         END { print "" }' total_size=$(stat -c '%s' "${1}") count=0

It's not perfect, but it works... drop that in a directory path and name it something similar..

share|improve this answer do I get that to run??? – daviesgeek Jul 29 '11 at 17:07
I don't recall whether OS X had an strace command at the time this answer was written (July 2011), but it definitely doesn't today. – Tim Ruddick Sep 4 '13 at 21:11

If you are copying large files or directories using cp, you can open up 'Activity Monitor', go to the 'Disk' tab and look for the process 'cp'. Here you can keep track of how many bytes have been written since the last boot, giving you a rough idea of the progress. (OS X 10.10).

Hope that helps!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.