0

I have a directory in which thousands of directories are present. I need to get md5sum of only around 60 directories from this list of thousands of directories. How do I selectively run the md5 on a selective set of directories.

I know the below command, find "dir_name" -type f -print0 | sort -z | xargs -r0 md5sum | md5sum

But I have a list of 60 directories as the target from the list of 1000's present in the file system.

If anyone advise, it would be of great help.

Regards, Kushal Chaudhary

1 Answer 1

0

You can run through the loop.

for folder in `cat <file which has folder list>; do find folder -type f -print0 | sort -z | xargs -r0 md5sum | md5sum;done

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .