Add method to clean up hidden trashed files, usually from Android.

This commit is contained in:
2025-10-09 06:54:36 -07:00
parent 400ef8400c
commit 130b243be3

View File

@@ -283,6 +283,19 @@
alias edit-config-wrk="sudo $EDITOR {{ wrk_file }}"
alias edit-config-mnr="sudo $EDITOR {{ mnr_file }}"
alias edit-config-srv="sudo $EDITOR {{ srv_file }}"
function_clean_trashed: |
function clean-trashed {
dir="$1"
if [[ -z $dir ]]; then
dir="./"
fi
cd $dir
dir="`pwd`"
echo "Removing '.trashed*' files in '$dir'."
find "$dir" -name ".trashed*" -exec du -h {} \; -delete
}
alias trashed-cleanup="clean-trashed"
alias trashed-clean="clean-trashed"
function_check_trash: |
function check-trash() {
unset OPTIND
@@ -378,6 +391,9 @@
fi
echo "Checking but not cleaning /var/mail..."
du -ha /var/mail | sort -h
if [[ $clean == "Y" ]]; then
clean-trashed "~/"
fi
return 0
}
alias check_trash="check-trash"
@@ -895,6 +911,7 @@
{{ metasploit_aliases }}
{{ show_config_aliases }}
{{ edit_config_aliases }}
{{ function_clean_trashed }}
{{ function_check_trash }}
{{ function_clean }}
{{ function_flatpak_usage }}