Most active commenters

    ←back to thread

    700 points yen223 | 13 comments | | HN request time: 0.864s | source | bottom
    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 #
    1. 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 #
    2. ssttoo ◴[] No.42064242[source]
    `open .` works for me too
    replies(1): >>42064415 #
    3. hk1337 ◴[] No.42064415[source]
    Yeah, I scrolled a bit and noticed that. Never thought about using just that.
    4. 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 #
    5. fragmede ◴[] No.42065896[source]
    you can just

        open .
    
    unless you've reconfigured something else to open directories, which most people haven't.
    6. ilyagr ◴[] No.42066681[source]
    You can also `open -R file` to select that file in Finder.
    7. nutrie ◴[] No.42066866[source]
    Actually, .DS_Store is very Apple indeed (not that I care much).
    8. dwaite ◴[] No.42068694[source]
    The .DS_Store files are not Finder specific; Apple treats everything as a file (including folders), and it exists to supply folders and the files within them with metadata.

    It is just the first time the .DS_Store file is needed is often when the folder is touched by Finder.

    9. codazoda ◴[] No.42068780[source]
    .DS_Store is also a bug. I’m not sure why it hasn’t been fixed. It’s history is quite interesting but I don’t recall where I read about it.
    replies(1): >>42068834 #
    10. mdean ◴[] No.42068834{3}[source]
    https://www.arno.org/on-the-origins-of-ds-store linked from original Hacker News thread: https://news.ycombinator.com/item?id=40870357
    11. 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 #
    12. vbezhenar ◴[] No.42070634{3}[source]
    There are extended attributes which could be used for this task.
    replies(1): >>42072538 #
    13. seec ◴[] No.42072538{4}[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...