>>107023604
i think everyone has done this.
put this in your .bashrc
alias rm='__safe_rm'
__safe_rm() {
local current_dir
current_dir="$(pwd)"
# Change this path to your actual username if needed
if [[ "$current_dir" == "/home/user" || "$current_dir" == /home/user/* ]]; then
echo " rm is disabled in $current_dir"
return 1
fi
command rm "$@"
}