LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how do i md5 hash all files in a sub-folder and save it as a file? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-md5-hash-all-files-in-a-sub-folder-and-save-it-as-a-file-755191/)

steve51184 09-14-2009 06:11 PM

how do i md5 hash all files in a sub-folder and save it as a file?
 
right i've got it done (unless you know a better way) but it doesn't follow symlinks

Code:

find /folder -name "*" -type f -size +1M -exec md5sum {} \; > file.txt
so how do i make it follow symlinks?

forrestt 09-14-2009 06:26 PM

The -L option to find follows symlinks.

This gives you:

Code:

find -L -type f -name "*" -size +1M -exec md5sum {} \; > file.txt
Just a note which you may or may not be aware of, if you truly want all filenames, you don't need to put -name "*", just leave it out. However, this will also match hidden files like .filename (which what you have will not), so it may not be what you want.

HTH

Forrest

steve51184 09-14-2009 06:38 PM

nice one thank you!! ;)


All times are GMT -5. The time now is 02:03 PM.