The following works from the terminal no problem
find testDir -type f -exec md5sum {} ;
Where testDir is a directory that contains some files (for example file1, file2 and file3).
However, if I run this from a bash script or from Java using something like
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("find testDir -type f -exec md5sum {} ;");
I get the following error
find: missing argument to `-exec'
Any ideas?
UPDATE: This was answered correctly over on stackoverflow. I will close the question here. https://stackoverflow.com/questions/10704889/java-execute-command-line-program-find-returns-error