news.volyx.in

Useful built-in macOS command-line utilities (weiyen.net)

837 points by yen223 · 639 days ago · 231 comments on HN

Article summary

The article discusses various built-in macOS command-line utilities that can be useful for automating tasks and improving productivity. It highlights several commands, including security, open, pbcopy, pbpaste, date, networkQuality, caffeinate, and uuidgen. These commands can be used for tasks such as accessing Keychain secrets, opening files, copying and pasting text, and generating UUIDs. The article also mentions additional utilities suggested by readers, including sips, afinfo, and mdls.

Main themes

  • macOS command-line utilities
  • productivity tools
  • automation
  • file management
  • security

What commenters say

  • Using the open command with the -n flag allows opening a new instance of an application, which can be useful for comparing files side by side.
  • The caffeinate command can be used to prevent a Mac from sleeping, with various options available to customize its behavior.
  • Some users find the .DS_Store files created by Finder to be annoying and unnecessary, while others see them as a legacy feature that serves a purpose.
  • The sips command is a useful tool for converting image file formats and resizing images, and can be used to convert photos to a format compatible with the Photos app.
  • The inability to open multiple instances of the same app is seen as a limitation of macOS, with some users preferring the behavior of other operating systems.
  • The caffeinate command can be used with the -w option to keep a Mac awake until a specific process completes, which can be useful for running long-running scripts.