Find all files with the extension .jpg in the current directory, sort them randomly, select the first one, and move it to the target directory.
find ~ -name '*.jpg' | sort -R | head -n1 | xargs mv {} target_directory