Explorer /select,C:\MyFolder\MyFile.txt
The above command, when executed on Windows, opens the MyFolder directory and selects (highlights) the file called "MyFile.txt".
I have a Java application which utilizes this command to let users know that a file is important, but I would like to make this feature cross-system compatible. What is the equivalent of this command on Unix operating systems such as Mac OSX and Linux?
For Mac you can use open -R filename
From open's manual:
-R Reveals the file(s) in the Finder instead of opening them.