←back to thread

700 points yen223 | 1 comments | | HN request time: 0.209s | 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 #
alsetmusic ◴[] No.42062814[source]
Also, `cd .` to open the current directory in a Finder window.

Not mine (found online years ago), but here's the opposite. `cd` into the frontmost Finder window:

  cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')";
replies(2): >>42062836 #>>42064862 #
sneak ◴[] No.42064862[source]
You can also just drag the proxy icon onto the terminal window for its path, ie “cd “ <drop>, enter.
replies(1): >>42065539 #
1. kstrauser ◴[] No.42065539[source]
I use that all the time. You can also cmd-c copy a file in Finder then paste into the terminal to get its path.