The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Mac OS X / OS X / MacOS’ Category

Unix/MacOS: “rm: illegal option — b” or how to remove files that have their name starting with a minus sign.

Posted by jpluimers on 2026/03/11

I had to remove all text files including a -bar.txt from the current directory using bash, so I automatically typed rm *txt resulting in this nice error:

rm: illegal option -- b
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file

When there was just a file named -foo.txt in the directory, the error became more interesting:

rm: illegal option -- o
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file

Then it struck me: rm is one of those old tools where you can smack all options together. Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, bash, Mac OS X / OS X / MacOS, Power User | Leave a Comment »

MacOS and Windows: sorting – Simple to enter Unicode character that would sort after Z in most cases? – Stack Overflow

Posted by jpluimers on 2026/03/10

TL;DR: There is no simple character that works on both MacOS and Windows.

[Wayback/Archive] sorting – Simple to enter Unicode character that would sort after Z in most cases? – Stack Overflow (thanks [Wayback/Archive] sorin and [Wayback/Archive] degenerate):

A

On Windows, none of these options work because they all sort before A.

A solution I ended up using is an Arabic character:

ٴ This folder comes after z in windows

Source

According to [Wayback/Archive] What Unicode character is this ?, the above mentioned character is U+0674 : ARABIC LETTER HIGH HAMZA.

Note that on Windows the ٴ character displays at the start of the filename, but on MacOS in Finder it ends up behind the extension (as Arabic script is right-to-left) and is very hard to remove. On the MacOS Terminal it ends up on the left and is easy to modify.

Read the rest of this entry »

Posted in Apple, Encoding, Mac OS X / OS X / MacOS, Power User, Unicode, Windows | Leave a Comment »

Generating random strings for passwords and uuids/guids on both Windows and Linux using base64 and hex encoding, plus: “Hive Systems: Are Your Passwords in the Green?”

Posted by jpluimers on 2026/02/25

Often I need to generate passwords or uuids (on some systems called guids). I usually try to do that in a relatively platform agnostic way as I use MacOS, Windows and Linux in various mixes for many reasons (for instance that I have had developed quite hefty RSI in the early 1990s of the and the best keyboard/pointing-device combination for is the MacBook built in keyboard/touchpad combination so basically MacBooks are my window to all other operating systems).

Generating randomly with a good random number generator them makes sense as for most usage, it is important that both passwords and uuids are hard to guess which means having an entropy that is as high as possible.

A cool thing about OpenSSL is that:

  1. most of not all systems have it installed (it was no coincidence I published Installing OpenSSL on Windows a few days ago)
  2. it has a very good pseudo-random number generator and as of [Wayback/Archive] OpenSSL version 1.1.1 first released in 2018 has solved the problem around [Wayback/Archive] Random fork-safety – OpenSSLWiki, see [Wayback/Archive] Our Review of the OpenSSL 1.1.1 Random Number Generation Update – OSTIF.org.
  3. it supports various useful output formats hex (hexadecimal) and base64 (next to the default of octet – or by today’s naming convention byte – output)

The easiest to generate are passwords. Yes I know that password managers can do this too, but there are some systems I cannot use them on or sync between them (don’t you love the corporate world) so my aim is to use a random password generator in a platform agnostic way which usage is easy to remember. Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, base64, bash, bash, Batch-Files, Conference Topics, Conferences, Development, Encoding, Event, HEX encoding, Mac, Mac OS X / OS X / MacOS, MacBook, OpenSSL, Power User, Python, Scripting, Software Development, Windows | Leave a Comment »

GitHub – glotlabs/gdrive: Google Drive CLI Client

Posted by jpluimers on 2026/02/13

On my list of tools to play around with: [Wayback/Archive] GitHub – glotlabs/gdrive: Google Drive CLI Client

With a warning though from the documentation (emphasis mine):

Gdrive saves your account credentials and tokens under $HOME/.config/gdrive3/. You don’t usually need to use these files directly, but if someone gets access to them, they will also be able to access your Google Drive. Keep them safe.

and from the gdrive2 prior version more elaborate documentation [Wayback/Archive] GitHub – prasmussen/gdrive: Google Drive CLI Client:

Read the rest of this entry »

Posted in Apple, Console (command prompt window), Google, GoogleDrive, Mac OS X / OS X / MacOS, Power User, Terminal | Leave a Comment »

Naming Files and Directories the Right Way – YouTube

Posted by jpluimers on 2026/01/29

I totally agree with the first comment of [Wayback/Archive] Naming Files and Directories the Right Way – YouTube as it holds not just for file management, but for naming anything including software development:

I’ve watched many videos on file management, but this one explains naming very clearly.
  1. 0:31 Rule 1: No Spaces
  2. 2:40 Rule 2: Avoid Special Characters
  3. 3:43 Rule 3: Be Descriptively Concise
  4. 4:24 Rule 4: Case Sensitivity
  5. 5:00 Rule 5: Dates and Sorting
  6. 6:40 Rule 6: Be Consistent!

--jeroen

Posted in *nix, Apple, BSD, Development, Linux, Mac OS X / OS X / MacOS, Power User, Software Development, Windows | Leave a Comment »

How can I tell what wattage my MacBook Pro… – Apple Community

Posted by jpluimers on 2026/01/19

This still works for Apple Silicon based Macs: [Wayback/Archive] How can I tell what wattage my MacBook Pr… – Apple Community

TL;DR:

  1. Either:
    • ⌘-space -> System Information.app
    •  menu -> About This Mac -> More Info… -> System Report…

    Note that “System Report…” starts the “System Information.app” (how cool would naming consistency be…)

  2. Hardware -> Power
  3. Browse down to “AC Charger Information”

On my M1 MacBook Pro, the values depend on the charging ports used:

Read the rest of this entry »

Posted in Apple, M1 Mac, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook-Pro, Power User | Leave a Comment »

How to Do a UDP Ping in Linux

Posted by jpluimers on 2026/01/07

Often connections are TCP based, but sometimes UDP is all you have to test with, so I was quite surprised that testing that was quite forward. The solutions by [Wayback/Archive] How to Do a UDP Ping in Linux works on any platform where you can have nmap or netcat on installed (which by now is almost all platforms including Windows):

Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, BSD, Mac OS X / OS X / MacOS, netcat, nmap, Power User, Windows | Leave a Comment »

MacOS (at least 2023 and younger): solution for (TrueType) fonts added through MacOS built-in Font Book not showing up in Pages or Preview

Posted by jpluimers on 2026/01/05

It took me a few queries to find the correct online solution for this problem: after adding a TrueType (and it’s extension: OpenType) font using the built-in MacOS Font Book, they do not show up in Pages or Preview, not even after validating the fonts in Font Book.

Solutions:

  1. reboot (found this out myself)
  2. killing the fontd font daemon from the Activity Monitor
  3. restart font daemon (found out via the link below)
    launchctl kickstart -k gui/`id -u`/com.apple.xtyped

The last one does not work on my Apple Silicon machine, the first two work fine.

For Preview, you have to Force Quit it then start it (so it re-opens all the previous files) to take effect.

I needed this, because I

Read the rest of this entry »

Posted in Apple, Barcode, Development, Font, KIX, Lucida Console, Mac, Mac OS X / OS X / MacOS, macOS 13 Ventura, macOS 14 Sonoma, Power User, RM4SCC, Software Development | Leave a Comment »

See a List of All Wi-Fi Networks a Mac Has Previously Connected To

Posted by jpluimers on 2025/12/24

[Wayback/Archive] See a List of All Wi-Fi Networks a Mac Has Previously Connected To

n modern versions of Mac OS, like macOS Mojave, Catalina, Sierra, OS X El Capitan, and Yosemite, you can shorten the syntax considerably as so:
defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences |grep SSIDString
In prior versions of Mac OS X, you can opt for the same as the above command, or use the lengthier string below with heavy regex:

Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, bash, bash, Development, Mac, Mac OS X / OS X / MacOS, MacBook, Power User, Scripting, Software Development | Leave a Comment »

What is the best free PDF Editor for Mac?… – Apple Community

Posted by jpluimers on 2025/11/24

Need to check this out:

Query: [Wayback/Archive] pdf editor macos – Google Search

--jeroen

Posted in Apple, Apple Silicon, M1 Mac, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook-Pro, Power User | Leave a Comment »