What are '.DS_Store' Files on Mac?
If you are a Mac user you may have noticed that most of the folders you open have a '.DS_Store' file stored inside. By default, this file is marked as hidden, but you will always see it if you have configured Mac to show hidden files. But what exactly are '.DS_Store' files and why are they so common?
Let's start with the fact that these files take a minimum amount of disk space, just a few kilobytes each. Removing them is not necessary since it does nothing for you. Furthermore, it is not recommended to remove them since their purpose is to tell your Mac how it should display the folder you are currently viewing. It contains important information regarding:
- Icon positions.
- Last used window size and shape.
- Last used window position.
- File sorting order.
Keep in mind that removing the '.DS_Store' files is not dangerous either – it may simply cause the folder you removed it from to show in its default state the next time you open it. Another reason why doing this is pointless is because the '.DS_Store' file again the next time you view the folder – this is a meaningless battle that you are not winning. If you insist on deleting '.DS_Store' files, then here's how to do it:
- Open Applications -> Utilities -> Terminal.
- Use the 'cd' command to access the file where the '.DS_Store' file is saved. For example, 'cd /Users/myuser/folder'
- Execute the command 'find . -name '.DS_Store' -type f –delete'