1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00

osx/*: update page (#7665)

This commit is contained in:
Emily Grace Seville 2022-02-14 03:21:43 -08:00 committed by GitHub
parent b1326296cd
commit 692469016e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 151 additions and 107 deletions

16
pages/common/oathtool.md Normal file
View file

@ -0,0 +1,16 @@
# oathtool
> OATH one-time password tool.
> More information: <https://www.nongnu.org/oath-toolkit/oathtool.1.html>.
- Generate TOTP token (behaves like Google Authenticator):
`oathtool --totp --base32 "{{secret}}"`
- Generate a TOTP token for a specific time:
`oathtool --totp --now "{{2004-02-29 16:21:42}}" --base32 "{{secret}}"`
- Validate a TOTP token:
`oathtool --totp --base32 "{{secret}}" "{{token}}"`

View file

@ -1,6 +1,7 @@
# rubocop # rubocop
> Lint Ruby files. > Lint Ruby files.
> More information: <https://docs.rubocop.org/rubocop/usage/basic_usage.html>.
- Check all files in the current directory (including subdirectories): - Check all files in the current directory (including subdirectories):

View file

@ -10,15 +10,15 @@
- Print a one line description of the audio file: - Print a one line description of the audio file:
`afinfo -b {{path/to/file}}` `afinfo --brief {{path/to/file}}`
- Print metadata info and contents of the audio file's InfoDictionary: - Print metadata info and contents of the audio file's InfoDictionary:
`afinfo -i {{path/to/file}}` `afinfo --info {{path/to/file}}`
- Print output in XML format: - Print output in XML format:
`afinfo -x {{path/to/file}}` `afinfo --xml {{path/to/file}}`
- Print warnings for the audio file if any: - Print warnings for the audio file if any:
@ -26,4 +26,4 @@
- Display help for full usage: - Display help for full usage:
`afinfo -h` `afinfo --help`

View file

@ -5,7 +5,7 @@
- Show current wireless status information: - Show current wireless status information:
`airport -I` `airport --getinfo`
- Sniff wireless traffic on channel 1: - Sniff wireless traffic on channel 1:
@ -13,8 +13,8 @@
- Scan for available wireless networks: - Scan for available wireless networks:
`airport -s` `airport --scan`
- Disassociate from current airport network: - Disassociate from current airport network:
`sudo airport -z` `sudo airport --disassociate`

View file

@ -2,6 +2,7 @@
> Provides app sleep services. > Provides app sleep services.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://keith.github.io/xcode-man-pages/appsleepd.8.html>.
- Start the daemon: - Start the daemon:

View file

@ -10,4 +10,4 @@
- Run a command using x86_64: - Run a command using x86_64:
`arch -x86_64 {{command}}` `arch -x86_64 "{{command}}"`

View file

@ -2,6 +2,7 @@
> A service for managing Audio Video Bridging (AVB) devices. > A service for managing Audio Video Bridging (AVB) devices.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/1/avbdeviced/>.
- Start the daemon: - Start the daemon:

View file

@ -13,7 +13,7 @@
- Encode from stdin: - Encode from stdin:
`echo -n {{plain_text}} | base64` `echo -n "{{plain_text}}" | base64`
- Decode from stdin: - Decode from stdin:

View file

@ -2,6 +2,7 @@
> This supports the syncing of iCloud and iCloud Drive. > This supports the syncing of iCloud and iCloud Drive.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/mojave/8/bird/>.
- Start the daemon: - Start the daemon:

View file

@ -5,11 +5,11 @@
- Bless a volume with only Mac OS X or Darwin, and create the BootX and `boot.efi` files as needed: - Bless a volume with only Mac OS X or Darwin, and create the BootX and `boot.efi` files as needed:
`bless --folder "{{/Volumes/Mac OS X/System/Library/CoreServices}}" --bootinfo --bootefi` `bless --folder {{/Volumes/Mac OS X/System/Library/CoreServices}} --bootinfo --bootefi`
- Set a volume containing either Mac OS 9 and Mac OS X to be the active volume: - Set a volume containing either Mac OS 9 and Mac OS X to be the active volume:
`bless --mount "{{/Volumes/Mac OS}}" --setBoot` `bless --mount {{/Volumes/Mac OS}} --setBoot`
- Set the system to NetBoot and broadcast for an available server: - Set the system to NetBoot and broadcast for an available server:

View file

@ -2,6 +2,7 @@
> A service that handles all Bluetooth network connections. > A service that handles all Bluetooth network connections.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/osx/8/bnepd/>.
- Start the daemon: - Start the daemon:

View file

@ -1,6 +1,7 @@
# brightness # brightness
> Get and set the brightness level of all internal and certain external displays. > Get and set the brightness level of all internal and certain external displays.
> More information: <https://github.com/nriley/brightness>.
- Show current brightness: - Show current brightness:

View file

@ -9,7 +9,7 @@
- Prevent from sleeping until a command completes: - Prevent from sleeping until a command completes:
`caffeinate -s {{command}}` `caffeinate -s "{{command}}"`
- Prevent from sleeping until you type Ctrl-C: - Prevent from sleeping until you type Ctrl-C:

View file

@ -2,6 +2,7 @@
> Provides preferences services (`CFPreferences`, `NSUserDefaults`). > Provides preferences services (`CFPreferences`, `NSUserDefaults`).
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/osx/8/cfprefsd/>.
- Start the daemon: - Start the daemon:

View file

@ -2,6 +2,7 @@
> This synchronizes iCloud Photos. > This synchronizes iCloud Photos.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/8/cloudphotosd/>.
- Start the daemon: - Start the daemon:

View file

@ -5,8 +5,8 @@
- Sign an application with a certificate: - Sign an application with a certificate:
`codesign -s "{{My Company Name}}" {{path/to/App.app}}` `codesign --sign "{{My Company Name}}" {{path/to/App.app}}`
- Verify the certificate of an application: - Verify the certificate of an application:
`codesign -v {{path/to/App.app}}` `codesign --verify {{path/to/App.app}}`

View file

@ -9,7 +9,7 @@
- Connect to multiple hosts with a given SSH key: - Connect to multiple hosts with a given SSH key:
`csshX {{user@hostname1}} {{user@hostname2}} '--ssh_args' '-i {{path/to/ssh_key.pem}}'` `csshX {{user@hostname1}} {{user@hostname2}} --ssh_args "-i {{path/to/ssh_key.pem}}"`
- Connect to a pre-defined cluster from `/etc/clusters`: - Connect to a pre-defined cluster from `/etc/clusters`:

View file

@ -5,11 +5,11 @@
- Display the current date using the default locale's format: - Display the current date using the default locale's format:
`date +"%c"` `date +%c`
- Display the current date in UTC and ISO 8601 format: - Display the current date in UTC and ISO 8601 format:
`date -u +"%Y-%m-%dT%H:%M:%SZ"` `date -u +%Y-%m-%dT%H:%M:%SZ`
- Display the current date as a Unix timestamp (seconds since the Unix epoch): - Display the current date as a Unix timestamp (seconds since the Unix epoch):

View file

@ -5,19 +5,19 @@
- Read system defaults for an application option: - Read system defaults for an application option:
`defaults read {{application}} {{option}}` `defaults read "{{application}}" "{{option}}"`
- Read default values for an application option: - Read default values for an application option:
`defaults read -app {{application}} {{option}}` `defaults read -app "{{application}}" "{{option}}"`
- Search for a keyword in domain names, keys, and values: - Search for a keyword in domain names, keys, and values:
`defaults find {{keyword}}` `defaults find "{{keyword}}"`
- Write the default value of an application option: - Write the default value of an application option:
`defaults write {{application}} {{option}} {{-type}} {{value}}` `defaults write "{{application}}" "{{option}}" {{-type}} {{value}}`
- Speed up Mission Control animations: - Speed up Mission Control animations:
@ -25,4 +25,4 @@
- Delete all defaults of an application: - Delete all defaults of an application:
`defaults delete {{application}}` `defaults delete "{{application}}"`

View file

@ -2,6 +2,7 @@
> Provides distributed notification services. > Provides distributed notification services.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/8/distnoted/>.
- Start the daemon: - Start the daemon:

View file

@ -1,6 +1,7 @@
# dmesg # dmesg
> Write the kernel messages to standard output. > Write the kernel messages to standard output.
> More information: <https://www.manpagez.com/man/8/dmesg/>.
- Show kernel messages: - Show kernel messages:

View file

@ -13,7 +13,7 @@
- Set Finder as the default handler for the ftp:// URL scheme: - Set Finder as the default handler for the ftp:// URL scheme:
`duti -s {{com.apple.Finder}} {{ftp}}` `duti -s {{com.apple.Finder}} "{{ftp}}"`
- Display information about the default application for a given extension: - Display information about the default application for a given extension:

View file

@ -2,7 +2,7 @@
> Event Monitor service that accepts events from various services, runs them through a simple rules engine, and takes action. > Event Monitor service that accepts events from various services, runs them through a simple rules engine, and takes action.
> The actions can run commands, send email, or SMS messages. > The actions can run commands, send email, or SMS messages.
> More information: <https://www.xorrior.com/emond-persistence/>. > More information: <https://www.manpagez.com/man/8/emond/>.
- Start the daemon: - Start the daemon:

View file

@ -1,7 +1,7 @@
# fdesetup # fdesetup
> Set and retrieve FileVault related information. > Set and retrieve FileVault related information.
> Main information: <https://www.unix.com/man-page/mojave/8/fdesetup/>. > More information: <https://www.unix.com/man-page/mojave/8/fdesetup/>.
- List current FileVault enabled users: - List current FileVault enabled users:

View file

@ -2,6 +2,7 @@
> Coordinates access to files by multiple processes (`NSFileCoordinator`, `NSFilePresenter`). > Coordinates access to files by multiple processes (`NSFileCoordinator`, `NSFilePresenter`).
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/osx/8/filecoordinationd/>.
- Start the daemon: - Start the daemon:

View file

@ -17,8 +17,8 @@
- Show tasks for a specified number of days: - Show tasks for a specified number of days:
`icalBuddy -n tasksDueBefore:today+{{days}}` `icalBuddy -n "tasksDueBefore:today+{{days}}"`
- Show events in a time range: - Show events in a time range:
`icalBuddy eventsFrom:'{{start_date}}' to:'{{end_date}}'` `icalBuddy eventsFrom:{{start_date}} to:{{end_date}}`

View file

@ -1,11 +1,11 @@
# lldb # lldb
> The LLVM Low-Level Debugger. > The LLVM Low-Level Debugger.
> More information: <https://lldb.llvm.org>. > More information: <https://lldb.llvm.org/man/lldb.html>.
- Debug an executable: - Debug an executable:
`lldb {{executable}}` `lldb "{{executable}}"`
- Attach `lldb` to a running process with a given PID: - Attach `lldb` to a running process with a given PID:
@ -13,4 +13,4 @@
- Wait for a new process to launch with a given name, and attach to it: - Wait for a new process to launch with a given name, and attach to it:
`lldb -w -n {{process_name}}` `lldb -w -n "{{process_name}}"`

View file

@ -5,7 +5,7 @@
- Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily): - Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily):
`locate {{pattern}}` `locate "{{pattern}}"`
- Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`): - Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`):

View file

@ -9,4 +9,4 @@
- Look for lines ignoring case: - Look for lines ignoring case:
`look -f {{prefix}} {{file}}` `look --ignore-case {{prefix}} {{file}}`

View file

@ -5,7 +5,7 @@
- Sign into the Mac App Store for the first time: - Sign into the Mac App Store for the first time:
`mas signin {{user@example.com}}` `mas signin "{{user@example.com}}"`
- Show all installed applications and their product identifiers: - Show all installed applications and their product identifiers:
@ -13,7 +13,7 @@
- Search for an application, displaying the price alongside the results: - Search for an application, displaying the price alongside the results:
`mas search {{application}} --price` `mas search "{{application}}" --price`
- Install or update an application: - Install or update an application:

View file

@ -17,4 +17,4 @@
- Print a checksum of the given string: - Print a checksum of the given string:
`md5 -s {{string}}` `md5 -s "{{string}}"`

View file

@ -9,8 +9,8 @@
- Find a file by its content: - Find a file by its content:
`mdfind {{query}}` `mdfind "{{query}}"`
- Find a file containing a string, in a given directory: - Find a file containing a string, in a given directory:
`mdfind -onlyin {{directory}} {{query}}` `mdfind -onlyin {{directory}} "{{query}}"`

View file

@ -1,6 +1,7 @@
# nettop # nettop
> Display updated information about the network. > Display updated information about the network.
> More information: <https://www.manpagez.com/man/1/nettop/>.
- Monitor TCP and UDP sockets from all interfaces: - Monitor TCP and UDP sockets from all interfaces:
@ -12,7 +13,7 @@
- Monitor a specific process: - Monitor a specific process:
`nettop -p {{process_id|process_name}}` `nettop -p "{{process_id|process_name}}"`
- Display a per-process summary: - Display a per-process summary:

View file

@ -17,4 +17,4 @@
- Connect to a particular Wi-Fi network: - Connect to a particular Wi-Fi network:
`networksetup -setairportnetwork {{en0}} "{{Airport Network SSID}}" {{password}}` `networksetup -setairportnetwork {{en0}} {{Airport Network SSID}} {{password}}`

View file

@ -2,6 +2,7 @@
> Notification server. > Notification server.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/8/notifyd/>.
- Start the daemon: - Start the daemon:

View file

@ -1,15 +0,0 @@
# oathtool
> OATH one-time password tool.
- Generate TOTP token (behaves like Google Authenticator):
`oathtool --totp --base32 {{secret}}`
- Generate a TOTP token for a specific time:
`oathtool --totp --now {{2004-02-29 16:21:42}} --base32 {{secret}}`
- Validate a TOTP token:
`oathtool --totp --base32 {{secret}} {{token}}`

View file

@ -2,6 +2,7 @@
> This retrieves and caches Certificate Revocation Lists (CRLs) and Online Certificate Status Protocol (OCSP) responses for certificate verification. > This retrieves and caches Certificate Revocation Lists (CRLs) and Online Certificate Status Protocol (OCSP) responses for certificate verification.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/1/ocspd/>.
- Start the daemon: - Start the daemon:

View file

@ -1,6 +1,7 @@
# open # open
> Opens files, directories and applications. > Opens files, directories and applications.
> More information: <https://ss64.com/osx/open.html>.
- Open a file with the associated application: - Open a file with the associated application:
@ -8,7 +9,7 @@
- Run a graphical macOS application: - Run a graphical macOS application:
`open -a {{Application}}` `open -a "{{Application}}"`
- Run a graphical macOS app based on the bundle identifier (refer to `osascript` for an easy way to get this): - Run a graphical macOS app based on the bundle identifier (refer to `osascript` for an easy way to get this):

View file

@ -1,6 +1,7 @@
# opensnoop # opensnoop
> Tool that tracks file opens on your system. > Tool that tracks file opens on your system.
> More information: <https://ss64.com/osx/opensnoop.html>.
- Print all file opens as they occur: - Print all file opens as they occur:
@ -8,7 +9,7 @@
- Track all file opens by a process by name: - Track all file opens by a process by name:
`sudo opensnoop -n {{process_name}}` `sudo opensnoop -n "{{process_name}}"`
- Track all file opens by a process by PID: - Track all file opens by a process by PID:

View file

@ -5,11 +5,11 @@
- Run an AppleScript command: - Run an AppleScript command:
`osascript -e '{{say "Hello world"}}'` `osascript -e "{{say 'Hello world'}}"`
- Run multiple AppleScript commands: - Run multiple AppleScript commands:
`osascript -e '{{say "Hello"}}' -e '{{say "world"}}'` `osascript -e "{{say 'Hello'}}" -e "{{say 'world'}}"`
- Run a compiled (`*.scpt`), bundled (`*.scptd`), or plaintext (`*.applescript`) AppleScript file: - Run a compiled (`*.scpt`), bundled (`*.scptd`), or plaintext (`*.applescript`) AppleScript file:
@ -21,7 +21,7 @@
- Run a JavaScript command: - Run a JavaScript command:
`osascript -l JavaScript -e '{{console.log("Hello world");}}'` `osascript -l JavaScript -e "{{console.log('Hello world');}}"`
- Run a JavaScript file: - Run a JavaScript file:

View file

@ -1,6 +1,7 @@
# pbcopy # pbcopy
> Place standard output in the clipboard. > Place standard output in the clipboard.
> More information: <https://ss64.com/osx/pbcopy.html>.
- Place the contents of a file in the clipboard: - Place the contents of a file in the clipboard:

View file

@ -1,6 +1,7 @@
# pbpaste # pbpaste
> Send the contents of the clipboard to standard output. > Send the contents of the clipboard to standard output.
> More information: <https://ss64.com/osx/pbpaste.html>.
- Write the contents of the clipboard to a file: - Write the contents of the clipboard to a file:

View file

@ -2,6 +2,7 @@
> This analyzes photo libraries for Memories, People, and scene or object based search. > This analyzes photo libraries for Memories, People, and scene or object based search.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/8/photoanalysisd/>.
- Start the daemon: - Start the daemon:

View file

@ -2,6 +2,7 @@
> This handles all photo library requests. > This handles all photo library requests.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/8/photolibraryd/>.
- Start the daemon: - Start the daemon:

View file

@ -1,27 +1,28 @@
# ping # ping
> Send ICMP ECHO_REQUEST packets to network hosts. > Send ICMP ECHO_REQUEST packets to network hosts.
> More information: <https://ss64.com/osx/ping.html>.
- Ping the specified host: - Ping the specified host:
`ping {{host}}` `ping "{{hostname}}"`
- Ping a host a specific number of times: - Ping a host a specific number of times:
`ping -c {{count}} {{host}}` `ping -c {{count}} "{{host}}"`
- Ping `host`, specifying the interval in `seconds` between requests (default is 1 second): - Ping `host`, specifying the interval in `seconds` between requests (default is 1 second):
`ping -i {{seconds}} {{host}}` `ping -i {{seconds}} "{{host}}"`
- Ping `host` without trying to lookup symbolic names for addresses: - Ping `host` without trying to lookup symbolic names for addresses:
`ping -n {{host}}` `ping -n "{{host}}"`
- Ping `host` and ring the bell when a packet is received (if your terminal supports it): - Ping `host` and ring the bell when a packet is received (if your terminal supports it):
`ping -a {{host}}` `ping -a "{{host}}"`
- Ping `host` and prints the time a packet was received (this option is an Apple addition): - Ping `host` and prints the time a packet was received (this option is an Apple addition):
`ping --apple-time {{host}}` `ping --apple-time "{{host}}"`

View file

@ -1,6 +1,7 @@
# pkgutil # pkgutil
> Query and manipulate Mac OS X Installer packages and receipts. > Query and manipulate Mac OS X Installer packages and receipts.
> More information: <https://ss64.com/osx/pkgutil.html>.
- List package IDs for all installed packages: - List package IDs for all installed packages:

View file

@ -1,6 +1,7 @@
# plutil # plutil
> View, convert, validate, or edit property list ("plist") files. > View, convert, validate, or edit property list ("plist") files.
> More information: <https://www.manpagez.com/man/1/plutil/>.
- Display the contents of one or more plist files in human-readable format: - Display the contents of one or more plist files in human-readable format:

View file

@ -1,6 +1,7 @@
# pod # pod
> Dependency manager for Swift and Objective-C Cocoa projects. > Dependency manager for Swift and Objective-C Cocoa projects.
> More information: <https://guides.cocoapods.org/terminal/commands.html>.
- Create a Podfile for the current project with the default contents: - Create a Podfile for the current project with the default contents:

View file

@ -1,6 +1,7 @@
# qlmanage # qlmanage
> QuickLook server tool. > QuickLook server tool.
> More information: <https://ss64.com/osx/qlmanage.html>.
- Display QuickLook for one or multiple files: - Display QuickLook for one or multiple files:

View file

@ -1,6 +1,7 @@
# reboot # reboot
> Reboot the system. > Reboot the system.
> More information: <https://ss64.com/osx/reboot.html>.
- Reboot immediately: - Reboot immediately:

View file

@ -1,6 +1,7 @@
# rename # rename
> Rename a file or group of files with a regular expression. > Rename a file or group of files with a regular expression.
> More information: <https://www.manpagez.com/man/2/rename/>.
- Replace `from` with `to` in the filenames of the specified files: - Replace `from` with `to` in the filenames of the specified files:

View file

@ -2,18 +2,19 @@
> Manually manipulate the routing tables. > Manually manipulate the routing tables.
> Necessitates to be root. > Necessitates to be root.
> More information: <https://www.manpagez.com/man/8/route/>.
- Add a route to a destination through a gateway: - Add a route to a destination through a gateway:
`sudo route add {{dest_ip_address}} {{gateway_address}}` `sudo route add "{{destination_ip_address}}" "{{gateway_address}}"`
- Add a route to a /24 subnet through a gateway: - Add a route to a /24 subnet through a gateway:
`sudo route add {{subnet_ip_address}}/24 {{gateway_address}}` `sudo route add "{{subnet_ip_address}}/24" "{{gateway_address}}"`
- Run in test mode (does not do anything, just print): - Run in test mode (does not do anything, just print):
`sudo route -t add {{dest_ip_address}}/24 {{gateway_address}}` `sudo route -t add "{{destination_ip_address}}/24" "{{gateway_address}}"`
- Remove all routes: - Remove all routes:
@ -21,8 +22,8 @@
- Delete a specific route: - Delete a specific route:
`sudo route delete {{dest_ip_address}}/24` `sudo route delete "{{destination_ip_address}}/24"`
- Lookup and display the route for a destination (hostname or IP address): - Lookup and display the route for a destination (hostname or IP address):
`sudo route get {{destination}}` `sudo route get "{{destination}}"`

View file

@ -1,7 +1,7 @@
# SafeEjectGPU # SafeEjectGPU
> Eject a GPU safely. > Eject a GPU safely.
> Visit the man page for more info. > More information: <https://www.unix.com/man-page/mojave/8/safeejectgpu>.
- Eject all GPUs: - Eject all GPUs:

View file

@ -9,16 +9,16 @@
- Read a file aloud: - Read a file aloud:
`say -f {{filename.txt}}` `say --input-file={{filename.txt}}`
- Say a phrase with a custom voice and speech rate: - Say a phrase with a custom voice and speech rate:
`say -v {{voice}} -r {{words_per_minute}} "{{I'm sorry Dave, I can't let you do that.}}"` `say --voice={{voice}} --rate={{words_per_minute}} "{{I'm sorry Dave, I can't let you do that.}}"`
- List the available voices: - List the available voices:
`say -v "?"` `say --voice="?"`
- Create an audio file of the spoken text: - Create an audio file of the spoken text:
`say -o {{filename.aiff}} "{{Here's to the Crazy Ones.}}"` `say --output-file={{filename.aiff}} "{{Here's to the Crazy Ones.}}"`

View file

@ -2,6 +2,7 @@
> Controls access to and modification of keychain items. > Controls access to and modification of keychain items.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/mojave/8/secd>.
- Start the daemon: - Start the daemon:

View file

@ -3,6 +3,7 @@
> This manages security contexts and cryptographic operations. > This manages security contexts and cryptographic operations.
> Works with secd for keychain access. > Works with secd for keychain access.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/osx/1/securityd/>.
- Start the daemon: - Start the daemon:

View file

@ -1,6 +1,7 @@
# shuf # shuf
> Generate random permutations. > Generate random permutations.
> More information: <https://www.unix.com/man-page/linux/1/shuf/>.
- Randomize the order of lines in a file and output the result: - Randomize the order of lines in a file and output the result:
@ -8,12 +9,12 @@
- Only output the first 5 entries of the result: - Only output the first 5 entries of the result:
`shuf -n {{5}} {{filename}}` `shuf --head-count={{5}} {{filename}}`
- Write output to another file: - Write output to another file:
`shuf {{filename}} -o {{output_filename}}` `shuf {{filename}} --output={{output_filename}}`
- Generate random numbers in range 1-10: - Generate random numbers in range 1-10:
`shuf -i {{1-10}}` `shuf --input-range={{1-10}}`

View file

@ -17,7 +17,7 @@
- Reboot in 5 minutes: - Reboot in 5 minutes:
`shutdown -r +{{5}}` `shutdown -r "+{{5}}"`
- Power off (halt) at 1:00 pm (Uses 24h clock): - Power off (halt) at 1:00 pm (Uses 24h clock):

View file

@ -2,6 +2,7 @@
> Apple Scriptable Image Processing System. > Apple Scriptable Image Processing System.
> Raster/Query images and ColorSync ICC Profiles. > Raster/Query images and ColorSync ICC Profiles.
> More information: <https://ss64.com/osx/sips.html>.
- Specify an output directory so that originals do not get modified: - Specify an output directory so that originals do not get modified:
@ -9,11 +10,11 @@
- Resample image at specified size, Image aspect ratio may be altered: - Resample image at specified size, Image aspect ratio may be altered:
`sips -z {{1920}} {{300}} {{image.ext}}` `sips --resampleHeightWidth {{1920}} {{300}} {{image.ext}}`
- Resample image so height and width aren't greater than specified size (notice the capital Z): - Resample image so height and width aren't greater than specified size (notice the capital Z):
`sips -Z {{1920}} {{300}} {{image.ext}}` `sips --resampleHeightWidthMax {{1920}} {{300}} {{image.ext}}`
- Resample all images in a directory to fit a width of 960px (honoring aspect ratio): - Resample all images in a directory to fit a width of 960px (honoring aspect ratio):
@ -21,8 +22,8 @@
- Convert an image from CMYK to RGB: - Convert an image from CMYK to RGB:
`sips --matchTo '/System/Library/ColorSync/Profiles/Generic RGB Profile.icc' {{path/to/image.ext}} {{path/to/out_dir}}` `sips --matchTo "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc" {{path/to/image.ext}} {{path/to/out_dir}}`
- Remove ColorSync ICC profile from an image: - Remove ColorSync ICC profile from an image:
`sips -d profile --deleteColorManagementProperties {{path/to/image.ext}}` `sips --deleteProperty profile --deleteColorManagementProperties {{path/to/image.ext}}`

View file

@ -2,6 +2,7 @@
> An SNTP server. > An SNTP server.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://linux.die.net/man/8/snmpd>.
- Start the daemon: - Start the daemon:

View file

@ -1,19 +1,20 @@
# softwareupdate # softwareupdate
> A tool for updating macOS App Store apps via the command-line. > A tool for updating macOS App Store apps via the command-line.
> More information: <https://ss64.com/osx/softwareupdate.html>.
- List all available updates: - List all available updates:
`softwareupdate -l` `softwareupdate --list`
- Download and install all updates: - Download and install all updates:
`softwareupdate -ia` `softwareupdate --install --all`
- Download and install all recommended updates: - Download and install all recommended updates:
`softwareupdate -ir` `softwareupdate --install --req`
- Download and install a specific app: - Download and install a specific app:
`softwareupdate -i {{update_name}}` `softwareupdate --install {{update_name}}`

View file

@ -10,7 +10,7 @@
- Add a rule to allow an application to run (labeling of rule is optional): - Add a rule to allow an application to run (labeling of rule is optional):
`spctl --add --label "{{rule_name}}" {{path/to/file}}` `spctl --add --label {{rule_name}} {{path/to/file}}`
- Turn on Gatekeeper: - Turn on Gatekeeper:

View file

@ -1,6 +1,7 @@
# split # split
> Split a file into pieces. > Split a file into pieces.
> More information: <https://ss64.com/osx/split.html>.
- Split a file, each split having 10 lines (except the last split): - Split a file, each split having 10 lines (except the last split):

View file

@ -13,4 +13,4 @@
- Print the system serial number: - Print the system serial number:
`system_profiler SPHardwareDataType|grep "Serial Number (system)" |awk '{print $4}'` `system_profiler SPHardwareDataType|grep "Serial Number (system)" | awk '{ print $4 }'`

View file

@ -9,7 +9,7 @@
- Specify timezone, NTP Server and enable network time: - Specify timezone, NTP Server and enable network time:
`systemsetup -settimezone {{US/Pacific}} -setnetworktimeserver {{us.pool.ntp.org}} -setusingnetworktime on` `systemsetup -settimezone "{{US/Pacific}}" -setnetworktimeserver {{us.pool.ntp.org}} -setusingnetworktime on`
- Make the machine never sleep and automatically restart on power failure or kernel panic: - Make the machine never sleep and automatically restart on power failure or kernel panic:

View file

@ -9,7 +9,7 @@
- Set an APF share or SMB share as the backup destination: - Set an APF share or SMB share as the backup destination:
`sudo tmutil setdestination {{protocol://user[:password]@host/share}}` `sudo tmutil setdestination "{{protocol://user[:password]@host/share}}"`
- Append the given destination to the list of destinations: - Append the given destination to the list of destinations:

View file

@ -2,6 +2,7 @@
> Provides universal access services. > Provides universal access services.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.manpagez.com/man/8/universalaccessd/>.
- Start the daemon: - Start the daemon:

View file

@ -1,6 +1,7 @@
# uptime # uptime
> Tell how long the system has been running and other information. > Tell how long the system has been running and other information.
> More information: <https://ss64.com/osx/uptime.html>.
- Print current time, uptime, number of logged-in users and other information: - Print current time, uptime, number of logged-in users and other information:

View file

@ -2,6 +2,7 @@
> Provides notification services. > Provides notification services.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/mojave/8/usernoted>.
- Start the daemon: - Start the daemon:

View file

@ -2,6 +2,7 @@
> Listens for incoming VPN connections. > Listens for incoming VPN connections.
> It should not be invoked manually. > It should not be invoked manually.
> More information: <https://www.unix.com/man-page/osx/8/vpnd/>.
- Start the daemon: - Start the daemon:

View file

@ -9,11 +9,11 @@
- Record a video: - Record a video:
`wacaw --video {{filename}} -D {{duration_in_seconds}}` `wacaw --video {{filename}} --duration {{duration_in_seconds}}`
- Take a picture with custom resolution: - Take a picture with custom resolution:
`wacaw -x {{width}} -y {{height}} {{filename}}` `wacaw --width {{width}} --height {{height}} {{filename}}`
- Copy image just taken to clipboard: - Copy image just taken to clipboard:
@ -21,4 +21,4 @@
- List the devices available: - List the devices available:
`wacaw -L` `wacaw --list-devices`

View file

@ -1,7 +1,7 @@
# wc # wc
> Count lines, words, or bytes. > Count lines, words, or bytes.
> More information: <https://www.gnu.org/software/coreutils/wc>. > More information: <https://ss64.com/osx/wc.html>.
- Count lines in file: - Count lines in file:

View file

@ -1,23 +1,24 @@
# whence # whence
> A zsh builtin to indicate how a given command would be interpreted. > A zsh builtin to indicate how a given command would be interpreted.
> More information: <https://www.unix.com/man-page/OpenSolaris/1/whence/>.
- Interpret {{command}}, with expansion if defined as an `alias` (similar to the `command -v` builtin): - Interpret {{command}}, with expansion if defined as an `alias` (similar to the `command -v` builtin):
`whence {{command}}` `whence "{{command}}"`
- Display type of {{command}}, with location if defined as a function, or binary (equivalent to the `type` and `command -V` builtins): - Display type of {{command}}, with location if defined as a function, or binary (equivalent to the `type` and `command -V` builtins):
`whence -v {{command}}` `whence -v "{{command}}"`
- Same as above, except display content of shell functions instead of location (equivalent to `which` builtin): - Same as above, except display content of shell functions instead of location (equivalent to `which` builtin):
`whence -c {{command}}` `whence -c "{{command}}"`
- Same as above, but show all occurrences on command path (equivalent to the `where` builtin): - Same as above, but show all occurrences on command path (equivalent to the `where` builtin):
`whence -ca {{command}}` `whence -ca "{{command}}"`
- Search only the `PATH` for {{command}}, ignoring builtins, aliases or shell functions (equivalent to the `where` command): - Search only the `PATH` for {{command}}, ignoring builtins, aliases or shell functions (equivalent to the `where` command):
`whence -p {{command}}` `whence -p "{{command}}"`

View file

@ -10,16 +10,16 @@
- Select a given path as the active developer directory: - Select a given path as the active developer directory:
`xcode-select -s {{path/to/Xcode.app/Contents/Developer}}` `xcode-select --switch {{path/to/Xcode.app/Contents/Developer}}`
- Select a given Xcode instance and use its developer directory as the active one: - Select a given Xcode instance and use its developer directory as the active one:
`xcode-select -s {{path/to/Xcode.app}}` `xcode-select --switch {{path/to/Xcode.app}}`
- Print the currently selected developer directory: - Print the currently selected developer directory:
`xcode-select -p` `xcode-select --print-path`
- Discard any user-specified developer directory so that it will be found via the default search mechanism: - Discard any user-specified developer directory so that it will be found via the default search mechanism:
`sudo xcode-select -r` `sudo xcode-select --reset`

View file

@ -1,6 +1,7 @@
# xed # xed
> Opens files for editing in Xcode. > Opens files for editing in Xcode.
> More information: <https://www.manpagez.com/man/1/xed/>.
- Open file in Xcode: - Open file in Xcode:
@ -8,8 +9,8 @@
- Open file(s) in Xcode, create if it doesn't exist: - Open file(s) in Xcode, create if it doesn't exist:
`xed -c {{filename1}}` `xed --create {{filename1}}`
- Open a file in Xcode and jump to line number 75: - Open a file in Xcode and jump to line number 75:
`xed -l 75 {{filename}}` `xed --line 75 {{filename}}`

View file

@ -2,6 +2,7 @@
> Create or expand compressed files in a secure xip archive. > Create or expand compressed files in a secure xip archive.
> Only archives signed by Apple are trusted, so this tool should not be used to create archives. > Only archives signed by Apple are trusted, so this tool should not be used to create archives.
> More information: <https://www.manpagez.com/man/1/xip/>.
- Expand the archive into the current working directory: - Expand the archive into the current working directory:

View file

@ -9,4 +9,4 @@
- Pass a value to a parameter in the stylesheet: - Pass a value to a parameter in the stylesheet:
`xsltproc --output {{output.html}} --stringparam {{name}} {{value}} {{stylesheet.xslt}} {{xmlfile.xml}}` `xsltproc --output {{output.html}} --stringparam "{{name}}" "{{value}}" {{stylesheet.xslt}} {{xmlfile.xml}}`

View file

@ -1,6 +1,7 @@
# yaa # yaa
> Create and manipulate YAA archives. > Create and manipulate YAA archives.
> More information: <https://www.manpagez.com/man/1/yaa/>.
- Create an archive from a directory: - Create an archive from a directory: