Create a file called "-rf *"

>create a file called "-rf *"
>remove this file with rm
>instead one file it fucking removes all files and directories
AHHAHAHAHAHHAHAHHAHHAHAHHAHAHAHHAHAHAHHA
How GNU/Niggers will ever recover from this? Your time wasting system is a fucking joke.

Attached: 2.jpg (258x360, 55K)

why the fuck would you name a file -rf? kill yourself you rabid monkey.

Your own fault for not escaping the characters.
If you had tab completed it, it would have added the escapes for you.

Another moron that can't spend 1 minute googling a solution to this problem.

>Hahaha, I ruined my computer on purpose I bet you feel silly now

Low IQ individual

Winniggers literally don't have this problem.

>inb4 they have many others
>inb4 COM
Not the same.

>Winniggers literally don't have this problem.
What problem?

% rm "-rf *"
rm: invalid option -- ' '
Try 'rm ./'-rf *'' to remove the file '-rf *'.
Try 'rm --help' for more information.
% rm -- "-rf *"
wow that was hard

>create a file called "-rf *" on windows
>ah yes you literally can't

The software is free and open source, you are free to fix that issue if you want.

"w-w-why would you d-do that j-just dont do that"
I thought linux was the OS of freedom and choice, retard?

I guess you do. The kernel API still rejects that character, despite the fact that NTFS allows for every character but the backslash.
You can only use the alternative syntax to create C:\con\con.

Attached: ERROR_INVALID_NAME.png (581x580, 19K)

So one should always be on a lookout for reserved terms in every single program he has to use?
lol

Don't bother, user. Shitposters aren't interested in the truth.

$ sudo rm "-rf *"
OP btfo

In addition * wouldn't expand to all files in the current dir when quoted. So even if you name a file *, using
rm "*"
would only remove said file.

That doesn't work, in that case rm assumes you are calling it with the four short parameters -r, -f, - and -*.
You either have to make it explicit that you're passing a filename (rm "./-rf *") or use the -- parameter which stops parsing for all following arguments. The latter is good practice if you're ever dealing with filenames which may start with a dash.

>create a file with a space in it
>try to use it in a command without surrounding it with quotes
huh? retard? oh?

Wouldn't "rm -rf *" only remove all files and folders on the current directory?

In that case you would have to create a file called "-rf `printf '\057'`*", as slashes are not allowed.