简体   繁体   中英

Open file in containing folder for linux?

I want to open the file browser on the folder containing the file with the focus/highlight on the file

For Windows, it's:

explorer.exe /select,C:\some path\some file.txt

For Mac:

open -R \some path\some file.txt

What is the equivalent for linux?

When supported, dbus can provide that feature witrh this command line:

dbus-send --print-reply --dest=org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems array:string:"file:///some path/some file" string:""

This feature is implemented in many file managers but maybe not all

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM