* Ian Zimmerman on Saturday, September 19, 2015 at 17:28:18 -0700 > On 2015-09-20 01:43 +0200, Christian Ebert wrote: >> printf '%s' "/full/path/to/directory" | md5 | xargs rm -r
The `-r` should have been omitted of course. > Thanks for the tip, it almost works :P On which system is there a md5 > program? BSD-like Mac OS X, sorry, hadn't thought of that. Conversely it doesn't come with md5sum. > Here: > > [9+0]~$ folder=Mail/inbox > [10+0]~$ printf '%s' `readlink -f $folder` | md5sum > 6937aaf0469360e061c78ffae25359d2 - > [11+0]~$ printf '%s' `readlink -f $folder` | md5sum | awk '{print $1;}' > 6937aaf0469360e061c78ffae25359d2 That would not work here because readlink doesn't have an -f option and afaics no way to display the full path. I would probably do something like to handle a relative path: $ printf '%s/%s' "$PWD" "$folder" | md5 | xargs rm -- \black\trash movie _SAME TIME SAME PLACE_ --->> http://www.blacktrash.org/underdogma/stsp.php \black\trash audio _ANOTHER TIME ANOTHER PLACE_ --->> http://www.blacktrash.org/underdogma/atap.html