在桌面上显示当前目录的常见Linux命令是什么?

Xah*_*Lee 2 linux emacs shell freedesktop.org

什么是大多数或所有linux上都可用的"开放"命令?

例如在OS X中,我可以在shell中执行

打开.

并且文件夹显示在Finder(即桌面)中.同样,在Windows上命令是"探索".

我问,因为我想在emacs中使用跨平台命令.

(defun open-in-desktop () 
  "Open the current file in desktop. 
Works in Microsoft Windows and Mac OS X." 
  (interactive) 
  (cond 
   ((string-equal system-type "windows-nt") 
    (w32-shell-execute "explore" 
      (replace-regexp-in-string "/" "\\" default-directory t t))) 
   ((string-equal system-type "darwin") (shell-command "open .")) 
   ) ) 
Run Code Online (Sandbox Code Playgroud)

有人建议使用xdg-open,但我不确定这是否仅适用于发行版或gnome/kde.(我不是linux用户)

Fle*_*exo 8

xdg-utils来自freedesktop.org.freedesktop.org项目旨在改善Linux上可用的各种不同桌面环境之间的互操作性.它就像你在Linux上那样可靠的方法.