find /path_to_start_from -name "*.jp{,e}g" 2>/dev/null > output.txt