tldr/pages/osx/open.md

33 lines
744 B
Markdown
Raw Normal View History

# open
> Opens files, directories and applications.
2022-02-14 11:21:43 +00:00
> More information: <https://ss64.com/osx/open.html>.
- Open a file with the associated application:
2015-12-29 23:43:46 +00:00
`open {{file.ext}}`
- Run a graphical macOS [a]pplication:
2022-02-14 11:21:43 +00:00
`open -a "{{Application}}"`
2017-07-26 22:11:00 +01:00
- Run a graphical macOS app based on the [b]undle identifier (refer to `osascript` for an easy way to get this):
2017-07-26 22:11:00 +01:00
`open -b {{com.domain.application}}`
- Open the current directory in Finder:
`open .`
- [R]eveal a file in Finder:
`open -R {{path/to/file}}`
- Open all the files of a given extension in the current directory with the associated application:
2015-12-29 23:43:46 +00:00
`open {{*.ext}}`
- Open a [n]ew instance of an application specified via [b]undle identifier:
2022-10-28 17:35:02 +01:00
`open -n -b {{com.domain.application}}`