How to find all files in folder and calculate md5 and redirect to a file in one CLI
Hello friends,
Can anyone teach me how to find all files in a folder and calculate md5 hashes and redirect to a file in one command line? Any idea will be appreciated. |
Have a look at this:
Code:
find /path/to/files -type f -exec md5sum {} >> /path/to/outfile \; |
Hi,
how about Code:
md5sum /path/to/a/folder/* > md5sums.txt Evo2. |
Do you mean you want to get the checksum of ALL the files inside a directory? Or do you have to specify some criteria to select some specific files? In the first case:
Code:
find /path/to/dir -maxdepth 1 -type f -exec md5sum {} \+ > all.md5 Edit: too late! ;) evo2's solution is more straightforward, anyway. |
Ohh, for completeness, the shell glob version for all files in subdirectories (or folders in OP speak)
Code:
md5sum /path/to/a/folder/**/*(^/) > md5sums.txt Evo2. |
All times are GMT -5. The time now is 09:58 AM. |