Xcode Command Line Tools命令

2020-07-01  本文已影响0人  悄然林静

xcode-select使用说明

Usage: xcode-select [options]

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example, 
xcodebuild) as well as the BSD development commands (such as cc and make).

Options:
  -h, --help                  print this help message and exit
  -p, --print-path            print the path of the active developer directory
  -s <path>, --switch <path>  set the path for the active developer directory
  --install                   open a dialog for installation of the command line developer tools
  -v, --version               print the xcode-select version
  -r, --reset                 reset to the default command line tools path

xcode-select -v
xcode-select --version
sudo xcode-select --install
sudo xcode-select -r
sudo xcode-select --reset

更新

usage: softwareupdate <cmd> [<args> ...]

** Manage Updates:
    -l | --list     List all appropriate update labels (options:  --no-scan, --product-types)
    -d | --download     Download Only
    -e | --cancel-download      Cancel a download
    -i | --install      Install
        <label> ... specific updates
        -a | --all      All appropriate updates
        -R | --restart      Automatically restart (or shut down) if required to complete installation.
        -r | --recommended  Only recommended updates
    --fetch-full-installer      Install the latest macOS Installer
        --full-installer-version    The version of macOS to install. Ex: --full-installer-version 10.15
    --background        Trigger a background scan and update operation
    --ignore <label> ...    Ignore specific updates
    --reset-ignored     Clear all ignored updates

** Other Tools:
    --dump-state        Log the internal state of the SU daemon to /var/log/install.log
    --evaluate-products Evaluate a list of product keys specified by the --products option 
    --history       Show the install history.  By default, only displays updates installed by softwareupdate.  
    --all           Include all processes in history (including App installs) 

** Options:
    --no-scan       Do not scan when listing or installing updates (use available updates previously scanned)
    --product-types <type>      Limit a scan to a particular product type only - ignoring all others
        Ex:  --product-types macOS  || --product-types macOS,Safari 
    --products      A comma-separated (no spaces) list of product keys to operate on. 
    --force         Force an operation to complete.  Use with --background to trigger a background scan regardless of "Automatically check" pref 

    --verbose       Enable verbose output
    --help          Print this help

softwareupdate --list  // 查看可用更新
softwareupdate --install -a  // 安装所有更新
softwareupdate --install <product name>  // 仅安装某项更新
上一篇 下一篇

猜你喜欢

热点阅读