• I have a Mac with a T2 chip, in Target Disk Mode (TDM), to move it’s files to a new Mac via Migration Assistant - but the mount (on the new Mac) fails every time. With multiple accounts / passwords, just confirmed correct. Only workaround I found: Reboot old Mac; turn FileVault OFF; reboot into TDM.

  • command-line to show highlights of recent backup attempts by Time Machine

    time log show --debug --info --predicate '(subsystem == "com.apple.TimeMachine") AND ( (category == "BackupEngine") OR (category == "BackupDispatching") OR (category == "Spotlight") OR ((category =="MountPointValidity") ) AND NOT (eventMessage contains[c] "/Volumes/Backups of ") OR (composedMessage CONTAINS[c] "suppressing destination rotation") )' --last 3d

  • show dependencies via graph, of `brew outdated` items

    I find this essential, to understand not only what’s about to be updated, but how each relates to:

    • anything it depends on (below)
    • anything that depends on it (above)
      • these are highlighted via red arrow/s (toward the outdated item, which they depend on)
        • if none, the outdated item is likely at the top of the graph, and thus already easy to spot 😏)

    Notes:

    • it’s a hack, and somewhat “brute force” (ex: $searchIterations)
    • tested on a Mac, in the Terminal app  
      • overall concept amenable to most command-line settings

    Requirements:  

    • homebrew
    • graphviz (and the dot command thereof)
    • misc std command-line utils such as sed
    • a directory ~/tmp/
    • something that can read the final PDF output
      • the output type may be changed; see the dot -O -Tpdf… command

    command-line:

    brew outdated -q | while read searchRoot; do echo 'checking for '$searchRoot'...'; searchIterations=10; outFile=~/tmp/$(datestamp)_brew_${searchRoot}.gv; fullGraph=$(brew deps --installed --dot --graph --include-requirements --for-each --annotate); nodeList="$searchRoot"; for i in $(seq 1 $searchIterations); do nodeListNew=''; newNodes=$(echo "$fullGraph" | egrep " -> \"($nodeList)" | cut -d\" -f2,4 -s | tr '"' '\n' | sort | uniq | tr '\n' "|" | sed 's/|$//'); if [ -n "$newNodes" ] ; then nodeListNew=$(echo "$nodeList"$'\n'"$newNodes" | tr '|' '\n' | egrep -v '^$' | sort | uniq | tr '\n' "|" | sed 's/|$//'); else break; fi; if [ "$nodeListNew" = "$nodeList" ] ; then break; fi; nodeList=$nodeListNew; done; potOut=$(echo "$fullGraph" | egrep "$nodeList" | sort | uniq | sed "s/ -> \"$searchRoot\"/& [color = red] /"); echo 'digraph {'"$potOut"'}' > "$outFile"; dot -O -Tpdf "$outFile"; open "$outFile".pdf; done
    
  • this is beautiful (in part, because it’s ACTION) - share the dream:
    blog.codinghorror.com/stay-gold…

  • Wonder how many of us, faced with toll roads which now:

    • photograph the car & license plate
    • add a “convenience” fee
    • via some unknown 3rd party with our private info…
      instead:
    • simply choose to save our privacy and a bit of $
    • by spending a few more minutes
    • on a more pleasant road
  • not-so-temporary files

    hmm; I recently had the need to find where the “temporary” PDF was stored, as a result of selecting “Print > PDF > Open in Preview”, in an app - and found that it’s no longer simply in your user’s $TMPDIR - so:

    here’s a command-line to find recent ones and move them to the Trash, to review (and likely delete):

    find $TMPDIR ~/Library/Containers/*/Data/tmp/TemporaryItems -type f -mtime -7 -iname \*.pdf\* -print0 | xargs -0 -r -L1 -t -I% mv -i % ~/.Trash/; open ~/.Trash/

    (note: there may be several of the same name, and these will not overwrite each other, and thus not be moved - after disposing of previous results (as per your needs), run the command again. lather, rinse, repeat.)

    it appears these dirs are not cleaned up on a schedule (though may be cleared via Safe Mode), so files may linger here for quite some time - including, depending on what you “Print to PDF”, some that you may not want hanging around (ex: bank statement).

    BTW: depending what apps you use, you may want to check what else is in these TemporaryItems dirs:

    find $TMPDIR ~/Library/Containers/*/Data/tmp/TemporaryItems -type f \! -name .DS_Store -ls

    (as usual: caveat lector)

  • Q&D cmd-line to show dependency graphs for `brew outdated`

    ```
    brew outdated -q | while read searchRoot; do
        echo 'checking for '$searchRoot'...'
        searchIterations=10
        outFile=/tmp/$(date +%Y%m%d-%H%M%S)_brew_${searchRoot}.gv
        fullGraph=$(brew deps --installed --dot --graph --include-requirements --for-each --annotate)
        nodeList="$searchRoot"
        for i in $(seq 1 $searchIterations); do
            nodeListNew=''
            newNodes=$(echo "$fullGraph" | egrep " -> \"($nodeList)" | cut -d\" -f2,4 -s | tr '"' '\n' | sort | uniq | tr '\n' "|" | sed 's/|$//')
            if [ -n "$newNodes" ] 
            then
                nodeListNew=$(echo "$nodeList"$'\n'"$newNodes" | tr '|' '\n' | egrep -v '^$' | sort | uniq | tr '\n' "|" | sed 's/|$//')
            else
                break
            fi
            if [ "$nodeListNew" = "$nodeList" ] 
            then
                break
            fi
            nodeList=$nodeListNew
        done
        potOut=$(echo "$fullGraph" | egrep "$nodeList" | sort | uniq)
        echo 'digraph {'"$potOut"'}' > "$outFile"
        dot -O -Tpdf "$outFile"
        open "$outFile".pdf
    done
    ```
    

    Code tested on macOS 14.4, with the following extras: brew, graphviz (containing dot)

  • mac file sharing settings cleared

    seems to have happened just after applying the 14.3.1 update (though has happened before):
    all settings missing from the GUI, and sharing -l shows the same - nothing. 😕

    easy enough to re-config - at least after I determined this was the problem, and scratched my head to remember what shares were defined.
    (might want to cron sharing -l, to keep a log of the config)

  • Interesting underscore artifact in recent versions of macOS Terminal

    a thin horizontal line, somewhere before the current cursor…
    it’s apparently a leftover bit of the cursor which (regardless what style cursor you have) displays in the underline format, where a cursor was.
    selecting that line (ex: triple-click) clears the artifact.

  • A refreshingly nuanced look at "AI"

    John Siracusa (famed of exacting investigation and insight) has some excellent ideas - and questions - about “Generative AI”. Which we’re now awash in, whether we know it or not: I Made This.

    My own, entirely separate, opinion:

    There is no AI that exists right now; “Generative AI” is a (marketing) label, for systems created on the backs of people, while giving them no credit - and certainly none of the revenue. Calling it “AI” is - at best - a stretch. And it’s the latest twist (of the blade) in the “gig economy”.

  • Ian McDonald’s “The Little Goddess” is beautiful, brilliant - a page-turner! From The Very Best of the Best. Apparently, a novella from River of Gods - my next stop!

  • for each Time Machine destination, display: ID, date & human-readable destination

    {
        remvHeaders='s/==+/\'$'\n''/g';
        echo 'Current status of TM destinations:';
        destInfo=$(tmutil destinationinfo | \
            sed 's/^> //' | \
            tr '\n' '\;' | \
            sed -E 's/  +:/:/g' | \
            sed -E "$remvHeaders");
        defaults read /Library/Preferences/com.apple.TimeMachine.plist Destinations | \
            egrep -v ',$' | \
            sed -E -e ':a' -e 'N' -e '$!ba' -e 's/\n[[:blank:]]+"/ /g' | \
            sed -E 's/^[[:blank:]]+//' | \
            fgrep -e DestinationID -e SnapshotDates | \
            sed -e ':a' -e 'N' -e '$!ba' -e 's/;\n/;/g' | \
            sed 's/( /"/' | \
            while read -r theLine; do
                    destID=$(echo "$theLine" | \
                            cut -d\" -f2);
                    snapDate=$(echo "$theLine" | \
                    cut -d\" -f4);
            echo $destID $snapDate$(echo "$destInfo" | \
            fgrep "$destID" | \
            sed 's/;ID.*$//' | \
            sed -E -e 's/;[^: ]+: / /g');
        done | sort -rn
    }
    
  • wow; I just read my first work by Eleanor Arnason - “Potter of Bones” (in “The Very Best of the Best” anthology) is smart, enchanting, fresh, and I’m looking forward to more!
    refs:

  • open iftop for each (cfg’d) network interface:

    for i in $(ifconfig -lu); do if ifconfig $i | fgrep -v 'inet 127.' | grep -q "inet [0-9]"; then echo $i; fi; done | while read intfc; do osascript -e "tell application \"terminal\" to do script \"sudo iftop -i $intfc\""; done

    (Mac; could be adapted)

  • Partially-formed process, to convert RTF formatting (ex: lists) from clipboard / pasteboard, to paste into Markdown format (ex: git):

    osascript -e 'the clipboard as «class RTF »' | tr -d '«»' | sed 's/^data RTF //' | xxd -r -p | /usr/local/bin/pandoc -f rtf -t markdown

    (for Mac; could be adapted)

  • strange: when adding a link to an (Apple) Notes document: if the URL has a comma, everything up to the comma is silently stripped (permanently; editing the URL afterward, is too late) - one solution is to encode commas (the first time) as %2C

  • $14 / month - and you better believe you’re still the product 🤮
    arstechnica.com/tech-poli…

  • got my first pension check; nice. retiring, is the best (work-related) decision I ever made - LOVING it.
    (BTW: kudos to Cox Auto, for continuing to offer a pension.)

  • reminder:
    that thing you opened you phone/computer for - to be immediately distracted by other notifications? do the first thing FIRST - those notifications will still be there.
    (otherwise, you’ll likely forget the first - likely more important - thing.)

  • Uninstall is sometimes not so simple

    Drat; I’ve been meaning to try the Smile AppleScript editor, but waited too long, and it’s incompatible with modern macOS - HOWEVER:

    I trashed the /Applications/Smile directory (no uninstaller in there), and then re-opened Script Editor to get back to work - but it hung; never completed startup and showed no error messages. Strange.

    After a bit of debugging, I recalled that when I’d installed Smile - since I luckily already had Apple’s built-in Script Editor app open - the Installer told me it had to quit that first. Interesting - and seemed maybe relevant now.

    So I started hunting for evidence of just what had been installed - likely something conflicting with Script Editor (at least).

    /var/log/install.log did have some info, and so did /private/var/db/receipts - which led to the solution (in my case anyway), which was also deleting these directories:

    /Library/Application Support/Smile
    /Library/ScriptingAdditions/FITS.osax
    /Library/ScriptingAdditions/Numerics.osax
    /Library/ScriptingAdditions/Satimage.osax
    /Library/ScriptingAdditions/XMLLib.osax
    

    After which, Script Editor was able to finish startup - and even showed the unsaved script that I’d been working on. Nice.

  • ugh: in a dir within iCloud Drive, replacing a regular file, with a symlink of the same name, apparently breaks sync’ing 😟 - and good luck trying to find that via brctl log -w. (only reason I knew it broke: a periodic check of sync status)

  • oh; weird: if you happen to have /tmp open in a Finder window, brew install wget fails with dir_s_rmdir - apparently due to a “.DS_Store” file, a few levels below /tmp

  • Google - the company whose motto WAS “Don’t be Evil”: arstechnica.com

  • Apple Savings: % ain’t bad & it looks like xfer between a linked external account, is much more pleasant (fee-free) than with most others: www.apple.com/newsroom/…

  • are you in the cloud majority? twitter.com/Grady_Boo…

subscribe via RSS