more verbose
This commit is contained in:
@@ -10,6 +10,23 @@ if [ ! -d "$folder_path" ]; then
|
||||
fi
|
||||
|
||||
# Find and delete all .Trash-1000 directories within the provided path
|
||||
find "$folder_path" -type d -name ".Trash-1000" -exec rm -rf {} +
|
||||
echo "Searching for .Trash-1000 folders in $folder_path..."
|
||||
|
||||
echo "All .Trash-1000 folders and their contents have been deleted."
|
||||
trash_folders=$(find "$folder_path" -type d -name ".Trash-1000")
|
||||
|
||||
if [ -z "$trash_folders" ]; then
|
||||
echo "No .Trash-1000 folders found."
|
||||
else
|
||||
echo "Found the following .Trash-1000 folders:"
|
||||
echo "$trash_folders"
|
||||
echo
|
||||
|
||||
# Loop through each found folder and delete it while displaying progress
|
||||
while IFS= read -r folder; do
|
||||
echo "Deleting folder: $folder"
|
||||
rm -rf "$folder"
|
||||
echo "Deleted $folder"
|
||||
done <<< "$trash_folders"
|
||||
|
||||
echo "All .Trash-1000 folders have been deleted."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user