In a Unix-like shell, implement a small utility that finds all .jpg files in the current directory and all subdirectories that were modified more than 60 days ago and copies them to a backup location.
What you must deliver:
A script named backup_jpgs.sh that performs the task.
The script should:
Use a default backup directory named ./backup, allow override via BACKUP_DIR.
Preserve the directory structure when copying.
Not delete originals.
Exit with non-zero status on errors.
Print a concise summary (count of files and bytes copied).
Optional but encouraged:
A dry-run mode (-n / --dry-run) that prints what would be copied without copying.
How to run:
Make it executable: chmod +x backup_jpgs.sh
Run: ./backup_jpgs.sh
To override: BACKUP_DIR=./my_backup ./backup_jpgs.sh