Add extension to files found without it

This command will find any files without extension and append the “jpg” extension to them:

find /base_dir -type f ! -name "*.*" -exec mv '{}' '{}'\.jpg \;

Advertisements