Posted on

Finder Empty Bin Fail: The Infinite Hardlinks Permobug

Recently, a situation has developed on my computer involving trash items that I can never delete. It’s a permanent condition, hence why I made this elaborate video and blog about it. In the process I discovered a bug in Automator, namely that it can not help to automate emptying the trash! That is a fairly bad look considering these are apps at the core of the macOS: Finder and Automator.

A million folders that will not die now live forever in my Trashcan… 🥶

357 folders inside folders in my Trash!

So I wrote a script that would rsync (backup) an enormous folder with images (~6 GB of renders for AminoSee DNA Viewer) on my disk to another location on my disk (same disk, the internal PCIe storage on my MacBook).

I used the rsync with hard links, this would create two exact copies of the 6 GB folder:

rsync –archive –verbose –stats –hard-links /Users/tom/AminoSee_webroot/output/ /Users/tom/Dropbox/Sites/

I would then go and delete half the images from the website copy (so as not to upload them), but keep the full archive to make network syncs faster. Prior to this I was continuously deleting around 3 GB of images and then re-syncing them across a network, so to be more efficient, and cut back on network and disk thrashing, I keep a full copy local, and run the “sync and delete” locally with hard links.

This also cuts down on my laptop disk thrashing: I do still occasionally sync and blow away the very same 3 GB of images every few days, but to re-create is very fast if I am using this.

Recursive Folders Inside Folders

Prior to getting this setup perfect I made a botch by point rsync and telling it to copy the parent into the child infinitely. Finder can’t clear it, and Automator can’t automator the mouse clicks:



Posted on

Clipboard Not Working on macOS 10.14

So I tried to used RightQR for the first time since “upgrading” to macOS 10.14 after holding out for so long. The clipboard does not work. This is a mission critical failure as there is no other method to extract the scan data:

clipboard failure macos 10.14

After a reboot I will post a bug at bug at if it still isn’t going. Hopefully my computer will behave.

I also do not like some changes to the way the keyboard input works. Especially regarding the combo: Command-option-control-Equals and Command-option with -=  (magnifier). It interferes with the app “Spectacle” which I use to organise my windows. Dark mode is freaking awesome though. And I find that Finder and Activity Monitor crash much more on Mojave, with more reboots and logout/ins.

It’s no biggy but I there is a subtle difference depending on the exact order the keys go down on the board and I find it annoying to think to do it the right way (all at once fast not progressively).

PS bring back the 3.5mm” jack.

Bug report:

After copying to clipboard scan data from Right QR ( Version 1.2 (1.2) Copyright © 2012-2013 Ripe Apps Inc. All rights reserved. Last modified: 1 August 2017 at 10:09 PM ) I am unable to paste.

Pasting causes no text to appear.

I can see successful copy pastings of text content in CopyClip (v 1.9.2 2019) so I know other apps can still copy paste text! Perhaps CopyClip is interfering, as I do not recall running it under 10.13 (I may have done but that app mod date is 7/7/2019 which I reckon was after I installed Mojave). Potentially I should troubleshoot out that variable but I do not feel this is something I should have to do, and the clipboard is super important so i don’t wantApple ruining the OS in coming releases, something I feel is highly likely with the announcement of dropping support for x86 32 bit binaries (why?).


Posted on

List running apps by process name only in macOS

After years of searching, I finally just wrote my own expression to show all running processes with just the names that I can feed to killall say to exit.

The command:

ps axc | sed “s/.*:….. /\”/” | sed s/$/\”/

The output:




Posted on

Dear Apple, Please Sort These Issues Out (Error -43, can’t search 1.m4a, 3 Letter File Extensions Not Showing)

When I saw “Well that was bug, but now here is a bug”, I’m trying to demonstrate an intermittent bug if Mac OS X that does actually rare it’s head later in the clip! Amazing. It’s search box bug I think, I’d have to watch again to be sure, and well, aint nobody got time for that. This video is supposed to SAVE me time but getting Apple to fix these not take more of it, hehe.

I’ve been trying to de-dupe my iTunes Library for quite some time now… a few years. Getting mighty sick of it so decided to take matters into my own hands (I’m gonna select all delete the entire thing), but before I do that I am doing “due diligence” on it.

Here is an “open letter” that I wrote to apple about it and filed and official report on it:
27839923 ::: Finder unable to search for 1.m4a and also ” 1.m4a” in regular internal HFS disk
– Stupid Finder features going bad
– Unable to search for something like “1.m4a”
– iTunes whacking out making dupes although I admit my problem was initially created on Windows (my iTunes library has had a long life)
– I’ve done a meta data update to this album ( putting icons on the songs and making the files better for the digital re-launch tonite.
– Error -43 (at 4:28) “The operation can’t be completed because one or more items can’t be found.” #error43 #error-43 #error_43
– Filenames not showing in spotlight search. As in “Do a search for 1.m4a and get 903 results…. the take a look at the filenames and not see the extensions, nor the 1.m4a that show how generated. (7:35)

Posted on

Compare Two Text Files Using OpenDiff macOS

Right-click to open in FileMerge / OpenDiff

This Automator Service will give you a context menu in Finder, so you can compare two selected text files in opendiff.

Download macOS Service: OpenDiff.workflow

To install this needs to either be double-clicked on (it will then disappear) or to be placed manually in:


To open this folder in Finder choose [shift][command][G] from the finder and paste the path above.

This is handy to show the difference between two files, with graphical guides to show where the differences in the files exist.

Right click to compare by opening in OpenDiff


You will need opendiff to run at the Terminal Window. Install XCode or the “command line tools” to get this.

Posted on

netstat macos Show Listening Ports TCP Sockets with Grep

If you’re looking to list open network ports the Mac equivalent to the linux command netstat -Walntpc might be what you’re after. You are not alone, I get about 6,000 unique visitors per year here!

Realtime list of all open connections and listening sockets:

watch netstat -Walnt
(No DNS much faster)
watch netstat -Walt
(with DNS lookups)

The beauty of this command is that it gets you past that over long list of (non-internet surely?) unix sockets and kexts, why Apple put this into netstat I have no idea, perhaps the blame is with Darwin BSD kernel. But it should be more like Linux netstat in my opinion! That’s because I can even see the process names and get continuous updates my adding pc with

Pipe netstat Into Grep To Remove Junk From The End

Listening socket / server processes ports macOS quickly:

netstat -Waltn | grep tcp

Every internet port fast with no DNS lookups:

netstat -Waltn | grep -E “(tcp|udp)(4|6)”

Like above but with DNS lookups but takes literally forever up to minutes:

netstat -Walt | grep -E “(tcp|udp)(4|6)”

Show only servers – that is ports that are listening waiting for an inbound connection:

netstat -Waltn | grep LISTEN

The Little Snitch Command – Who’s phoning home?

How to use LSOF to discover which app or process is listening to which ports:

lsof -Pnl +M -i -cmd | grep -E “LISTEN|TCP|UDP”

I prefer to use -n to speed up the listing of netstat results by turning off DNS lookups ip to name resolution. The l is used to also show ipv6. To show all internet connections, whether ipv4 or ipv6, tcp or udp, listening, connected or closing – the lot:

netstat -Waltn | grep p[46]

Show only TCP connections:

netstat -anp tcp

To see which apps have listening sockets open:

sudo lsof  -n -P | grep LISTEN

Some other good linux ones here:

Show Process ID in Netstat Mac

Actually, you can’t but you can use LSOF which lists open files and sockets:

lsof -Pnl +M -i

Use -i4 for ip4 and -i6 for ip6. -i seems to work for all internet traffic. Handy for tracking down what program is running a server on your machine.


This one is good for checking ssh tunnels:

sudo netstat -tulpn