Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

This works:

find . -type f | xargs md5sum | sort

This does not and gives several "md5sum: xyz not found" errors:

( find . -type f | xargs md5sum | sort ) >~/md5.txt

Same for:

find . -type f | xargs md5sum | sort >~/md5.txt

This works:

md5deep -r . | sort >~/md5.txt

I would like to understand why the redirection of the pipe constructs doesn't work.

share|improve this question
Your third example produces valid output for me. What operating system are you testing on? – Oliver Salzburg Mar 9 '12 at 15:20
Ubuntu 10.04.4 LTS + bash version 4.1.5(1)-release (x86_64-pc-linux-gnu) – KIAaze Mar 9 '12 at 15:28
up vote 3 down vote accepted

Very possibly, file name starts with xyz contains white space.
You can try this:

$ find . -type f -print0 | xargs -0 md5sum | sort
share|improve this answer
Ah, yes indeed. Should have noticed that. Thanks. :) – KIAaze Mar 9 '12 at 16:20

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.