I have a a directory with a structure like so:
.
├── Test.txt
├── Test1
│ ├── Test1.txt
│ ├── Test1_copy.txt
│ └── Test1a
│ ├── Test1a.txt
│ └─
How about:
find /path/you/need -type f -exec md5sum {} \; > checksums.md5
Update#1: Improved the command based on @twalberg's recommendation to handle white spaces in file names.
Update#2: Improved based on @jil's suggestion, to remove unnecessary xargs
call and use -exec
option of find instead.
Update#3: @Blake a naive implementation of your script would look something like this:
#!/bin/bash
# Usage: checksumchecker.sh
find "$1" -type f -exec md5sum {} \; > "$1"__checksums.md5