1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh # MV Time-Uuid find "$@" -type f -execdir sh -c ' file="$(basename "$1")" ext="${file##*.}" if [ "$ext" != "$file" ]; then dest="$(time-uuid).$ext" else dest="$(time-uuid)" fi [ -e "dest" ] || mv -v -- "$1" "$dest" ' shell '{}' \;