Hacker News new | past | comments | ask | show | jobs | submit | slmjkdbtl's comments login

I remember there used to ways to turn off the creation of .DS_Store but they removed it, I can't figure out for life why they would make such a change. I had to write a program [0] to watch the entire file system and delete .DS_Store as soon as they're created.

[0] https://github.com/slmjkdbtl/dskill


You can turn it off for network volumes:

  defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
https://support.apple.com/en-us/102064

I don't recall there ever being a way to turn it off for local volumes.


I set up my samba config to veto .DS_Store files, which also seems to work (although not sure if it creates more overhead as MacOS tries to recreate it each time...)

Is it also possible to do this for removable media?

It seems to be the first time I'm seeing Apple themselves officially recommending a "defaults write" command.


Not sure if this still works, but:

  defaults write com.apple.desktopservices DSDontWriteUSBStores -bool TRUE
Re: defaults:

https://support.apple.com/guide/terminal/edit-property-lists...


There was https://github.com/binaryage/asepsis but Apple broke it IIRC.

It was a hack, not anything Apple ever supported:

> At core Asepsis provides a dynamic library DesktopServicesPrivWrapper which gets loaded into every process linking against DesktopServicesPriv.framework. It interposes some libc calls used by DesktopServicesPriv to access .DS_Store files. Interposed functions detect paths talking about .DS_Store files and redirect them into a special prefix folder. This seems to be transparent to DesktopServicesPriv.

> Additionally Asepsis implements a system-wide daemon asepsisd whose purpose is to monitor system-wide folder renames (or deletes) and mirror those operations in the prefix folder. This is probably the best we can do. This way you don’t lose your settings after renaming folders because rename is also executed on folder structure in the prefix directory.

Unsurprisingly, you can no longer do anything like this with SIP. If you're willing to disable SIP, there are forks of the project that apparently still work.


I apple really made a mess when they started adding .<stuff> in the root of a filesystem and never cleaned it up.

I can see after .DS_Store was allowed, it was no problem for other engineers to approve .fseventsd or .Spotlight-V100 or other nonsense that has cropped up over the years.

And I can't tell you how many filesystems I've had "corrupted" with these sorts of files.

Mostly SD cards, usb flash drives, but occasionally something horrible.

for these kinds of things I usually run:

  rm -rf .DS_Store .Trashes ._.Trashes .fseventsd .Spotlight-V100
and quickly eject the drive before something else is written.

If you've had a disk that is going bad and you need to copy stuff off of it, the LAST thing you want is to index the whole thing and start writing to it.

seriously, there should be a setting.


find / -name ".DS_Store" -exec rm {} \; 2>/dev/null

Put that in a script and add it to your crontab.


That's gonna be incredibly slow on most developer machines. node_modules, __pycache__, Cargo target/ folders, Yocto build folders, .git folders, etc etc etc -- all my machines which are ever used for development end up with such a gargantuan amount of small files across the filesystem that any operation which involves iterating through all of them takes forever.

Besides, there are .DS_Store I really don't wanna delete. Notably, there are git repos which have erroneously committed .DS_Store files; I don't wanna make those repos dirty by deleting them.


Cool. This was a response to ops github repo which does the same as the command I commented with. Your use case is different.

That doesn't seem to be true? Looking at the C source code, it seems to be using fsevents to delete .DS_Store files when they're created, not periodically scan every single file on the system to delete .DS_Store files

Ah ok. Thanks for pointing that out.

-delete is faster

Even better!

> github.com/slmjkdbtl/dskill

You have a good coding style.


Why? I just ignore them.

Google sent a copyright violation notice for each .DS_Store anyone at my company uploaded to Drive for nearly a year (yes, many support tickets were filed).

It wasn't Apple's fault, but it still would have been nice if there was a way to turn them off.


That's scary considering how willingly they'll shutdown accounts for tripping their automated copyright violation service.

For sure! I made sure to have an open ticket with them until it was resolved so I'd have someone to call if some other automated system decided to shut down our services for it.

Why? Somehow DS_Store is claimed as a copyrighted file?

White noise was claimed on YouTube[0].

When is someone going to copyright .gitignore? You could register gitignore.me right now! Fame, riches, lunch with Myhrvold[1][2]!

[0]: https://www.bbc.com/news/technology-42580523

[1]: https://en.wikipedia.org/wiki/Intellectual_Ventures

[2]: https://www.amazon.com/Modernist-Cuisine-Science-Stainless-S...


The process likely went something like this:

1. Pirates uploaded a folder full of copyrighted files to Google Drive, accidentally including some DS_Store files along with the actual media.

2. The copyright owner filed a DMCA takedown on the whole folder, accidentally claiming ownership of a bunch of generic DS_Store files.

3. The above two steps have likely happened many times, not just once.

4. Google's takedown system now automatically flags DS_Store files as having multiple copyright violations.

5. A Google employee might be able to whitelist a user's individual DS_Store files to temporarily suppress the violation on their account, but since they can appear in different folders with different data and are constantly receiving new copyright claims, their system likely errs on the side of caution and continues to flag them as copyright violations so that Google doesn't accidentally lose its safe harbor protections.

In theory, a Google engineer could code in a special case to avoid this problem, but good luck finding and talking to one who's authorized to do so; Google is notorious for having one of the lowest employee;revenue ratios in the world and writing useless FAQs instead of having a proper support channel for when things go wrong.


> In theory, a Google engineer could code in a special case to avoid this problem

And then in this alternate universe, pirates start naming all of their files ".DS_Store"!


That's a good question. I get the impression the system is fairly opaque even to the people working there. I was told it was "resolved" and had my ticket closed a bunch of times, only to have another 30+ copyright violation emails the next time someone uploaded a batch of files from MacOS.

If the person who finally managed to figure it out ends to reading this, thanks for the resolution :)


Holy cow, that’s crazy!

Missing Stair effect - ignoring a problem does make everything progressively worse for everyone because the problems pile up.

That’s the easy solution. But some people are absolute control freaks and would rather go nuts about a hidden file than actually spend their energy creating things. Very telling.

Some people can't.

It takes less than the time to write this comment to check the code and see Bun is not a wrapper over Node


Good to hear. I did not have time to go inspecting the code, with all the shiny tools that scream for me to try them, only to fall over. I think it's a gotcha to run a script with another runtime than the one I launched from the terminal, though.

But I really want to have explore alternatives to Noe, so I will give Bun a new look soon.


A breath of fresh air when there's no "AI" mentioned in a product launch


but JS is the only answer to client side interactivity without hacks, there's nothing to be convinced


On macOS there's also Meta[0] which I found better than mp3tag.

You can also always use builtin Music.app for organization + tagging. I've been using it (or iTunes before) to manage my local music library for 10 years now and it's the best thing of my life, a big plus is I can also sync my library to my iPhone (altho the software quality downgraded a lot since the Big Sur rewrite). I also wonder if there's a cross platform alternative: a good tagger + a good player / organizer + easy to sync to phone + a good player on phone

[0] https://www.nightbirdsevolve.com/meta/


I've been using wezterm for a long time now, feels very light but very powerful and great customizability.


My only problem with all thing plain text is I need cross-platform sync cuz I write on both my phone and laptop. For these I use Simplenote which has served me super well, but still looking for solutions where I can actually write plain text "files" while have convenient syncing.


These are orthogonal problems.

As neighbor poster mentioned, you can use eg Syncthing to sync your plain text files.


> These are orthogonal problems.

Yes and no. Non-plaintext formats can choose to integrate CRDTs or Operational Transform or such to improve sync.

(And, the other way around, plaintext formats are more suitable for long-term history in version control.)


Nextcloud Notes is what I use.


SyncThing. Even on iOS.


I find most ergonomic to write file manager as a vim plugin, I can just open things directly as buffers, only need to hit one key to toggle between file editor and file manager.


How would you prefer it? I think the default styles (on chrome) are just enough, looks consistent with the rest of the default HTML styles.


I think people mainly think TempleOS as an artistic achievement more than technical


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: