Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I would like to implement a command line progress bar using pipe viewer or dialog GUI tool for the md5deep command.

I tried the following :

pv file.md5 | md5deep -X - -r Destination

I was not able to get the progress bar working. There is an option in md5deep where you can get the ETA by doing the following:

md5deep -eX file.md5 -r Destination

This option determines the ETA for each file and it is not possible to determine how long it might take for the entire directory. Any suggestions to implement a progress would be appreciated

share|improve this question
Not going to happen for MD5-verify unless you modify md5deep source... – izx Jul 5 '12 at 17:31
@izx - Modify the source? You mean the contents of the directory that needs to be checked? – Sai Jul 5 '12 at 18:23
No, I mean the source code of md5deep. – izx Jul 5 '12 at 19:20

This is not particularly elegant, but it might do the trick (not using md5deep, but rather md5sum: however, every file is recursively listed and passed to md5sum,anyway):

$ tar cf - .   | pv -s $(du -scb . | tail -1 | cut -f1) | tar tf - | xargs  md5sum  > /tmp/md5.txt 2> /tmp/md5.err.txt

...note that this is not technically tracking progress of the md5sum, but rather tracking progress of tar/untar, then passing the file to md5sum after the fact. The progress is only approximated by taking the size (du) of the directory to be processed; if the last file to process takes an hour, it'll report 100% for the duration of the processing of last file. (I imagine something similar could be done by using something other than tar.) And it is subject to all the limitations of tar/xargs in terms of filenames (spaces, etc). (As I said, not elegant.)

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.