open <command...>

Open files, apps, or URLs using default application


commandfilepaths, folders


-a <command>Specify the application to use for opening the file
-b <command>Specify the bundle identifier of the app to use to open the file
-DReveals the enclosing folder in finder
-eOpens the file with /Applications/TextEdit
-tOpen the file with the default text editor
-fRead input from standard input and open the results in the default text editor
-F,--freshOpens the application without restoring windows
-W,--wait-appsWaits until the applications exit
-R,--revealReveals the file(s) in the Finder instead of opening them
-n,--newOpen a new instance of the application(s) even if one is already running
-j,--hideLaunches the app hidden
-g,--backgroundDo not bring the application to the foreground
-h,--headerSearches header locations for a header whose name matches the given string and then opens it
-s <command>For -h, the SDK to use; if supplied, only SDKs whose names contain the argument value are searched
-u,--url <command>Open this URL, even if it matches exactly a filepath
-i,--stdin <command>Launches the application with stdin connected to PATH; defaults to /dev/null
-o,--stdout <command>Launches the application with /dev/stdout connected to PATH
--stderr <command>Launches the application with /dev/stderr connected to PATH
--env <command>
  • Repeatable ♾
--args <command...>All remaining arguments are passed to the opened application in the argv parameter to main(). These arguments are not opened or interpreted by the open tool