Linux Command Line Tricks

From Public Wiki
Jump to navigation Jump to search

MD5SUM an entire directory tree

Synopsis

Create a single text file that contains a list of every file in the current directory, including complete path, along with an MD%SUM such that it is easy to parse afterwards.

Code

find "$(pwd)" > list.txt
xargs md5sum < list.txt > md5list.txt
rm list.txt