v0 bash script
This commit is contained in:
15
delete_Trash-1000.sh
Normal file
15
delete_Trash-1000.sh
Normal 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."
|
||||||
Reference in New Issue
Block a user