←back to thread

700 points yen223 | 2 comments | | HN request time: 0.001s | 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(4): >>42064242 #>>42065860 #>>42065896 #>>42066681 #
nextos ◴[] No.42065860[source]
Finder is pretty good, and it's handy to be able to open it from the terminal. But I find it super annoying it litters everything with .DS_Store files and there is no way to turn that off, except for external and network drives. Aside from, obviously, using a different file manager. Very un-Apple.
replies(4): >>42066866 #>>42068694 #>>42068780 #>>42068957 #
seec ◴[] No.42068957[source]
Well those files are to keep the view/presentation settings.

I guess you could do that centrally with some sort of database but that would open another can of worms; and most importantly you wouldn't be able to transfer a folder and keep its Finder presentation intact.

Nowadays it's not as useful because of the App Store but when software was only released as .dmg images, it became expected to open a nice layout with graphics presenting the app and a shortcut to the App folder that you would drag'n'drop the app bundle to.

This presentation relies of .DS_Store to work.

There are some other use cases like that, it all comes down to a simple fact: Apple has always cared a lot more about how things look than Microsoft ever did, this is a perfect example.

replies(1): >>42070634 #
1. vbezhenar ◴[] No.42070634[source]
There are extended attributes which could be used for this task.
replies(1): >>42072538 #
2. seec ◴[] No.42072538[source]
I don't think xattr works for folders. And you still wouldn't have the fancy presentation you can get with .DS_Store with the graphics and all that jazz.

Of course, they could rethink the whole thing but the point is that it's a legacy thing and at this time it's not worth dedicating much ressource to a solve problem just to remove some mostly invisible files (on UNIXs). It's really easy to have scripts to cleanup for sharing to outside world, even some zip utilities do that automatically.

It can be annoying but it's really not a big deal, I doubt they could come up with something much better while still preserving the functionality and not making another complicated/convoluted proprietary folder format that wouldn't transfer any better to Windows...