←back to thread

837 points yen223 | 1 comments | | HN request time: 0.255s | source
Show context
vbezhenar ◴[] No.42058069[source]
Few additions.

open -n file.pdf : opens new instance of Preview application which is useful if you want to open the same file twice (for example to look at different pages at once).

caffeinate -d : prevents display turning off, useful if you want to look at display without moving mouse.

replies(9): >>42058131 #>>42059558 #>>42059666 #>>42060870 #>>42062814 #>>42064032 #>>42068484 #>>42068855 #>>42069659 #
hk1337 ◴[] No.42064032[source]
open -a "Finder" . - open Finder in the current directory.

Standard apps usually just need the name, like Finder and Safari but you can also specify the path "/Applications/DifferentFinder.app"

replies(5): >>42064242 #>>42065860 #>>42065896 #>>42066681 #>>42083045 #
1. luckman212 ◴[] No.42083045[source]
Don't forget about "open -b <bundle_id> foo.txt" for example,

    open -b com.sublimetext.4 file.txt
I prefer this vs using the App Name or Path, since those can vary depending on the system or app version. The bundle ID is more robust.