v0 bash script

This commit is contained in:
2024-10-23 11:52:16 +02:00
commit 5dcf6408e2

15
delete_Trash-1000.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/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."