Let’s make this short: I have a NAS, I use it with Windows, Mac and even Ubuntu, yet that rather rarely, and the only operating system that decides to litter lots of indexing files on my storage is Apple’s offspring. Anybody who’s seen the hidden
.DS_Store directory knows that those tiny files may have negligible size, but their nuisance factor is still present. So, if you were super smart like I am and set up an SSH server on your NAS, you can use the simple bash commands to search and delete all
.DS_Store and associated directories. Using
find . -name ".DS_Store" -print0 | xargs -0 rm -rf
find . -name "._*" -print0 | xargs -0 rm -rf
.DS_Store directories and associated Spotlight folders in your current directory, respectively. Alternatively run
find . \( -name '.DS_Store' -or -name '._*' \) -delete
to achieve the same in one line. Hope this is useful, at least for me it was.