Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

This question already has an answer here:

I want to perform the following command in command line :

$ md5sum $(find . -type f)

But this would cause problems when it encounter files with spaces in filenames :

md5sum: Kaufmann: No such file or directory
md5sum: Mobile: No such file or directory
md5sum: 3D: No such file or directory
md5sum: Graphics: No such file or directory
share|improve this question

marked as duplicate by Gilles, terdon, slm, jasonwryan, Anthon Jan 16 '14 at 5:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 4 down vote accepted

Do this way instead:

find . -type f -exec md5sum {} \;

This way spaces in the matched filenames will be handled correctly.

share|improve this answer

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