Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (9.5k points)

Can anyone tell me how to calculate the md5 checksum for all files which are in the *.py type placed under a directory and subdirectories? 

1 Answer

0 votes
by (19.7k points)

Check the code below to list all the files with .py extension. As you run this code, it calculates the md5 sum for each .py file and it returns the sorted list. 

find /path/to/dir/ -type f -name "*.py" -exec md5sum {} + | awk '{print $1}' | sort | md5sum

Interested in Linux? Check out this Linux Certification by Intellipaat. 

Related questions

0 votes
1 answer
asked Jul 14, 2019 in Java by Suresh (3.4k points)
0 votes
2 answers
asked Jul 12, 2019 in Java by Aditya98 (1.3k points)

Browse Categories

...