Files
tldr/pages.zh/osx/open.md
2019-03-15 11:47:29 +00:00

28 lines
632 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# open
> 打开文件、目录和应用程序.
- 使用系统关联的应用程序打开文件:
`open {{文件.扩展名}}`
- 运行图形化的 MacOS 应用程序:
`open -a {{应用程序名}}`
- 运行指定 包名 的图形化MacOS应用程序请参阅`OSascript`命令,查询如何获取应用程序的 包名):
`open -b {{com.domain.application应用程序包名}}`
- 在"访达(finder)"中打开当前文件夹:
`open .`
- 打开"访达(finder)",并且给出指定文件:
`open -R {{文件路径}}`
- 使用系统默认应用程序,打开当前目录中所有给定扩展名的文件:
`open {{*.扩展名}}`