rm -i - BSD

Users browsing this thread: 1 Guest(s)
pfr
Nixers
(21-11-2021, 12:48 PM)seninha Wrote: I (with the help of the #bash IRC channel) created this function that simulates GNU rm -I (the less-intrusive interactive functionality that GNU rm has). Just put it in your ~/.kshrc: https://0x0.st/-7Xb.sh

Neat! In my case, my ~/.shrc is already quite lengthy with lots (I mean LOTS) or aliases and functions. Why not add more :)

(21-11-2021, 03:55 PM)z3bra Wrote: As said above, you can simply "rm -rf directory" as it will expand to "rm -i -rf directory" and -f takes precedence over -i.

This is the simplest solution, but I was looking for a soution that meant I could just type rm and it will intuitively either use -i or -rf. Yes, I am that lazy that I only want to type 2 letters!


Messages In This Thread
rm -i - by pfr - 21-11-2021, 08:16 AM
RE: rm -i - by venam - 21-11-2021, 08:18 AM
RE: rm -i - by pfr - 21-11-2021, 08:31 AM
RE: rm -i - by mattrose - 21-11-2021, 10:48 AM
RE: rm -i - by seninha - 21-11-2021, 12:48 PM
RE: rm -i - by movq - 21-11-2021, 02:34 PM
RE: rm -i - by z3bra - 21-11-2021, 03:55 PM
RE: rm -i - by pfr - 26-11-2021, 01:27 AM
RE: rm -i - by maksim - 05-10-2022, 05:45 AM