How to prevent Mac OS X from being generated on an external device. Ds_store file? And how to bulk delete. Ds_store file?

Source: Internet
Author: User

How to ProhibitMac OS X is generated on an external device. Ds_store file? And how to bulk delete. Ds_store file?
Original link: http://www.java2class.net/bbs/viewthread.php?tid=254
Background Information
. The Ds_store file (Desktop Services Store) is a hidden file that is stored in each directory, and it holds specific attribute information for this file directory Metadata, size, location, background image, and so on; a bit similar to Windows Thumbs.db, Desktop.ini files on the operating system.

This is not visible in the Finder if the hidden file is not opened in Mac OS X. Ds_store file and won't feel in the way. However, when switching to other operating systems with other machines or USB files, such as the Windows operating system, which also opens the display of hidden files, the hidden files feel particularly redundant, as well as the space-consuming XYZ, and when the files are compressed, Will be included in the compressed file or the like, external devices or SMB, AFP remote network connection and so on.

Workaround
Enter terminal, then execute defaults write Com.apple.desktopservices dsdontwritenetworkstores True, and then log off and then log on or restart Mac OS X directly;
There are multiple users on the machine, all users do so once, or the newly generated com.apple.desktopservices.plist files are copied to the ~/library/preferences directory of each user.

Although this method can prevent Mac OS X from being generated again on the external device. Ds_store files, but the existing files can not be removed by help you also directly deleted, can only be manually buried in bulk Delete, execute the following command:
Find/-name ". Ds_store "-type F-delete

However, the above commands are still not allowed to be generated on the native file system. Ds_store file!!!

For this situation you can use asepsis:http://asepsis.binaryage.com, which will be created. The Ds_store file is redirected to another specified directory, preventing it from being generated in every file directory. Ds_store file, the default directory is/usr/local/.dscage, by executing the asepsisctl clean command to empty the files that are born in the redirected directory.

Implementation Principle
Mac OS x implements a private system framework Desktopservicespriv, which is responsible for creating and manipulating the framework. Ds_store files, the Finder, and other applications also use this framework, and DESKTOPSERVICESPRIV enables > to operate with standard LIBC calls. The Ds_store file is then encapsulated, created, and manipulated by the DESKTOPSERVICESPRI. Ds_store file, add the specified directory as a prefix, you will be in each directory > create one. The operation of the Ds_store file is redirected to a specific directory.

File directory needs concise, so the world is quiet ah!



Related Reference Links:
Http://en.wikipedia.org/wiki/.DS_Store
Http://danilo.ariadoss.com/how-t ...-files-on-mac-os-x/
http://www.chrisnovoa.com/os-x-lion-ds_store-disabling/
http://support.apple.com/kb/HT1629

How to prevent Mac OS X from being generated on an external device. Ds_store file? And how to bulk delete. Ds_store file?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.