How to delete all your files
reddit.com
How to delete all your files
1–10 of 66 posts
Re: How to delete all your files
#2Re: How to delete all your files
#3> never use only * as a wildcard. A ./* would save you in most cases
My friend typod that for /* in an rm -rf command but caught it just in time. They seemed like unnecessary characters to me if it does the same as *, and I don't think they do it anymore, but now I'm not sure which is worse...
I suppose good backups just go a long way whatever you do.
Re: How to delete all your files
#4Re: How to delete all your files
#5I once saw a friend nearly delete all their files using tip#3 from the thread: > never use only * as a wildcard. A ./* would save you in most cases My friend typod that for /* in an rm -rf command but caught it just in time. They seemed like unnecessary characters to me if it does the same as *, and I don't think they do it anymore, but now I'm not sure which is worse... I suppose good backups just go a long way what…
Re: How to delete all your files
#6I once saw a friend nearly delete all their files using tip#3 from the thread: > never use only * as a wildcard. A ./* would save you in most cases My friend typod that for /* in an rm -rf command but caught it just in time. They seemed like unnecessary characters to me if it does the same as *, and I don't think they do it anymore, but now I'm not sure which is worse... I suppose good backups just go a long way what…
After an allnighter, which isn't easy for me anymore, I typed:
``rm -rf. /*``
with the dot and the space reversed.
When the shell threw an error in my face, I thought, "oh, an extra dot." so I deleted the dot and re-run the command.
And there goes my configs and most of the dotfiles in my home dir. Luckily, I have backup for some of those, so it wasn't a complete disaster.
I don't trust myself doing ``rm`` in commandline anymore.
Re: How to delete all your files
#7Nobody wants to talk about msdos?
...In a way that can be checked in source control and reviewed?
CLIs are not bad.
Re: How to delete all your files
#8[0]: https://www.defensecode.com/public/DefenseCode_Unix_WildCard... [1]: https://news.ycombinator.com/item?id=8189968 [2]: https://news.ycombinator.com/item?id=17376895