Find all files with the extension ".jpg" in the current directory, sort them randomly, select the first one, and move it to a new destination.
find ~ -iname "*.jpg" -print0 | sort -R | head -n1 | xargs -I % echo mv % new_destination