神剑山庄资源网 Design By www.hcban.com
在Ubuntu下,通常用命令行打开文本文件,比如用命令gedit、more、cat、vim、less。但当需要打开其他格式文件时,比如pdf、jpg、mp3格式文件,咱们通常做法是进入到文件所在的目录,双击打开,很影响效率。事实上,可以通过命令xdg-open(opens a file or URL in the user's preferred application)打开这些格式文件,甚至是网页,像打开文件一样简单。
先举两个例子:
复制代码代码如下:
jelline@jelline:~$ xdg-open la_isla_bonita.mp3
jelline@jelline:~$ xdg-open http://baidu.com
jelline@jelline:~$ 已在现有的浏览器会话中创建新的窗口。
xdg-open会选择合适的程序打开指定文件,跟双击打开效果一样。在我电脑,第一个例子会用Totem Movie Player打开,第二个例子会用谷歌浏览器打开,而不是Firefox,这是因为谷歌浏览器是我默认的浏览器。
具体操作如下:
xdg-open { file | URL }
xdg-open { --help | --manual | --version }
OK,现在是不是方便多了,通过快捷键Ctrl+Alt+T可以打开shell,F11可以全屏显示(Alt+F9最小化窗口,Alt+F10最大化/恢复窗口),再辅予xdg-open命令,极大减少了鼠标操作,也大大提升了效率。
附xdg-open manual部分信息:
xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. xdg-open supports file, ftp, http and https URLs.
xdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as root.
先举两个例子:
复制代码代码如下:
jelline@jelline:~$ xdg-open la_isla_bonita.mp3
jelline@jelline:~$ xdg-open http://baidu.com
jelline@jelline:~$ 已在现有的浏览器会话中创建新的窗口。
xdg-open会选择合适的程序打开指定文件,跟双击打开效果一样。在我电脑,第一个例子会用Totem Movie Player打开,第二个例子会用谷歌浏览器打开,而不是Firefox,这是因为谷歌浏览器是我默认的浏览器。
具体操作如下:
xdg-open { file | URL }
xdg-open { --help | --manual | --version }
OK,现在是不是方便多了,通过快捷键Ctrl+Alt+T可以打开shell,F11可以全屏显示(Alt+F9最小化窗口,Alt+F10最大化/恢复窗口),再辅予xdg-open命令,极大减少了鼠标操作,也大大提升了效率。
附xdg-open manual部分信息:
xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. xdg-open supports file, ftp, http and https URLs.
xdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as root.
标签:
命令行,快速打开
神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com
暂无Ubuntu系统下用命令行快速打开各类型文件的方法(xdg-open)的评论...
更新日志
2024年07月01日
2024年07月01日
- 群星2001-大宅门电视剧原声大碟[首版][WAV+CUE]
- 群星2001-芭啦芭啦樱之花电影原声带AVCD[香港首版][WAV+CUE]
- 群星2001-重回摇滚舞台·纪念薛岳逝世十周年演唱会2CD[引进版][WAV+CUE]
- 群星2001-林夕音乐词典2CD[香港首版][WAV+CUE]
- 《101系列 金声回忆 101 蔡琴》[WAV+CUE][3.23GB]
- 《101系列:True Legend 101 陈百强》[WAV+CUE][2.8GB]
- 《陈百强28CD合集》1979-1993 低速原抓[CUE+WAV][8.3G]
- 【蓝调摇滚】JohnHaydock-2024-StraightLineOnACurvedRoad(FLAC)
- 感受独特魅力《百万双钢琴演奏曲》5CD[WAV+CUE]
- 【古典音乐】安娜·莫福《咏叹调》美国版SACD[WAV+CUE]
- 《法拉利·汽车专用试音碟》名贵音响顶级黑胶金碟[CUE+WAV][478M]
- 群星《惠威试音碟5CD》顶级音质[CUE+APE][1.7G]
- 《101系列:百分百3CD 100首百分百经典金曲》[WAV+CUE][2.9GB]
- 群星.2004-《第八届广州国际高级音响展》HIFI珍藏版[APE+CUE]
- 红音堂《蔡琴往事系列》SQCD紫银合金5CD[wav]