-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
64 lines (49 loc) · 2.9 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
unmac -- Delete spurious Mac files under a directory or volume
Usage:
unmac [OPTIONS] directory ...
Options:
-h, --help Print this help
-v, --verbose Show processing
-p, --pretend Show what would be deleted, but don't do it
-s, --keep-spotlight Do not delete Spotlight data
-f, --keep-fsevents Do not delete Time Machine stuff
-t, --keep-trashes Do not delete volume trashes
-c, --keep-document-revisions Do not delete document revisions
-b, --keep-mobile-backups Do not delete mobile backups
-m, --keep-macosx Do not delete "__MACOSX" directories
-r, --keep-dsstore Do not delete ".DS_Store" files
-d, --keep-apple-double Do not delete "._*" ghost files
-o, --keep-apple-double-orphans Delete "._foo.txt" only if "foo.txt" exists
-i, --keep-custom-folder-icons Do not delete custom folder icons
Description:
When a Mac copies files to volumes that have a different file system it adds
some auxiliary files that represent different kinds of metadata. This typically
happens with memory sticks, network drives, SD cards, etc. Mac archivers like
zip(1) add special files as well, like "__MACOSX", you'll see them
for example if you extract a Zip file like that on Windows.
The purpose of these special files is to let another Mac rebuild the metadata
from them, Spotlight integration, etc. But if you are not interested in these
features your directory or volume just gets cluttered. This utility removes
all those extra files.
What's deleted:
This is just a summary, for more detailed explanations and pointers see the
comments in unmacer.rb:
* Spotlight leaves a folder called ".Spotlight-V100" in the root directory
of volumes.
* Time Machine relies on a folder called ".fseventsd" in the root directory
of volumes.
* A folder called ".Trashes" in the root directory of volumes stores their
trashes. Those ones are taken into account by the Trash in the Dock.
* Document revisions are stored on a folder called ".DocumentRevisions-V100"
in the root directory. (New in Lion.)
* Mobile backups are stored on a folder called ".MobileBackups" in the root
directory. (New in Lion.)
* Some archivers create auxiliary directories called "__MACOSX".
* Finder and Spotlight data related to each folder gets stored in an
extra file called ".DS_Store".
* For each file "foo.txt", its resource fork and some additional stuff
are stored in an accompaining ghost file called "._foo.txt". The pattern
is to prepend "._" to the original file name.
* If a folder has a custom icon you get a file "Icon^M" (that ^M is a hard CR).
Some stuff is only found in the root folder of volumes, unmac looks for them
in any directory you pass as argument, but not on their subdirectories.