tldr/pages/osx/open.md

28 lines
563 B
Markdown
Raw Normal View History

# open
> Opens files, directories and applications.
- 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:
2017-07-26 22:11:00 +01:00
`open -a {{Application}}`
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}}`