MacOS Command Line Tools updated

Including some old favourites.

In a meeting this morning I was dumping on Excel and said that I would rather use the command line for a lot of data manipulation. At the top of my mind were tools like cat, grep, sort, head, tail and cut. After the meeting I found a message in my mail from the Scripting OS X team alerting everyone to updates being made to the CLI toolkit.

The original article is here https://scriptingosx.com/2022/03/some-cli-updates-in-macos-monterey/

cut

  • new -w option (splits fields on whitespace)

du

  • new -A option (apparent size)
  • new --si option (human-readable, in 1000 based units)
  • new -t option (only show items over a certain threshold)

aa (Apple Archive)

  • new options for encryption
  • new aea command for encrypted Apple Archives

tar

  • new encryption and compression types

find

  • new -quit primary
  • new -sparse primary (so you can find APFS sparse files)

grep

new rgrep, bzgrep, bzegrep, and bzfgrep

  • new --label option
  • new -M, --lzma option

hdituil

segment subcommand and Segmented images are deprecated

UDBZ dmg format (bzip2 compression) is deprecated

udifrez and udifderez are deprecated (this allows to embed a license in a dmg)

head

  • new -n and -c options

killall

  • new -I option (confirm)
  • new -v option (verbose)

ls

  • new -D option (date format)
  • new whiteout file type (no idea what this is?)

open

  • new -u option to open file paths as URLs

pkgbuild

plutil

new -type option for extract

new -raw option for extract

  • new type subcommand to query type
  • new create subcommand to create a new empty plist

pwd

  • new -p option prints working directory with symbolic links resolved

readlink (12.3)

  • new -f option to resolve symbolic links

rm (12.3)

  • new -I option which prompts only when more than three files will be deleted or a directy is being removed recursively

shortcuts

  • new command to run, list, or interact with Shortcuts

smbutil

  • new multichannel and snapshot verbs

note from @Cecile: Excel's power feature is unlimited undos (provided that you haven't closed the file).

3 Likes