cent os打开命令行_在OS X上从命令行打开文件

cent os打开命令行

I'm as much of a fan of application UIs as anyone else but I'm finding myself working more and more from the command line lately.  Much of that is becoming obsessed with media manipulation but I'm forcing myself to use less UIs so that I can understand what's under the hood of my favorite utilities.

我和其他任何人一样都非常喜欢应用程序UI,但是最近我发现自己在命令行中工作的越来越多。 其中的大部分内容都变得迷恋于媒体操作,但是我强迫自己减少使用UI,这样我才能了解我最喜欢的实用程序的内幕。

One common case for running any app is opening an existing file, like an HTML file in a browser or a document in Pages.  To open a file on Mac OS X from the command line, type the following:

运行任何应用程序的一种常见情况是打开现有文件,例如浏览器中HTML文件或Pages中的文档。 要从命令行在Mac OS X上打开文件,请键入以下内容:


open portrait.png


The above does not specify an app to open the given file in -- the default app for that file type will be used.  To open a file in a specific app, use the -a argument:

上面没有指定用于打开给定文件的应用程序-将使用该文件类型的默认应用程序。 要在特定应用中打开文件,请使用-a参数:


open -a /Applications/Firefox.app portrait.png


You can also open a URL directly from the command line:

您也可以直接从命令行打开URL:


open https://davidwalsh.name/


You'd expect opening a file from command line to be easy and I'm happy to confirm to you that it is.

您希望从命令行打开文件很容易,我很高兴向您确认它是。

翻译自: https://davidwalsh.name/open-command-line

cent os打开命令行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值