Removing file named -rf in Unix
· ☕ 1 min read · ✍️ Sathyajith Bhat
I did something crazy at some point that created a file called “-rf” on my filesystem. Now I can’t figure out how to delete it.
I’ve tried:
rm "-rf" rm -rf
But these just exit immediately. Arrgh!
Anyone know how to remove this file? Preferably without accidentally cleaning out my whole folder.
heh. What’re the odds, eh?
via Removing “-rf” file in Unix - Super User.