Suppose I have a bunch of files in /tmp/
.
I do
find . -type f | xargs -iFILES
And I want to do a md5sum
in each file, outputting to a file with the same name, but with .md5
extension.
find . -type f | xargs -iFILES md5sum FILES > FILES.md5
This is supposed to create a md5 file for each file found by find command. Instead, it creates a single FILES.md5 file on disk with checksums from all files.
How do I say to md5sum command that the FILES represent the current filename and not a FILES literal string?