命令行打开当前目录文件

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
nexus-s
帖子: 425
注册时间: 2012-05-09 0:06
系统: Ubuntu 16.04.3 LTS

命令行打开当前目录文件

#1

帖子 nexus-s » 2012-11-21 13:32

代码: 全选

$ xdg-open .
$ echo 123>>test.txt
$ xdg-open test.txt
原文:http://www.commandlinefu.com/commands/v ... Line-Fu%29
上次由 nexus-s 在 2012-11-21 13:57,总共编辑 1 次。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 命令行在当前路径打开文件目录

#2

帖子 eexpress » 2012-11-21 13:40

???
不是还有gnome-open?
啥意思?
● 鸣学
头像
nexus-s
帖子: 425
注册时间: 2012-05-09 0:06
系统: Ubuntu 16.04.3 LTS

Re: 命令行打开当前目录文件

#3

帖子 nexus-s » 2012-11-21 13:58

代码: 全选

man xdg-open
XDG-OPEN(1) xdg-open Manual XDG-OPEN(1)

NAME
xdg-open - opens a file or URL in the user's preferred application

SYNOPSIS
xdg-open {file | URL}

xdg-open {--help | --manual | --version}

DESCRIPTION
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.
头像
枫叶饭团
帖子: 14683
注册时间: 2010-06-16 1:05
系统: Mac OS X
来自: Tencent
联系:

Re: 命令行打开当前目录文件

#4

帖子 枫叶饭团 » 2012-11-21 14:59

Orz
头像
qy117121
论坛版主
帖子: 50587
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

Re: 命令行打开当前目录文件

#5

帖子 qy117121 » 2012-11-21 15:05

枫叶饭团 写了:Orz
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

邮箱 [email protected]
头像
YeLee
论坛版主
帖子: 26406
注册时间: 2008-08-13 8:48
系统: Fundu i64
来自: 东海硇州,一双管钥。
联系:

Re: 命令行打开当前目录文件

#6

帖子 YeLee » 2012-11-21 20:05

这不是mime的…… :em20
◎当我站在道德的高度上俯视别人的时候,发现自己是多么渺小。
♥执着但不偏激,反对而不排斥,坚决捍卫矛盾体的存在方式。
★★★天气预报★★★
fcitx-yatable一个可以使用的码表输入法
[教程]几个实例攻克软件编译难关
Gentoo Development Guide
字体相关
头像
秋景雨
帖子: 137
注册时间: 2011-01-31 12:55
联系:

Re: 命令行打开当前目录文件

#7

帖子 秋景雨 » 2012-11-21 21:17

什么是Orz和mime?我用gvfs-open。http://www.qiujingyu.com/replace-gnome- ... -open.html
回复