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 \-rfBut 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?
LOL, that was fun! I created a file with the name ‘-rf’ and tried to delete it in all possible ways, but i couldn’t! I was _this_ close to use python for this, bu instead i read the man page! I thought this was a bug, but turns not!
So …
rm -- -rf
Now it’s gone :)
Atleast you did not create 2 separate files ( -rf & * )! Imagine combining them!
As if the person who posted the question didn’t know exactly what he was getting up to when he named the file that. ;)
Just in case, if you weren’t aware, — on itself tells that there are no more options to follow and process whatever follows as arguments (startx uses this trick to pass arguments to xserver it calls).