Add method to clean up hidden trashed files, usually from Android.
This commit is contained in:
@@ -283,6 +283,19 @@
|
|||||||
alias edit-config-wrk="sudo $EDITOR {{ wrk_file }}"
|
alias edit-config-wrk="sudo $EDITOR {{ wrk_file }}"
|
||||||
alias edit-config-mnr="sudo $EDITOR {{ mnr_file }}"
|
alias edit-config-mnr="sudo $EDITOR {{ mnr_file }}"
|
||||||
alias edit-config-srv="sudo $EDITOR {{ srv_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: |
|
||||||
function check-trash() {
|
function check-trash() {
|
||||||
unset OPTIND
|
unset OPTIND
|
||||||
@@ -378,6 +391,9 @@
|
|||||||
fi
|
fi
|
||||||
echo "Checking but not cleaning /var/mail..."
|
echo "Checking but not cleaning /var/mail..."
|
||||||
du -ha /var/mail | sort -h
|
du -ha /var/mail | sort -h
|
||||||
|
if [[ $clean == "Y" ]]; then
|
||||||
|
clean-trashed "~/"
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
alias check_trash="check-trash"
|
alias check_trash="check-trash"
|
||||||
@@ -895,6 +911,7 @@
|
|||||||
{{ metasploit_aliases }}
|
{{ metasploit_aliases }}
|
||||||
{{ show_config_aliases }}
|
{{ show_config_aliases }}
|
||||||
{{ edit_config_aliases }}
|
{{ edit_config_aliases }}
|
||||||
|
{{ function_clean_trashed }}
|
||||||
{{ function_check_trash }}
|
{{ function_check_trash }}
|
||||||
{{ function_clean }}
|
{{ function_clean }}
|
||||||
{{ function_flatpak_usage }}
|
{{ function_flatpak_usage }}
|
||||||
|
Reference in New Issue
Block a user