#!/bin/bash # Ask the user for the path to the folder read -p "Enter the path to the folder: " folder_path # Check if the provided path is valid if [ ! -d "$folder_path" ]; then echo "Invalid folder path. Please provide a valid directory." exit 1 fi # Find and delete all .Trash-1000 directories within the provided path find "$folder_path" -type d -name ".Trash-1000" -exec rm -rf {} + echo "All .Trash-1000 folders and their contents have been deleted."