I hate using rmdir and I always write rm -rf because it happens that I need to remove multiple files and directories at once and I'm to lazy to write multiple commands :(
Thanks for sharing, I love this kind of content! :)
That's a bad idea, scripts might use rm and it starts adding up to your trash. Also, if you keep the habit of using rm you might be less careful when using it on a machine that doesn't have trash installed.
Solution: For now, make rm print something like "no, use trash", and get a habit of using trash over rm.
In fact, I don't think I'll continue to use trash because it's relatively slow compared to rm. Finally, it's a part of my job to think before acting ¯_(ツ)_/¯.
No no no that's not what I meant! Even if I barely ever need to restore from trash, it's really nice to not feel worried you're destroying your system. Also, shouldn't moving directories be faster than deleting each file?
I hate using
rmdir
and I always writerm -rf
because it happens that I need to remove multiple files and directories at once and I'm to lazy to write multiple commands :(Thanks for sharing, I love this kind of content! :)
I like to use trash, It's a lot better tool. check it out! npmjs.com/package/trash-cli
Thanks, I'll give it a try ! :)
but don't forget to make alias, so you get
trash
when typingrm
That's a bad idea, scripts might use
rm
and it starts adding up to your trash. Also, if you keep the habit of usingrm
you might be less careful when using it on a machine that doesn't have trash installed.Solution: For now, make
rm
print something like "no, use trash", and get a habit of usingtrash
overrm
.Good observation!
In fact, I don't think I'll continue to use
trash
because it's relatively slow compared torm
. Finally, it's a part of my job to think before acting ¯_(ツ)_/¯.No no no that's not what I meant! Even if I barely ever need to restore from trash, it's really nice to not feel worried you're destroying your system. Also, shouldn't moving directories be faster than deleting each file?
I'm guessing NodeJS
fs
is not as fast as the linux filesystem ? ^You were using a NodeJS version of trash-cli? Try github.com/andreafrancia/trash-cli.
I tried the version mentioned earlier:
github.com/sindresorhus/trash-cli
I'll give a try to yours :)
Always choose the first result on Google ;)
I do the same!! Oh my..