Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
终端下打开文件,仿MAC下start命令
社区开发
1547
views ·
3
replies ·
To
floor
Go
karmapa
deepin
2018-04-18 19:45
Author
#!/bin/sh
dde-file-manager -n $1 >/dev/null 2>&1 &
if [ -f "$1" ]; then
PID=$!
sleep 2
kill $PID
fi
Copy the Code
保存到 /usr/bin/start, 之后在终端环境下就能方便打开文件 / 打开目录。
eg,
start . 打开当前目录
start test.jpg 打开图片
Reply
Like 0
Favorite
View the author
All Replies
woodelf
deepin
2018-04-18 20:23
#1
xdg-open了解一下?
Reply
Like 0
View the author
karmapa
deepin
2018-04-18 21:13
#2
https://bbs.deepin.org/post/155515
xdg-open了解一下?
学习,没找到这条命令 -_-
Reply
Like 0
View the author
要讲武德
deepin
2018-04-18 22:54
#3
这个功能非常实用, 上次我提了建议老王已经做了 , 但是好像一直没推送?
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
How to fix grub boot menu that has disappeared?
Looking Deepin ci 25.2.0 Developer/Unstable repositories
Popular Events
More
保存到 /usr/bin/start, 之后在终端环境下就能方便打开文件 / 打开目录。
eg,
start . 打开当前目录
start test.jpg 打开图片