tldr/pages/osx/open.md

29 lines
619 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}}`
2017-07-26 22:11:00 +01:00
- Run a graphical macOS application:
2022-02-14 11:21:43 +00:00
`open -a "{{Application}}"`
2017-07-26 22:11:00 +01:00
2019-10-12 22:32:00 +01:00
- Run a graphical macOS app based on the bundle 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 .`
2019-10-12 22:32:00 +01:00
- Reveal 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}}`