Joe Klemmer <klemmerj@xxxxxxxxxxx> writes: > I alomst hate to admit it but the rm bug bit me for the second time > # rm -fR mozilla * Being On Topic: the propensity of distributions like Fedora to alias rm='rm -i' leads to hassles when it is not needed and a disasterous habit of using rm -f. I use this: export RM_NUM_CONFIRM=11 function FRM_CONF () { local rm_ok="y" local rqual="-d --" local q for q do case "$q" in --) break ;; --recursive) rqual="-RA --" break ;; --*) ;; -*[rR]*) rqual="-RA --" break ;; esac done local num_rm=$[$(ls 2>/dev/null $rqual $@ | wc -w)] if [ "$num_rm" -ge "$RM_NUM_CONFIRM" ] then echo -n "Remove (approx) $num_rm files OK? " read rm_ok fi if [ "z$rm_ok" = "zy" -o "z$rm_ok" = "zY" ] then \rm "$@" fi } alias rm=FRM_CONF Not perfect, but quite nice. -- Donald Arseneau asnd@xxxxxxxxx -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list