I know how to open directory, but I do not know how to select a file from the command line.
I do not know how it works, but when I move any file to a directory and then open the directory that this file is selected.
I think it's actually easier than it seems. What I tried is just this:
At first, the file doesn't look to be selected, but that's just because the nautilus window isn't active. If you click on it, you'll see that the file name is selected.
Since I guess you want to have that extra visual feedback, I used
What you should see is that nautilus in opened with using
Note: in this example if sleep is set to a shorter time you might not get the expected result since you need the window to be properly displayed before trying to activate it.
I don't think there's an option to do this. See:
You can open a file as if you had double clicked it in nautilus using the xdg-open command:
If you really wanted to have this specific feature, it would require hacking on the Nautilus code.
When you in an xterm, navigating directories on the command line, and then want to pop up a nautilus window for that directory, do this:
This will open the directory
I like the