dot

52 points · 9 comments · view on lemmy.world

9 Comments

riodoro1@lemmy.world · 4 pts · 3y (1 reply)

I alias rm to rm --no-preserve-root for a nice surprise.

bhez@startrek.website · 4 pts · 3y (3 replies)

Yep, my friend made a similar mistake. He meant rm -rf music But typed rm -rf /music

Deleted his whole music collection which was very important to him. I felt so bad for him. I had given him the little bit of Linux knowledge he had when he switched to Linux and made that mistake.

greenmanz@lemmy.world · 6 pts · 3y

To avoid rm mistakes in the future, you could set an alias that always provides the "-i" flag which makes the command prompt you with y/n before the deletion. Another solution is to alias rm for trash-cli commands to move files to the trash like when you delete files in your graphical file manager.

Seven@lemmy.world · 0 pts · 3y (1 reply)

there was a undo package for that if I remember correctly

Seven@lemmy.world · 0 pts · 3y

gitfs has that? maybe idk

dontcarebear@lemmy.world · 3 pts · 3y
[ removed ]
celia@pricefield.org · 1 pts · 3y

Been there, done that.

UdeRecife@lemmy.sdfeu.org · 1 pts · 3y

Install trash. Then create an alias for it. rm='trash -frv'. Problem solved.