News for hackers. Stuff that matters.
Re:PCs refuse to shut down after Microsoft patch by einsteinx2 on Saturday January 17, 2026 @07:50AM (#46657672)
> Microsoft says that entering the command "shutdown /s /t 0" at the command prompt will, in fact, force your PC to turn off, whether it wants to or not.

Wow how the tables have turned…the argument used to be you used Windows instead of Linux because on Linux you might occasionally have to use the scary terminal to fix an issue haha.

Re:PCs refuse to shut down after Microsoft patch by terminalbraid on Saturday January 17, 2026 @08:00AM (#46657722)
Microsoft has been issuing fixes like this with alarmingly increasing frequency.
Re:PCs refuse to shut down after Microsoft patch by 0x000xca0xfe on Saturday January 17, 2026 @08:53AM (#46658077)
It's part of their secret strategy to turn oldschool Windows dinosaurs into enthusiastic Linux power users. Next they'll introduce middle click pasting.
Re:PCs refuse to shut down after Microsoft patch by steve1977 on Saturday January 17, 2026 @10:12AM (#46658665)
Now that GNOME wants to abandon it.
Re:PCs refuse to shut down after Microsoft patch by Andrex on Saturday January 17, 2026 @11:42AM (#46659444)
*turn it from default-on to default-off
Re:PCs refuse to shut down after Microsoft patch by shevy-java on Saturday January 17, 2026 @11:54AM (#46659561)
It's still a change. GNOME dictates onto users what the developers think the users should use or have. I find that not acceptable.
Re:PCs refuse to shut down after Microsoft patch by squigz on Saturday January 17, 2026 @12:11PM (#46659721)
This can be said about literally any software? And as GP points out, it's not "dictating what you can use or have" - you can turn it back on.
Re:PCs refuse to shut down after Microsoft patch by kstenerud on Saturday January 17, 2026 @12:20PM (#46659804)
I once watched a co-worker completely bork a customer system by accidentally middle-clicking while moving his mouse after copying an ls -l of /usr/bin (where pretty much everything was a symlink to the real executables in /bin).

Yeah, he shouldn't have been logged in as root, but the point remains that middle-mouse paste can be extremely dangerous and fat-finger-prone.

Re:PCs refuse to shut down after Microsoft patch by amlib on Saturday January 17, 2026 @03:27PM (#46661707)
That problem has been solved by terminals whose readline awaits actual user input (actual enter from the keyboard) even when you paste a command with single line break or a multiline command. Most linux terminals do that nowadays, and it's also great for giving you a chance to review that oneliner you've copied from the browser, which could contain something different than what was shown.
Re:PCs refuse to shut down after Microsoft patch by hdgvhicv on Saturday January 17, 2026 @07:16PM (#46663542)
It’s a right pain reverting that on modern desktops.
Re:PCs refuse to shut down after Microsoft patch by networkadmin on Saturday January 17, 2026 @01:06PM (#46660327)
I love Linux, but the cut and paste situation is really terrible. The middle mouse paste isn't a problem for me--it's that there are two separate "clipboard" buffers, which just causes all sorts of problems.
Re:PCs refuse to shut down after Microsoft patch by doubled112 on Saturday January 17, 2026 @01:37PM (#46660622)
Having two separate clipboard buffers is a feature I intentionally use.
Re:PCs refuse to shut down after Microsoft patch by johnisgood on Saturday January 17, 2026 @02:23PM (#46661156)
You and I both.
Re:PCs refuse to shut down after Microsoft patch by SkiFire13 on Saturday January 17, 2026 @02:09PM (#46660978)
Re:PCs refuse to shut down after Microsoft patch by jolmg on Saturday January 17, 2026 @05:39PM (#46662819)
Except it's not a bug that found use. It's intentional behavior. From https://specifications.freedesktop.org/clipboard/latest/:

> The rationale for this behavior is mostly that [having a unified clipboard] has a lot of problems, namely:

> - inconsistent with Mac/Windows

> - confusingly, selecting anything overwrites the clipboard

> - not efficient with a tool such as xclipboard [(tool that maintains a history of specifically CLIPBOARD; it would be messy to keep a history of all selections)]

> - you should be able to select text, then paste the clipboard over it, but that doesn’t work if the selection and clipboard are the same

> - the Copy menu item is useless and does nothing, which is confusing

> - if you think of PRIMARY as the current selection, Cut doesn’t make any sense since the selection simultaneously disappears and becomes the current selection

Re:PCs refuse to shut down after Microsoft patch by doubled112 on Saturday January 17, 2026 @07:06PM (#46663477)
The selection buffer is easier to understand if thought about more simply. Middle click to “put my selection here”.

The actual clipboard is a separate feature in my mind.

Re:PCs refuse to shut down after Microsoft patch by m132 on Saturday January 17, 2026 @04:22PM (#46662233)
Yup, both have their uses. If you use a clipboard manager or have the clipboard synchronized between devices/remote desktops/VMs, the primary selection comes in handy for stuff you don't exactly want saved to disk, crossing VM boundaries, or transmitted over the network. I use middle-click pasting primarily for its separate buffer.
Re:PCs refuse to shut down after Microsoft patch by garciansmith on Saturday January 17, 2026 @01:19PM (#46660454)
You can unify the middle mouse selection and the regular clipboard in KDE if you wish. Personally I find keeping them separate very convenient.
Re:PCs refuse to shut down after Microsoft patch by jolmg on Saturday January 17, 2026 @01:52PM (#46660780)
There are a number of DE-independent clipboard managers that can do that as well as other features, like keeping a clipboard history so you can copy in series then paste in series, or having keyboard shortcuts transform the clipboard contents by way of a command, so you can e.g. copy some multi-line text then paste it as a single line joined by spaces.
Re:PCs refuse to shut down after Microsoft patch by SoftTalker on Saturday January 17, 2026 @01:40PM (#46660648)
I use "autocutsel" to synchronize the cut buffer and clipboard in X. Not sure what Wayland might need to do this or if it even has a similar concept.

I love select to copy and middle-click to paste.

https://www.nongnu.org/autocutsel/

Re:PCs refuse to shut down after Microsoft patch by AdmiralAsshat on Saturday January 17, 2026 @02:44PM (#46661357)
Shift+Insert has always been my preferred method of pasting into a terminal after too many mishaps with right-click or middle-click paste.
Re:PCs refuse to shut down after Microsoft patch by marcosdumay on Saturday January 17, 2026 @01:07PM (#46660329)
GNOME is doing something right for a change and fixing a common source of security issues.

If you like it, just keep the behavior enabled.

Re:PCs refuse to shut down after Microsoft patch by DoctorOW on Saturday January 17, 2026 @01:11PM (#46660369)
Never in my life have I heard of this security issue.
Re:PCs refuse to shut down after Microsoft patch by monooso on Saturday January 17, 2026 @01:57PM (#46660831)
> GNOME dictates onto users what the developers think the users should use or have. I find that not acceptable.

Every operating system (or DE) does that. Hell, every piece of software does that. They're all just a bunch of opinions wrapped in a user interface.

Some may provide more opportunities to change the defaults, but those defaults still remain.

Re:PCs refuse to shut down after Microsoft patch by networkadmin on Saturday January 17, 2026 @05:33PM (#46662783)
Yes, but the problem is the GNOME organization is headed by opinionated morons with zero clue how to design a user interface.
Re:PCs refuse to shut down after Microsoft patch by monooso on Saturday January 17, 2026 @07:14PM (#46663528)
I rather like GNOME, which presumably also makes me a moron.

Or perhaps we're all just people with differing opinions on what constitutes a "good" user interface.

Re:PCs refuse to shut down after Microsoft patch by networkadmin on Sunday January 18, 2026 @08:24AM (#46667631)
There are people who like Windows too. I also consider them morons.
Re:PCs refuse to shut down after Microsoft patch by ranger_danger on Saturday January 17, 2026 @08:55PM (#46664080)
They're probably referring to gnome's history of controversial opinions that many users don't like, such as:

- "simplifying the UI" by removing many useful features (like systray icons)

- "what makes you think sharpness is a metric?"

- claiming fractional scaling is dumb because "monitors don't have fractional pixels"

- "we know what users want" while ignoring most user feedback

- "we're not copying mac OS" while blatantly doing so

- "consistency is key" then changes entire UI paradigm every release

- "what's the usecase for <insert well-known feature>?"

- intentionally obscuring how to access / in the file picker

And in general just being incredibly tone-deaf and abusive to their own users on the forums. Torvalds has been calling out their "users are idiots and are confused by functionality" stance for over 20 years now.

Re:PCs refuse to shut down after Microsoft patch by immibis on Saturday January 17, 2026 @02:33PM (#46661258)
This is like, the least bad thing GNOME have ever done. Middle-click pasting makes no logical sense and only exists as a holdover from before copy-paste conventions were established. Nobody would design it this way today.
Re:PCs refuse to shut down after Microsoft patch by immibis on Sunday January 18, 2026 @08:58AM (#46667840)
As typical, +3 points, then -4 when Americans come online. Any downvoters want to explain how middle click makes any sense to them?
Re:PCs refuse to shut down after Microsoft patch by ranger_danger on Sunday January 18, 2026 @11:01AM (#46668851)
I would say the issue itself is almost irrelevant... I think it's mainly your dogmatism. Speaking in absolutes as if you always know everything, that there can seemingly only be one right answer and there can be no other valid perspectives or opinions. To me it just screams low emotional intelligence and a lack of critical thinking, humility and empathy.

https://en.wikipedia.org/wiki/Splitting_(psychology)

Re:PCs refuse to shut down after Microsoft patch by immibis on Sunday January 18, 2026 @05:10PM (#46672667)
Sometimes facts are just true. Indeed this is quite often the case. Americans' inability to realize that explains a lot about their country right now. If you believe something I've said is untrue, then you should say why that is. If you can't say why it's untrue, maybe it's not untrue.
Re:PCs refuse to shut down after Microsoft patch by Gabrys1 on Saturday January 17, 2026 @11:54AM (#46659556)
defaults matter a lot!
Re:PCs refuse to shut down after Microsoft patch by hdgvhicv on Saturday January 17, 2026 @07:18PM (#46663557)
Developers change defaults all the time and make things far worse.

Vim 9.0 default changes required a 6 line vimrc to undo the damage.

Re:PCs refuse to shut down after Microsoft patch by tremon on Saturday January 17, 2026 @11:27PM (#46664776)
Yes, that's the primary reason that made me switch to neovim instead.
Re:PCs refuse to shut down after Microsoft patch by spookie on Saturday January 17, 2026 @11:33AM (#46659352)
GNOME devs really are special. I wonder why.
Re:PCs refuse to shut down after Microsoft patch by shevy-java on Saturday January 17, 2026 @11:57AM (#46659588)
It is not just GNOME devs. Try to interact with systemd-poettering or I-pwn-glibc-Drepper. For some reason the Red Hat centric guys are troublemakers.

More recently KDE devs also became troublemakers - first David "all must use systemd", then nate "I-can-ask-for-donations-at-will-by-placing-a-trojan-daemon-onto-people-whose-sole-job-is-to-ask-for-donations" (more about this guy here: https://jriddell.org/2025/09/14/adios-chicos-25-years-of-kde...) and of course the "there are no xorg-server users left on KDE, so all must use wayland". Developers became a LOT more like dictators in the last 10 years specifically. This was a change indeed. I am not sure what happened, but things changed. GTK is now also a pure GNOMEY dev-kit. Good luck trying to convince the GTK devs of anything that used to be possible in gtk2 or gtk3 - it is now GNOME only.

Re:PCs refuse to shut down after Microsoft patch by RicoElectrico on Saturday January 17, 2026 @12:34PM (#46660001)
I'm pretty scared what userland piece of software will be re-written while ditching backwards compatibility and making the current body of support knowledge worthless. After all, we've replaced the display server (sort of), audio, init and service management, network commands (netplan) if not much more.

My bet would be on a rewrite of CUPS in Rust. Oh, your printer that worked for 20 years is now a useless brick? What a shame, at least now the printing subsystem is secure and blazing fast.

Re:PCs refuse to shut down after Microsoft patch by steve1977 on Saturday January 17, 2026 @12:57PM (#46660220)
Not even Rust zealots want to touch printing ;)
Re:PCs refuse to shut down after Microsoft patch by networkadmin on Saturday January 17, 2026 @05:35PM (#46662795)
> My bet would be on a rewrite of CUPS in Rust.

Please, don't give them any ideas.

Re:PCs refuse to shut down after Microsoft patch by shakna on Saturday January 17, 2026 @06:34PM (#46663232)
Well, as Apple has basically abandoned CUPS, and not everyone uses the OpenPrinting fork, things in that space are getting "fun".
Re:PCs refuse to shut down after Microsoft patch by eagle2com on Sunday January 18, 2026 @05:01AM (#46666418)
Please, printers have never worked, it's a side effect when they do.
Re:PCs refuse to shut down after Microsoft patch by kombine on Saturday January 17, 2026 @03:31PM (#46661753)
https://pointieststick.com/2025/03/10/personal-and-professio... for the sake of completeness here's Nate Graham version of events.
Re:PCs refuse to shut down after Microsoft patch by esafak on Saturday January 17, 2026 @09:25AM (#46658311)
PC mice haven't had three buttons for decades!
Re:PCs refuse to shut down after Microsoft patch by j1elo on Saturday January 17, 2026 @09:33AM (#46658362)
Third button has been "hidden" below the mouse wheel for well more than those 10 years, just press the wheel down and you'll hear a mouse button click.
Re:PCs refuse to shut down after Microsoft patch by ffsm8 on Saturday January 17, 2026 @10:36AM (#46658868)
You'll be surprised to know that there are still some mice that don't support that. Admittedly, I've only had that happen once in the last 15 yrs in a budget "gamer" mouse I instantly returned and replaced with a Logitech g903 at the time (though I've switched mice twice since, and both supported it)
Re:PCs refuse to shut down after Microsoft patch by wafflemaker on Saturday January 17, 2026 @10:57AM (#46659015)
And most Linuxes have option for dual click (right and left mouse button) to simulate middle mouse button.

Useful, as the wheel button is usually first to die in cheap mice.

Not useful, because it made it impossible to play Death Stranding on Linux :(

Re:PCs refuse to shut down after Microsoft patch by olyjohn on Saturday January 17, 2026 @10:01AM (#46658577)
Ironically, Microsoft pioneered the scroll wheel.
Re:PCs refuse to shut down after Microsoft patch by shlip on Saturday January 17, 2026 @12:22PM (#46659827)
popularized, not pioneered.
Re:PCs refuse to shut down after Microsoft patch by olyjohn on Sunday January 18, 2026 @10:03PM (#46674618)
Re:PCs refuse to shut down after Microsoft patch by tremon on Saturday January 17, 2026 @10:22AM (#46658743)
Remember Xerox PARC, the people that developed the first computer GUI?

https://archive.is/sKLL

> The three button Alto mouse enabled the first bitmapped and overlapping windows display, known as a graphical user interface (GUI). The Alto dates to March of 1973

Re:PCs refuse to shut down after Microsoft patch by bigstrat2003 on Saturday January 17, 2026 @01:48PM (#46660729)
My dude, my mouse has 5 buttons. No idea what you're talking about here.
Re:PCs refuse to shut down after Microsoft patch by esafak on Saturday January 17, 2026 @01:59PM (#46660855)
I'm down to one. Less is more.
Re:PCs refuse to shut down after Microsoft patch by SturgeonsLaw on Saturday January 17, 2026 @06:19PM (#46663136)
Is that one of those innovative designs with the charging port on the bottom of the mouse?

Sometimes more is more.

Re:PCs refuse to shut down after Microsoft patch by esafak on Saturday January 17, 2026 @08:04PM (#46663803)
It sounds dumb but the battery lasts long and charges quickly, so I think they made the right decision.
Re:PCs refuse to shut down after Microsoft patch by leptons on Saturday January 17, 2026 @01:45PM (#46660693)
They already did that by forcing "AI" into the OS.
Re:PCs refuse to shut down after Microsoft patch by sandworm101 on Saturday January 17, 2026 @09:25AM (#46658307)
Because all of Microsoft's people secretly use linux on thier machines.

(No joke. This is a thing. It means when something goes catastrophically wrong with windows, the people in position to fix the problem will still be able to function.)

Re:PCs refuse to shut down after Microsoft patch by steve1977 on Saturday January 17, 2026 @10:14AM (#46658680)
Yeah, sure this is a thing. All of Microsoft's people secretly use Linux...
Re:PCs refuse to shut down after Microsoft patch by cyanydeez on Saturday January 17, 2026 @11:20AM (#46659239)
That and forced LLM adoption means they solve problems in text.
Re:PCs refuse to shut down after Microsoft patch by Bender on Saturday January 17, 2026 @12:56PM (#46660209)
I can't really add to that one but I do know that many at Cisco turn old Cisco gear into Linux workstations.
Re:PCs refuse to shut down after Microsoft patch by bigfatkitten on Sunday January 18, 2026 @04:37AM (#46666296)
IOS-XE runs Linux underneath.
Re:PCs refuse to shut down after Microsoft patch by potatowaffle on Saturday January 17, 2026 @01:51PM (#46660763)
When one of the senior executives from Bing Search visited my university for a talk, they personally told the director of the computer science department that they envied the fact that the director could use a 27-inch iMac at work, whereas they could only use one at home.
Re:PCs refuse to shut down after Microsoft patch by sandworm101 on Saturday January 17, 2026 @06:16PM (#46663112)
The head of bing search is not ever going to be in position to issue an emergency patch for windows. They are far more likely to cause such a situation than resolve one.
Re:PCs refuse to shut down after Microsoft patch by matltc on Saturday January 17, 2026 @04:51PM (#46662470)
The one dev I know at Microsoft runs WSL2
Re:PCs refuse to shut down after Microsoft patch by itopaloglu83 on Saturday January 17, 2026 @02:07PM (#46660958)
They’re at the last step of their enshittification process, where the focus is to extract money from everyone, not to ship a good product or fix things.
Re:PCs refuse to shut down after Microsoft patch by wang_li on Saturday January 17, 2026 @05:10PM (#46662606)
CI/CD baby! Deliver early, deliver often, fix it later.
Re:PCs refuse to shut down after Microsoft patch by loloquwowndueo on Saturday January 17, 2026 @08:25AM (#46657883)
You can always just pull the power cord too, or long-press the power button on a laptop.
Re:PCs refuse to shut down after Microsoft patch by dylan604 on Saturday January 17, 2026 @11:48AM (#46659496)
Don't PSUs have a physical rocker switch for on/off?
Re:PCs refuse to shut down after Microsoft patch by seabrookmx on Saturday January 17, 2026 @12:21PM (#46659815)
Most but not all.
Re:PCs refuse to shut down after Microsoft patch by SoftTalker on Saturday January 17, 2026 @01:44PM (#46660689)
Pulling the power cord on a laptop won't shut it down, it will just start using the battery.

Some desktop PCs have a physical power switch on the power supply, usually next to where the power cord plugs in. But it is becoming more rare. Every $0.50 they can save in costs is added to the bottom line.

Re:PCs refuse to shut down after Microsoft patch by lousken on Saturday January 17, 2026 @02:03PM (#46660911)
Never ever seen a power supply without a switch in my entire life and looking at eshops here in europe i cant find it either. Even the $30 have that

Also try pressing power button for 5-10 seconds on a laptop instead

Re:PCs refuse to shut down after Microsoft patch by SoftTalker on Saturday January 17, 2026 @04:35PM (#46662356)
Maybe EU requires it? Most (all?) newer Dell desktops here have only the "soft" pushbutton power switch on the front of the case. Of course you can just pull out the power cord itself.
Re:PCs refuse to shut down after Microsoft patch by opan on Saturday January 17, 2026 @08:33AM (#46657938)
>the argument used to be you used Windows instead of Linux because on Linux you might occasionally have to use the scary terminal to fix an issue

This always annoys me because you're really handicapping yourself by ignoring the CLI on any OS. Sure I use it more heavily on GNU/Linux than I did on Windows as a kid, but that's because it's so good. If I'm ever in front of a Windows machine now I still like to have a terminal handy (and it's even better/more-familiar on macOS, of course), and I've learned things like "type is like cat", "robocopy is like rsync", "tasklist is kinda like ps and taskkill like kill/pkill" which help me to do things better on Windows than when I used it fulltime. I'm glad Microsoft invested more in the CLI with Windows Terminal, OpenSSH in the default install, winget, PowerShell, etc. I think it's better for everyone. I fear the CLI hate is spreading anti-intellectualism. Some people seem annoyed when they even have to use their keyboard instead of their mouse for something.

Re:PCs refuse to shut down after Microsoft patch by ndsipa_pomu on Saturday January 17, 2026 @01:41PM (#46660653)
GUIs are great for when you're new to a bit of software as you can see the various options and get a feel for the possibilities. CLIs are nearly always more flexible once you've read the man page, but is a steeper learning path.

Automation/scripting is when CLIs really come into their own as otherwise you end up becoming a GUI click monkey. The best is when there's both a GUI and CLI (as long as they work the same way).

Re:PCs refuse to shut down after Microsoft patch by graemep on Saturday January 17, 2026 @02:24PM (#46661163)
I wonder how good CLIs could have been if a fraction of the resources that have gone into GUIs had gone into making CLIs more user friendly. A sequence of words is a pretty natural way of conveying what you want done.
Re:PCs refuse to shut down after Microsoft patch by kingstnap on Saturday January 17, 2026 @04:30PM (#46662302)
The problem with CLI isn't typing, its discoverability. Keep in mind conveying what you want done requires knowing what can be done first.
Re:PCs refuse to shut down after Microsoft patch by graemep on Sunday January 18, 2026 @07:31AM (#46667310)
That is exactly the sort of thing I think could have been improved. We have very little at the moment - autocomplete and some help.
Re:PCs refuse to shut down after Microsoft patch by ndsipa_pomu on Sunday January 18, 2026 @07:44AM (#46667388)
Along with the "-h,--help" options, an option to show common usage examples would be useful. I find it much easier to learn from an example as you can modify and build upon it. Otherwise, it's a case of skimming through the man page and then switching back and forth between the man page and the command that I'm writing. (This is most common with tools that I don't use all the time, yet have expert features such as "ffmpeg")
Re:PCs refuse to shut down after Microsoft patch by 1718627440 on Sunday January 18, 2026 @10:11AM (#46668411)
> an option to show common usage examples would be useful.

That's what the man page is supposed to be (and most do contain example) and why GNU wanted to split it into info (tutorials and exhausting documentation) and man (reference and examples).

Re:PCs refuse to shut down after Microsoft patch by ndsipa_pomu on Sunday January 18, 2026 @12:58PM (#46670230)
Yep, the examples on man pages are helpful, but I'd like a slimmed down option to just show the examples and a one-line description for the examples.

I usually end up just doing a quick web search for the command if it's not one that I'm familiar with (i.e. where I have read the man page).

An extreme example of my issue would be trying to find BASH examples of how to process a list of files - the man page on BASH is fairly lengthy.

Meanwhile, Greg's wiki provides this example of processing mp3 files:

  while IFS= LC_ALL=C read -r -d '' file; do
    some command "$file"
  done < <(find . -type f -name '*.mp3' -print0)
Re:PCs refuse to shut down after Microsoft patch by 1718627440 on Sunday January 18, 2026 @04:08PM (#46672171)
Why do you serialize and then deserialize the list of files? Even if you do disable the splitting on reparsing the list, why don't you just do this:

    find . -type f -name '*.mp3' -exec some command "'{}'" ';'
That sounds just unnecessary and bug prune. Unless you target some odd platform where find doesn't support '-exec', but it is even in POSIX. I think due to your use of process substitution, your code has a higher chance of being unportable, so why do you want to complicate your code?

Stuff like that is why I personally prefer the man pages to random websites.

Honestly for something as complex as a shell (which describes both a language, an editor, and an implementation) the man page is surprisingly short. (6418 lines for me) I have just found the section on process substitution in <1min, without even using the search, just by reading. I looked it up, because I didn't knew the name of that syntax, so I needed to actually look for what I wanted and I do not use the man page of bash often.

Re:PCs refuse to shut down after Microsoft patch by ndsipa_pomu on Sunday January 18, 2026 @04:34PM (#46672360)
It's to deal with problematic filenames (e.g. containing a newline) and enables setting of variables within the current process. Putting multiple commands into the "-exec" of find is possible, but looks horrible. To be fair, my example didn't use multiple commands, so your version is okay for simple processing.

Don't get me wrong, the BASH man page is great, it's just that I prefer to work with examples.

For reference, here's the Greg's Wiki explanation: https://mywiki.wooledge.org/BashPitfalls#for_f_in_.24.28ls_....

Re:PCs refuse to shut down after Microsoft patch by 1718627440 on Sunday January 18, 2026 @04:44PM (#46672455)
On my computer

    touch "$(echo -en 'a\nb')"
    find . -type f -name '*.mp3' -exec bash -c "echo '{}'; ls '{}'" ';'
works just fine, but maybe it doesn't work everywhere.

If you don't like how the multiple commands look like, you can always write it like this:

    find . -type f -name '*.mp3' -exec bash -c "
        echo '{}'
        ls '{}'
    " ';'
Re:PCs refuse to shut down after Microsoft patch by ndsipa_pomu on Sunday January 18, 2026 @05:47PM (#46672963)
Yep, you can chain multiple commands with find's "-exec", but I'm not a fan of it myself. I suspect setting variables in the current process is trickier though.

(Very minor nitpick, it should be 'a\nb.mp3' to be included, but that does work fine)

Incidentally, ShellCheck isn't happy with that although I don't follow their reasoning:

  find . -type f -name '*.mp3' -exec bash -c "
                                           ^-- SC2156 (warning): Injecting filenames is fragile and insecure. Use parameters.
https://www.shellcheck.net/wiki/SC2156
Re:PCs refuse to shut down after Microsoft patch by 1718627440 on Monday January 19, 2026 @04:09AM (#46676628)
> although I don't follow their reasoning

I think it is sound. Imagine what happens when the filename contains:

    ' && shutdown now && '.mp3
Re:PCs refuse to shut down after Microsoft patch by ndsipa_pomu on Monday January 19, 2026 @09:55AM (#46679676)
Of course that makes sense now.

Anyhow here's an example of how I would use the while loop and process substitution in a BASH script:

  declare -i file_count=0
  while IFS= LC_ALL=C read -r -d '' file; do
    file_count+=1
    printf "file: %s\n"  "${file}"
  done < <(find . -type f -name '*.mp3' -print0)
  printf "Processed %d files\n" "${file_count}"
I think that'd be tricky to do using just a find/-exec command.
Re:PCs refuse to shut down after Microsoft patch by 1718627440 on Monday January 19, 2026 @10:23AM (#46679998)
I see, but now you are essentially operating on multiple files, at once, so the serialization makes some sense. Although for just this, I wouldn't write the operation in bash at all:

    find . -type f -name '*.mp3' | wc -l
Honestly I don't really view the shell / filesystem interface as a security boundary. I use the shell mainly for (automation of) interactive use, so any screwup due to e.g. quoting issues is my own fault, maybe even of using stupid filenames. Shell is a great language to connect streams of different programs into each other, not so much for doing any work. If I do that, I would reach for C.
Re:PCs refuse to shut down after Microsoft patch by ndsipa_pomu on Monday January 19, 2026 @11:18AM (#46680705)
The serialisation is just to work around the fact that filenames can have any character except for \0 which is why the "-print0" is used. It doesn't by itself allow for concurrent processing.

You're right about just using "wc -l", but I was just trying to demonstrate how you can set variables. A real use would be doing more than just counting files as your example would likely be quicker (assuming that calling an external programme is quicker than running a naive loop in BASH).

I am guilty of using BASH for stuff that most people would use a different language for - I just find that for system admin work that BASH is just at the right level of abstraction for me and is ubiquitous.

Re:PCs refuse to shut down after Microsoft patch by 1718627440 on Sunday January 18, 2026 @10:12AM (#46668418)
I often get my way through unknown CLI commands by just typing TAB and selecting the option that sounds like what I want. Works, most of the time, I don't think that is really an issue. For most CLI programs you also have a reference/cheat sheet, examples and an interactive hypertext systems of tutorials available.
Re:PCs refuse to shut down after Microsoft patch by shiroiuma on Monday January 19, 2026 @03:05AM (#46676137)
Many GUI designers these days don't like discoverability and don't think it's important. They prefer to hide everything behind "gestures" that you just have to know somehow.
Re:PCs refuse to shut down after Microsoft patch by whatevaa on Saturday January 17, 2026 @02:39PM (#46661306)
If CLIs functioned as LLM and you could talk freely with it, there would be no problem. In reality, CLIs are inconsistent and basically function as robotic interfaces, a lot of them not that far of programming.
Re:PCs refuse to shut down after Microsoft patch by socialcommenter on Saturday January 17, 2026 @02:58PM (#46661462)
> If CLIs functioned as LLM and you could talk freely with it, there would be no problem.

On face value, I find this suggestion hilarious. People are having sandboxing issues left, right and center with AI agents and MCPs, so clearly there would be enormous problems with giving an LLM full unscoped terminal access. Remember the guy who had his hard drive wiped?

Do you just mean that the ABIs are inconsistent and you want a more unified way to specify what you want (but the user still more-or-less spells out what command will be invoked)? I have some sympathy for that concern, yes.

Re:PCs refuse to shut down after Microsoft patch by autoexec on Saturday January 17, 2026 @05:11PM (#46662612)
If CLIs functioned as LLM and you could talk freely with it, it would kiss your ass while it hallucinates about the files on your hard drives, invent command line switches that either don't do anything or does something other than what you want, and every command that used to take just 5-10 characters would now require you to type paragraphs. No thank you.
Re:PCs refuse to shut down after Microsoft patch by pmontra on Saturday January 17, 2026 @09:17AM (#46658251)
I understand the sarcasm but copy pasting a bash or powershell command is faster and less error prone than following the instructions to open menus, dialogs, tabs and clicking buttons, especially in deeply nested UIs.
Re:PCs refuse to shut down after Microsoft patch by g947o on Saturday January 17, 2026 @11:25AM (#46659282)
I don't see how a command line tool with 10 different flags is necessarily less "error prone" than UI. In fact, I have used many tools where a flag is confusing or has conflicts with another flag in an unexpected way, not to mention subtle issues like escaping.
Re:PCs refuse to shut down after Microsoft patch by badc0ffee on Saturday January 17, 2026 @12:09PM (#46659703)
I once had to pass along to the support team a command for one of our customers to run. It ultimately didn't work because someone along the chain A) autocorrected the spelling of the command name, B) converted the quotation marks to fancy “”, and C) converted the hyphen into some fancy dash.
Re:PCs refuse to shut down after Microsoft patch by shevy-java on Saturday January 17, 2026 @11:58AM (#46659602)
It is easier to copy/paste. If the GUI has more than one step people might be confused. Also some GUIs are hard to see or read for people with vision handicaps.
Re:PCs refuse to shut down after Microsoft patch by matltc on Saturday January 17, 2026 @04:53PM (#46662488)
`find` has entered the chat
Re:PCs refuse to shut down after Microsoft patch by einsteinx2 on Saturday January 17, 2026 @09:20AM (#46658275)
You’re preaching to the choir, I’m a heavy terminal user and I agree completely.
Re:PCs refuse to shut down after Microsoft patch by hojofpodge on Saturday January 17, 2026 @10:05AM (#46658604)
I think you are being premature, I'll wait until HN updates the site and someone posts their counter point in dance notation before deciding which medium supports actions that are easiest to communicate about.
Re:PCs refuse to shut down after Microsoft patch by lousken on Saturday January 17, 2026 @09:57AM (#46658558)
Year of the linux desktop

Year of the windows cli

Re:PCs refuse to shut down after Microsoft patch by steve1977 on Saturday January 17, 2026 @10:01AM (#46658580)
Windows always had a command line. I remember I used to do remote stuff via CLI even back on NT 4.0
Re:PCs refuse to shut down after Microsoft patch by nubinetwork on Saturday January 17, 2026 @10:10AM (#46658643)
Except its not a hard power off, it only tells windows to shut down... I've seen instances of windows hanging on both startup and shutdown, leaving me no other option but to hard power off the machine (because nobody uses a reset button anymore).
Re:PCs refuse to shut down after Microsoft patch by dylan604 on Saturday January 17, 2026 @11:49AM (#46659503)
Does this bring the old Halt and Catch Fire command back as an option?
Re:PCs refuse to shut down after Microsoft patch by socialcommenter on Saturday January 17, 2026 @03:07PM (#46661541)
Can this be pasted into Win+R? That might give a novice user more confidence; pasting a short command that literally says "shutdown" into a small, easily identified text dialog box seems clear enough.

Small added benefit, presumably it's harder to accidentally run a multi-line multi-stage command because you had the wrong thing in your clipboard (I don't have my windows PC handy, but if you paste multiple lines into Win+R it doesn't execute anything, correct?)

Re:PCs refuse to shut down after Microsoft patch by apublicfrog on Saturday January 17, 2026 @03:26PM (#46661692)
Yes. This is how I've been shutting down windows PCs for decades, as I don't want to use a mouse and start menu positioning varies:

Windows + R

(type) shutdown /s /t 0

Enter

The /t is a time flag and you can abort scheduled shutdowns with the /a flag. Handy if you know your Windows machine will be finished with a task in 10 or so minutes but you need to leave - just set a timer for 1800 seconds and Kazaa will be done with its download ;).

Re:PCs refuse to shut down after Microsoft patch by socialcommenter on Saturday January 17, 2026 @03:30PM (#46661750)
I use it in command prompt semi-regularly, for some reason never thought to use Win+R to run it...
Re:PCs refuse to shut down after Microsoft patch by 1718627440 on Sunday January 18, 2026 @10:03AM (#46668327)
> Handy if you know your Windows machine will be finished with a task in 10 or so minutes but you need to leave

That might maybe work most times, but when your network speed suddenly changes or the downloads is aborted it fails. Far better is just telling your computer that you want it to shutdown after the download finished:

    wget ... && shutdown now
Should also work on MS Windows, IE used to be able to be told to exit once the download finishes, not sure how the situation looks like now.
Re:PCs refuse to shut down after Microsoft patch by apublicfrog on Sunday January 18, 2026 @03:10PM (#46671656)
Agreed, but I've found Windows to be relatively finicky with the shutdown command, with some OS versions being fine with that and some not. Additionally, on Windows often the action needed is a GUI program with no simple way to post-hook or provide an output a CLI can easily ready.

As such I usually set my timer 3x what it needs to be (e.g 1800 for a 10 minute) and it's always had a high chance of working.

Re:PCs refuse to shut down after Microsoft patch by 1970-01-01 on Saturday January 17, 2026 @07:07PM (#46663482)
Alt+F4 on the desktop does the same thing, but does it with a neat UI. No scary CLI needed.

Edit - it's Alt+F4.

Re:PCs refuse to shut down after Microsoft patch by mminer237 on Saturday January 17, 2026 @11:36PM (#46664816)
I think this is an exception that proves the rule.

The average Windows user literally has no concept of a terminal. The average Linux user does indeed have to copy and paste terminal commands off the internet to fix issues or do seemingly ordinary customization frequently.

Re:PCs refuse to shut down after Microsoft patch by throwa356262 on Sunday January 18, 2026 @03:54AM (#46666064)
This is not new. Operating a windows machine has always included a bunch of magical commands. It's just that it has usually been in the registery. The cmd and powershell stuff is kind of a new direction.

Regarding Linux, I dont think most people need command line for normal work. Obviously the guy that runs an obscure dist in RAID-6 on his toaster would be different, but for most normal people just install Ubuntu and use it.