bash 从终端的当前目录打开文件夹(Linux Debian)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16403236/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 05:21:50 来源:igfitidea点击:
open folder from terminal's current directory (Linux Debian)
提问by George C
Is there a command in the terminal to open a folder browser (Nautilus, Caja, etc) at the current directory? I.e.
终端中是否有命令在当前目录打开文件夹浏览器(Nautilus、Caja 等)?IE
~/very/long/path/ $ open-folder-command
opens a folder at ~/very/long/path/
在以下位置打开一个文件夹 ~/very/long/path/
Or is there another easy alternative to it?
或者有其他简单的替代方法吗?
回答by Todd A. Jacobs
Use $PWD as Argument to Nautilus
使用 $PWD 作为 Nautilus 的参数
This works fine for me. YMMV with other file managers.
这对我来说很好用。YMMV 与其他文件管理器。
mkdir -p /tmp/foo/bar/baz
cd /tmp/foo/bar/baz
nautilus "$PWD"

