Find and delete all .DS_Store files with a single command
If you are a Mac OS X user, you are no stranger to the '.DS_Store' file. The .DS_Store file is automatically generated by the system every time you open a folder.
What the ".DS_Store" file does is to store the folder properties, such as the location of the icon or the selection of wallpaper, so in the next time you open a folder. , it will remain the same as the previous version.
By default, the '.DS_Store' file is hidden, and most of these files do not affect the system. However, when you compress a folder and send it to a friend (used on another operating system) or upload a folder to the server, you will encounter some problems.
If you want to quickly delete all the '.DS_Store' files in a folder, you can refer to the following article of Network Administrator.
If you want to quickly delete all the '.DS_Store' files in a directory, you only need to use one command below:
Note:
The following command works on Linux.
1. Open your Mac OS X computer Terminal.
2. Next enter the following statement into the Terminal window:
find / path / to-folder (-name '.DS_Store') -delete
Replace '/ path / to / folder' with the directory path, such as "/ var / www / html".
In the above statement, use the find command to search for a specific directory containing the ".DS_Store" file and delete these files when detected.
From now on you can easily delete all ".DS_Store" files before sharing the folder to other users.
Refer to some of the following articles:
- 7 commands to manipulate the most basic files and folders everyone must know
- These "hack" tips are only Notepad can do
- Summary of how to fix errors without downloading files, not accessing YouTube and Not Responding errors on Chrome browser
Good luck!
You should read it
- What is a BBS file?
- What file is M4A? How to open, edit and convert M4A files
- How to completely delete a file in Linux so that it cannot be restored
- How to Delete DLL Files
- How to Delete a File Using Command Prompt
- ES File Explorer file management application disappears from Play Store, caused by DO Global scandal?
- What is Hiberfil.sys? How to delete Hiberfil.sys?
- How to Delete a File or Folder Showing Error 'Access Is Denied'
May be interested
- The Easiest Ways to Find Large Files on Windowsa quick and effective solution is to identify and delete large, space-consuming files that are hiding on your computer.
- The command bootcfg delete in Windowsthe bootcfg delete command deletes the operating system entry in the [operating systems] section of the boot.ini file. the command applies to: windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012.
- How to Create and Delete Files and Directories from Windows Command Promptthis wikihow teaches you how to use the windows command prompt to create and delete files and folders (also known as directories). the files you create at the prompt can be modified and managed with windows apps, including file manager and...
- How to Delete Read-Only Files on Linuxthere are several ways to help you delete files read-only on linux. if it's a file you own, you can change the file permissions or use the sudo command to delete the original file. however, if you cannot delete files with write permissions (or see a 'read only file system' error message), you need to change the drive with the appropriate permissions. this article will show you how to delete read-only files on any linux distribution, including ubuntu and linux mint.
- 10 useful commands in Windows you should knowcommand prompt is used to execute batch files, perform tasks quickly, help you troubleshoot and solve some windows problems when the system crashes. however, not all commands in windows are useful and must be done regularly. with the 10 command lines in the following article it is very useful even if you are not an administrator.
- How to completely delete a file in Linux so that it cannot be restoredin linux, files can be deleted but can still be recovered. these are things to do when you really want them to disappear.
- Fc command in Windowsthe fc command compares two files or a collection of files and displays the differences between them.
- How to Delete a File Using Command Promptthis wikihow teaches you how to delete a file from your pc's desktop by using a command in command prompt. locate your file. if you know where the file is, you can navigate to it by simply opening the appropriate folder. for example, if...
- How to fix Windows file system errors with a single commandwhen you install windows on your computer, it will put a lot of important files into your system that you may not know or use. however, when they fail, it will cause many problems for your computer. let us find a way to fix it!
- Comp command in Windowsthe comp command compares the content of two files or gathers files in bytes. if used without parameters, the comp command will prompt you to enter files for comparison.