1299
you are viewing a single comment's thread
view the rest of the comments
[-] Damage@feddit.it 7 points 6 months ago
[-] rtxn@lemmy.world 16 points 6 months ago* (last edited 6 months ago)

Uh... kinda? Powershell has many POSIX aliases to cmdlets (equivalent to shell built-ins) of allegedly the same functionality. rmdir and rm are both aliases of Remove-Item, ls is Get-ChildItem, cd is Set-Location, cat is Get-Content, and so on.

Of particular note is curl. Windows supplies the real CURL executable (System32/curl.exe), but in a Powershell 5 session, which is still the default on Windows 11 25H2, the curl alias shadows it. curl is an alias of the Invoke-WebRequest cmdlet, which is functionally a headless front-end for Internet Explorer unless the -UseBasicParsing switch is specified. But since IE is dead, if -UseBasicParsing is not specified, the cmdlet will always throw an error. Fucking genius, Microsoft.

[-] UnspecificGravity@infosec.pub 5 points 6 months ago

Jesus, They really just need to start over.

[-] Trainguyrom@reddthat.com 2 points 6 months ago

Yeah as an admin I love that I can run familiar Linuxy commands in powershell but I also hate that they can't just use/fork the real userland utilities so everything works just similarly enough to completely throw you off when you stumble across a difference

[-] Damage@feddit.it 5 points 6 months ago

That's hilarious

[-] Redkey@programming.dev 2 points 6 months ago* (last edited 6 months ago)

"rd" and "rmdir" only work on empty directories in MS-DOS (and I assume, by extension, in Windows shell). "deltree" is for nuking a complete tree including files, as the name suggests.

[-] Cevilia@lemmy.blahaj.zone 19 points 6 months ago

In the original Reddit post it's mentioned that the agent ran "rmdir /s" which does in fact work on directories containing files and/or subdirectories.

[-] FalschgeldFurkan@lemmy.world 3 points 6 months ago

"rmdir /s" - /s for sarcasm

"Where the fuck is all my data?"

[-] qevlarr@lemmy.world 2 points 6 months ago

Wait, what do people use other than rmdir?

[-] Damage@feddit.it 1 points 6 months ago

I don't have a Windows computer on hand, but I think del works on directories? I'm going by very old memories here

[-] T156@lemmy.world 1 points 6 months ago

Del is files, Rmdir is directories.

Running del on folders just leaves an empty tree.

[-] underisk@lemmy.ml 1 points 6 months ago* (last edited 6 months ago)

Windows explorer

this post was submitted on 01 Dec 2025
1299 points (99.1% liked)

Programmer Humor

31670 readers
1027 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS