What is Bud1% @ @ @ @E%DSDB` @ @ @?

后端 未结 3 735
不知归路
不知归路 2021-02-13 17:44

I have made a small app for a client. The app scans a files directory which contains several text files. It then reads each file into a string. Every file has a tit

相关标签:
3条回答
  • 2021-02-13 17:47

    This is information that the Finder (Mac equivalent of Windows Explorer) stores about files and folders. The best description of the format I found was here:

    https://metacpan.org/pod/Mac::Finder::DSStore

    The format is described as:

    The .DS_Store file holds a series of records giving attributes of the files in the directory or of the directory itself (referred to as .). These records are stored in a B-tree, and the pages of the B-tree are stored in the file by a "buddy allocator" along with a small amount of metadata. The allocator also provides a level of indirection, from small integers to file offsets, presumably allowing blocks to be relocated as they grow and shrink.

    0 讨论(0)
  • 2021-02-13 17:56

    OK, I found what it is. One of the Google search results pointed to this Which contains the following:

    Bud1  ... @Ђ @Ђ @Ђ @E DSDB `Ђ @Ђ @Ђ @
    

    Interestingly, the file is a .DS_Store file! I checked a few .DS_Store files and they all contained the mysterious characters. These (hidden) files are generated automatically by Mac OS X. So the client should have accessed the folder from console and caused the creation of the hidden DS_Store (remember it's an intranet).

    0 讨论(0)
  • 2021-02-13 18:09

    For people that is still getting trouble with this in your application (after removing a file in my case), I solved it by removing recursively the .DS_Store files in the project folder.

    On terminal, go to the project:

    cd to/your/directory
    

    And just type:

    find . -name '.DS_Store' -type f -delete
    

    credits to Jon Bellah on his blog https://jonbellah.com/articles/recursively-remove-ds-store/

    0 讨论(0)
提交回复
热议问题