Linux command
open 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Open file with default app
open [file]
Open URL in browser
open [https://example.com]
Open with specific app
open -a [Safari] [file.html]
Open directory in Finder
open [directory]
Open current directory
open .
Reveal in Finder
open -R [file]
说明
open opens files and URLs on macOS. Uses default or specified applications. The command launches applications with files. macOS specific utility.
参数
- -a _APP_
- Open with application.
- -e
- Open in TextEdit.
- -t
- Open in default text editor.
- -R
- Reveal in Finder.
- -n
- Open new instance.
- --help
- Display help information.
FAQ
What is the open command used for?
open opens files and URLs on macOS. Uses default or specified applications. The command launches applications with files. macOS specific utility.
How do I run a basic open example?
Run `open [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a _APP_ do in open?
Open with application.