azha@lemm.ee to linuxmemes@lemmy.worldEnglish · 2か月前Freedomlemm.eeexternal-linkmessage-square76fedilinkarrow-up1924arrow-down118
arrow-up1906arrow-down1external-linkFreedomlemm.eeazha@lemm.ee to linuxmemes@lemmy.worldEnglish · 2か月前message-square76fedilink
minus-squareLeninOnAPrayer@lemm.eelinkfedilinkEnglisharrow-up14·edit-22か月前alias trash-put from trash-cli in both sudo and user. myrm() { trash-put "$@" } alias rm="myrm" This has saved my ass so many times. Especially when typing “rm * .png” instead of “rm *.png” Can restore the files using the cli or from system recycling bin. The alias to rm is probably not best. So getting use to using another name is probably best. But I’m never had a problem with it.
minus-squaregrrgyle@slrpnk.netlinkfedilinkarrow-up12·2か月前That feeling where rm is taking a while to return to the prompt
minus-squareLeninOnAPrayer@lemm.eelinkfedilinkEnglisharrow-up4·2か月前Exactly. Ctrl+C and hope ls isn’t completely empty.
minus-square_____@lemm.eelinkfedilinkEnglisharrow-up2·2か月前I’ve never ran into any issues from using rm but I like this idea and will be using it as I only see positives
minus-squareLeninOnAPrayer@lemm.eelinkfedilinkEnglisharrow-up3·2か月前Downsides can be inconsistent behavior. As with any alias it’s not meant to be anything but a replacement in your shell. Scripts/SSH etc. Also, you gotta remember to empty your trash. :)
minus-squarepressanykeynow@lemmy.worldlinkfedilinkarrow-up3arrow-down1·2か月前Or just use snapshots. If you are into aliases make an alias for rm to make a snapshot before deleting something.
alias trash-put from trash-cli in both sudo and user.
myrm() { trash-put "$@" } alias rm="myrm"
This has saved my ass so many times. Especially when typing “rm * .png” instead of “rm *.png”
Can restore the files using the cli or from system recycling bin.
The alias to rm is probably not best. So getting use to using another name is probably best. But I’m never had a problem with it.
That feeling where rm is taking a while to return to the prompt
Exactly. Ctrl+C and hope ls isn’t completely empty.
I’ve never ran into any issues from using rm but I like this idea and will be using it as I only see positives
Downsides can be inconsistent behavior. As with any alias it’s not meant to be anything but a replacement in your shell. Scripts/SSH etc.
Also, you gotta remember to empty your trash. :)
Or just use snapshots. If you are into aliases make an alias for rm to make a snapshot before deleting something.