Find all files with the extension ".jpg" in the Desktop directory, sort them by the second field, and compress them using the highest compression level.
find ~/Desktop -iname '*.jpg' | sort -k 2,2 | xargs gzip -9