Find all files in the current directory and its subdirectories, whose names end with either .png or .pdf, shuffle them randomly, select the first one, and update its timestamp.
find ~ -type f \( -name "*.png" -o -name "*.pdf" \) | shuf | head -n1 | xargs touch