open <name...>

Open files, apps, or URLs using default application

Arguments

NameDescription
namefilepaths, folders

Options

NameDescription
-a <Application>Specify the application to use for opening the file
-b <Bundle Identifier>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 <partial SDK name>For -h, the SDK to use; if supplied, only SDKs whose names contain the argument value are searched
-u, --url <URL>Open this URL, even if it matches exactly a filepath
-i, --stdin <PATH>Launches the application with stdin connected to PATH; defaults to /dev/null
-o, --stdout <PATH>Launches the application with /dev/stdout connected to PATH
--stderr <PATH>Launches the application with /dev/stderr connected to PATH
--env <VAR>
  • Repeatable ♾
--args <Arguments...>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