Retrieving the Time Machine Estimated Full Backup Size

Another handy little magic spell for MacOS Sonoma’s Time Machine tool is…

log show --predicate 'subsystem == "com.apple.TimeMachine"' --info | grep "Estimated full backup will"

…which – when entered into a suitable Terminal instance – will print out Time Machine’s recent estimates of the storage costs of a full backup…

2024-05-02 06:46:35.507588+0100 0x3c5be8   Info        0x0                  291    0    backupd: (TimeMachine) [com.apple.TimeMachine:SizingProgress] Estimated full backup will contain 3113124 files (8.91 TB) from all sources
2024-05-02 07:46:49.802454+0100 0x3cd657   Info        0x0                  291    0    backupd: (TimeMachine) [com.apple.TimeMachine:SizingProgress] Estimated full backup will contain 3113163 files (8.91 TB) from all sources
2024-05-02 08:46:57.526626+0100 0x3d611b   Info        0x0                  291    0    backupd: (TimeMachine) [com.apple.TimeMachine:SizingProgress] Estimated full backup will contain 3113223 files (8.91 TB) from all sources
2024-05-02 09:47:03.731963+0100 0x3e04eb   Info        0x0                  291    0    backupd: (TimeMachine) [com.apple.TimeMachine:SizingProgress] Estimated full backup will contain 3114585 files (8.91 TB) from all sources
2024-05-02 10:47:35.409635+0100 0x3ecb04   Info        0x0                  291    0    backupd: (TimeMachine) [com.apple.TimeMachine:SizingProgress] Estimated full backup will contain 3116304 files (8.91 TB) from all sources

All very useful when shopping for a new target disk of if your monitoring your storage growth.

Douglas Adam’s Desk and Office in 1996?

This appears to be Douglas Adam’s nicely messy office and his cable spaghetti’d computer setup – complete with what appears to be a fantastic stack of external SCSI drives. Taken from this clip of October 1996’s ‘Break The Science Barrier with Richard Dawkins‘, this footage was likely filmed in the summer of that year.

Leaking Pipes with Swift and External Executables

Observed with MacOS 12.4/Xcode 13.4.1/Swift 5

There are quite a lot of tutorials out there covering the basics of running external executables from within Swift and, with very little effort, it’s quite easy to throw together something like this…

import Foundation

let wrappedUname = Process()
wrappedUname.executableURL = URL(fileURLWithPath: "/usr/bin/uname")
wrappedUname.arguments = ["-v"]
let unameOutputPipe = Pipe()
let unameErrorPipe = Pipe()
wrappedUname.standardOutput = unameOutputPipe
wrappedUname.standardError = unameErrorPipe
do{
    try wrappedUname.run()
} catch {
    print("Unexpected error: \(error).")
}
wrappedUname.waitUntilExit()
let unameOutput = String(decoding: unameOutputPipe.fileHandleForReading.readDataToEndOfFile(), as: UTF8.self)
let unameError = String(decoding: unameOutputPipe.fileHandleForReading.readDataToEndOfFile(), as: UTF8.self)
print("Output: " + unameOutput)
print("Error: " + unameError)
Continue reading