.Ds_Store( Desktop Services Store ) 파일은 (Desktop Services Store)Finder 앱(Finder app) 을 통해 폴더를 탐색할 때마다 macOS가 자동으로 생성하는 Mac 운영 체제에 숨겨진 정보 파일 입니다.
파일은 각 폴더에 대해 생성되며 OS가 관련 시스템 구성 메타데이터와 함께 폴더를 여는 방법을 제어하는 정보를 포함합니다. 데이터에는 배경 이미지, 아이콘의 크기 또는 방향, 폴더를 열 때 표시하는 방법 등이 포함됩니다.

DS_Store 파일은 유해합니까?(Are DS_Store Files Harmful?)
다른 Mac 사용자로부터 받은 아카이브에서 (Mac)DS_store 파일을 찾을 수 있지만 폴더에 있는 동안에는 해를 끼치지 않습니다.

DS_Store 파일은 일반적으로 보기에서 숨겨져 있지만 숨김 파일 설정을 활성화하고 파일을 볼 수 있습니다.
- 숨김 파일을 활성화하려면 이동(Go) > 컴퓨터(Computer) 를 선택한 다음 Macintosh HD 를 선택 하여 섹션을 확장합니다.

- Command + Shift + 를 선택 합니다. (.)(마침표 키). 회색으로 표시된 파일은 일반적으로 Mac 에 있는 숨겨진 파일입니다 .

그러나 다른 파일과 함께 DS_Store 파일을 (DS_Store)Mac 에 업로드하면 파일 속성 또는 (Mac)Mac 의 파일에 대한 메타데이터와 같은 정보를 가져오는 데 파일이 오용될 수 있습니다 . 잠재적으로 해커가 악의적으로 행동하고 개인 파일을 볼 수 있습니다.
DS_Store 파일을 삭제하는 방법(How to Delete a DS_Store File)
다음은 폴더에서 많은 공간을 차지하지 않거나 해를 끼치지 않는 경우에도 DS_Store 파일 을 삭제하려는 몇 가지 이유 입니다.
- 폴더를 열려고 할 때마다 Finder 가 작동합니다.(Finder)
- 손상된 DS_Store 파일은 보기 옵션을 변경하고 폴더 내에서 파일 아이콘을 보거나 정렬하기 어렵게 만들 수 있습니다. 폴더가 즉시 닫히면 DS_Store 파일이 손상되었다는 신호입니다.
- DS_Store 파일 을 삭제하여 디스플레이 기본 설정을 재설정합니다 . 특정 폴더에 대한 사용자 정의 Finder(Finder) 보기 설정을 잃게 되지만 언제든지 폴더의 보기 옵션이나 설정을 변경할 수 있습니다.
- Mac 에서 다른 시스템 으로 컴퓨터 간에 파일을 전송하는(transferring files between computers) 경우 DS_Store 파일 로 인해 예상치 못한 문제가 발생할 수 있습니다.

DS_Store 파일 에 직면한 문제를 해결하는 몇 가지 빠른 방법 은 다음과 같습니다.
- (Open DS_Store)Windows 와 같은 비 macOS 시스템에서 적절한 응용 프로그램으로 DS_Store 파일을 엽니 다 . Windows 에서 (Windows)DS_Store 파일 을 여는 데 사용할 수 있는 일부 도구 에는 WinRAR , Adobe Acrobat 및 무료 파일 뷰어(Free File Viewer) 가 있습니다.
- DS_Store 파일이 손상되었거나 바이러스 또는 맬웨어에 감염되지 않았는지 확인합니다 . Mac용 최고의 바이러스 백신 옵션을(best antivirus options for Mac) 사용하여 맬웨어 검사를 실행하고 잠재적인 위협이 있는지 확인할 수 있습니다.
DS_Store 파일 을 삭제할 때 데이터가 손실되지 않습니다 . 그러나 폴더 기본 설정이 변경되면 Finder 는 사용자 정의 보기 설정을 저장할 새 DS_Store 를 생성합니다.(DS_Store)
DS_Store 파일 을 삭제하는 방법을 알려드리겠습니다 .
- 특정 폴더의 경우
- 터미널(Terminal) 응용 프로그램 을 통해 Mac 에 있는 여러 폴더의 경우
특정 폴더에 대한 DS_Store 파일을 삭제하는 방법(How to Delete a DS_Store File for a Specific Folder)
다음 단계를 사용(Use) 하여 특정 폴더에서 DS_Store 파일 을 삭제하십시오 .
- 이동(Go) > 유틸리티(Utilities) > 터미널(Terminal) 을 선택 합니다 .
참고(Note) : 관리자로 로그인하지 않은 경우 터미널 앱에 액세스하고 (Terminal)DS_Store 파일 을 삭제하는 데 필요한 명령을 사용하기 위해 이름과 암호를 입력하라는 메시지가 표시될 수 있습니다.

- 폴더를 찾아 삭제할 DS_Store(DS_Store) 파일이 포함된 폴더로 디렉터리를 변경합니다 . 예를 들어 폴더가 데스크탑에 있는 경우 cd 데스크탑(cd desktop) 명령을 사용하고 Enter 키(Enter) 를 누릅니다 .

- 찾기를 입력 합니다. –name '.DS_Store' –(find . –name ‘.DS_Store’ –type f –delete ) 현재 디렉토리에 있는 모든 DS_Store 파일 을 삭제하려면 f –delete를 입력하고 Enter 키를 누릅니다 .
참고(Note) : 명령을 의도한 대로 정확하게 입력했는지 확인하십시오. 그렇지 않으면 Mac 에서 다른 중요한 파일이 삭제될 수 있습니다 .

- 확인 을 선택 합니다(OK) . 선택한 폴더의 .DS_Store 파일이 삭제됩니다.

참고(Note) : 터미널은 입력한 명령이 작동하지 않는 경우에만 메시지를 보냅니다.
여러 폴더에 대한 DS_Store 파일을 삭제하는 방법(How to Delete a DS_Store File for Multiple Folders)
Mac 에서 모든 (Mac)DS_Store 파일 을 삭제 하려면 다음 단계를 따르세요.
- 이동(Go) > 유틸리티(Utilities) > 터미널(Terminal) 을 선택 합니다 .

- 터미널(Terminal) 창 에 다음 명령을 입력합니다 . sudo find / -name “.DS_Store” -depth -exec rm {} \; Enter 키(Enter) 를 누릅니다 .

- 메시지가 표시되면 암호를(password,) 입력합니다 . DS_Store 파일 은 모든 폴더에서 삭제됩니다.

참고(Note) : 앱은 입력한 명령이 작동하지 않는 경우에만 메시지를 반환합니다.
DS_Store 파일의 자동 생성을 방지하는 방법(How to Prevent Automatic Creation of DS_Store Files)
서버에 임의의 폴더가 있는 경우 해커는 (hackers may get access)DS_Store 파일에 액세스 하고 파일에 대한 속성 또는 메타데이터를 보고 악의적으로 행동할 수 있습니다.
이 문제를 해결하고 DS_Store 파일을 통한 보안 침해를 방지하는 가장 좋은 방법 은 DS_Store(DS_Store) 파일 의 (prevent security breaches)자동(DS_Store) 생성을 비활성화하는 것 입니다. 방법은 다음과 같습니다.
- 이동(Go) > 유틸리티(Utilities) > 터미널(Terminal) 을 선택 합니다 .
- 기본값 write com.apple.desktopservices DSDontWriteNetworkStores true(defaults write com.apple.desktopservices DSDontWriteNetworkStores true ) 를 입력 하고 Enter 키를 누릅니다 . 이 명령을 반대로 하려면 같은 명령을 사용하되 true 를 false 로 변경하십시오 .

- Mac을 재시동하십시오.
주기적으로 .DS_Store 파일을 자동으로 삭제하는 방법 (How to Automatically Delete .DS_Store Files Periodically )
DS_Store 파일을 수동으로 계속 삭제하지 않으려면 UNIX 명령을 사용하여 정기적으로 파일을 자동으로 제거할 수 있습니다. 방법은 다음과 같습니다.
- 이동(Go) > 유틸리티(Utilities) > 터미널(Terminal) 을 선택 합니다 .
- 터미널(Terminal) 에 이 명령을 입력하거나 붙여넣습니다 . sudo crontab -e 및 Return 키를 누릅니다.

- 메시지가 표시되면 관리자 암호(administrator password) 를 입력합니다 .

- vim 편집기에서 키보드의 i 를 한 번 누릅니다. 그런 다음 다음 명령을 입력하거나 붙여넣습니다. 30 10 * * * root find / -name “.DS_Store” -depth -exec rm {} \;

참고(Note) : crontab 항목의 형식은 <Minute> <Hour> <DayOfMonth> <Month> <DayOfWeek> <User Command> 입니다. 이 예에서 시스템은 매일 오전 10시 30분에 자동으로 명령을 실행하도록 설정되어 있습니다. 다른 값을 사용하여 다른 시간에 대한 명령을 구성할 수 있으며 명령은 Mac 이 켜져 있거나 잠자기 모드(Sleep mode) 에 있는지에 관계없이 실행됩니다 .
- 키보드에서 Esc 키를 한 번 누른 다음 Shift + Z + Z 를 동시에 눌러 crontab 항목을 저장합니다.

Mac에서 DS_Store 파일 제거(Remove DS_Store Files from Your Mac)
대부분의 Mac 사용자는 (Mac)DS_Store 파일이 있다는 사실을 모릅니다. 이러한 보이지 않는 파일 은 (invisible files)Mac 의 시스템 폴더에 있으며 이 가이드에 설명된 단계를 사용하여 파일을 제거하거나 파일 생성을 비활성화할 수 있습니다.
아래에 의견을 남기고 이 가이드가 Mac 에서 (Mac)DS_Store 파일을 제거하는 데 도움이 되었는지 알려주십시오 .
What Is a DS_Store File and How to Remove It
A .Ds_Store (Desktop Services Store) file is an information file hidden on your Mac’s operating system that the macOS creates automatically whenever you browse a folder through the Finder app.
The file is created for each folder and contains information that controls how the OS will open the folder with the associated system configuration metadata. The data includes background images, size or orientation of the icons, how to display folders when you open them, etc.

Are DS_Store Files Harmful?
You can find DS_store files in archives received from other Mac users but don’t cause any harm while they’re in a folder.

DS_Store files are usually hidden from view, but you can enable the hidden files setting and view the files.
- To enable hidden files, select Go > Computer and then select Macintosh HD to expand the section.

- Select Command + Shift + . (the period key). The grayed out files you see are typically the hidden files in your Mac.

However, if you upload a DS_Store file along with other files to your Mac, there’s a chance they can be misused to get information like file attributes or metadata about the files on your Mac. It could potentially allow hackers to act maliciously and view your private files.
How to Delete a DS_Store File
Here are a few reasons why you’d want to delete a DS_Store file, even if it doesn’t take up much space in a folder or cause any harm:
- When Finder acts up each time you try to open a folder.
- Corrupted DS_Store files can make it hard for you to change view options and see or sort file icons within the folder. When a folder closes immediately, it’s a sign of a corrupted DS_Store file.
- To reset your display preferences by deleting a DS_Store file. You will lose custom Finder view settings for the particular folder, but you can always change the folder’s view options or settings.
- If you’re transferring files between computers, like from your Mac to another system, you may encounter some unexpected problems caused by DS_Store files.

Some quick ways to resolve any problems you face with DS_Store files include:
- Open DS_Store files with suitable applications on non-macOS systems like Windows. Some tools you can use to open DS_Store files in Windows include WinRAR, Adobe Acrobat, and Free File Viewer.
- Ensuring your DS_Store file isn’t corrupted or infected with a virus or malware. You can run a malware scan using the best antivirus options for Mac and check for any potential threats.
You don’t lose any data when deleting a DS_Store file. But, once the folder preferences are changed, Finder will create a new DS_Store to store custom view settings.
We’ll show you how to delete a DS_Store file:
- For a specific folder
- For multiple folders in your Mac through the Terminal application
How to Delete a DS_Store File for a Specific Folder
Use these steps to delete a DS_Store file from a specific folder.
- Select Go > Utilities > Terminal.
Note: If you’re not signed in as an administrator, you may be asked to enter your name and password to access the Terminal app and use the commands needed to delete DS_Store files.

- Locate the folder and change the directory to the folder containing the DS_Store file you want to delete. For example, if the folder is on the desktop, use the cd desktop command and press Enter.

- Type find . –name ‘.DS_Store’ –type f –delete to delete all DS_Store files in the current directory and press Enter.
Note: Make sure you type out the command exactly as intended otherwise you may delete other important files on your Mac.

- Select OK. The .DS_Store files in the folder you selected will be deleted.

Note: Terminal will send a message only if the command you entered didn’t work.
How to Delete a DS_Store File for Multiple Folders
If you want to delete all DS_Store files from your Mac, follow these steps.
- Select Go > Utilities > Terminal.

- Enter this command in the Terminal window: sudo find / -name “.DS_Store” -depth -exec rm {} \; and press Enter.

- Enter your password, if prompted. The DS_Store files will be deleted from all the folders.

Note: The app will return a message only if the command you entered didn’t work.
How to Prevent Automatic Creation of DS_Store Files
If there are random folders on your server, hackers may get access to the DS_Store files, view attributes or metadata about the file, and act maliciously.
The best way to resolve this problem and prevent security breaches through DS_Store files is to disable the automatic creation of DS_Store files. Here’s how.
- Select Go > Utilities > Terminal.
- Type defaults write com.apple.desktopservices DSDontWriteNetworkStores true and press Enter. If you ever want to reverse this command, use the same command but change true to false.

- Restart your Mac.
How to Automatically Delete .DS_Store Files Periodically
If you don’t want to keep deleting DS_Store files the manual way, you can use a UNIX command to automatically remove the files at regular intervals. Here’s how.
- Select Go > Utilities > Terminal.
- Type or paste this command in Terminal: sudo crontab -e and press the Return key.

- If prompted, enter your administrator password.

- In the vim editor, press i on your keyboard once. Then type or paste this command: 30 10 * * * root find / -name “.DS_Store” -depth -exec rm {} \;

Note: The crontab entry is in the following format: <Minute> <Hour> <DayOfMonth> <Month> <DayOfWeek> <User Command>. In our example, the system is set to automatically run the command at 10.30 AM every day. You can use different values to configure the command for a different time and the command will run whether your Mac is on or in Sleep mode.
- Press the Esc key on your keyboard once and then press Shift + Z + Z simultaneously to save the crontab entry.

Remove DS_Store Files from Your Mac
Most Mac users aren’t aware that DS_Store files exist. These invisible files live in the system folders of your Mac, and you can remove them or disable the creation of the files using the steps outlined in this guide.
Leave a comment below and let us know if this guide helped you remove DS_Store files on your Mac.