Macbrush

View the Project on GitHub nils-tekampe/macbrush

macbrush

This command line tool cleans a directory and all its subdirectories from a set of hidden files that OS X creates and enters an observation mode afterwards. Within the observation mode, each hidden file that is created by OS X is directly deleted after it has been create by the OS. The programm is of specific use for folders which are shared between OS X and other Operating Systems (e.g. via Dropbox).

The tool provides more or less the same functionality as some commercial tools (e.g. BlueHarvest) but works heedlessly (i.e. without a graphical user interface).

It should be noted that OSX usually creates the temporary files that are removed by the program for a certain reason. Please only use this program if you know what you are doing and if you are sure that no important information will get lost.

Installation

Installation is pretty simple and straightforward. Clone this repository or download as an archive. Open the XCode project and compile. As an alternative you may use

xcodebuild

from the command line tools to compile (Should work without any furhter options.

As an alternative you can use brew for installation:

brew tap nils-tekampe/tap
brew install macbrush

OPTIONS

Option Long option Description
-d --ignore-dot-underscore Do not remove ._ files
-a --ignore-apdisk Do not remove .APDisk files
-o --ignore-dsstore Do not remove .DS_Store files
-i --ignore-volumeicon Do not remove VolumeIcon.icns files
-s --simluate Do not remove any files at all. Should be used togehter with --verbose for reporting of identified files
-v --verbose Verbose reporting
-c --skip-clean Do not clean folders. Directly enter observation mode
-o --skip-observation Do not enter observation mode. Only clean folders once.
-h --help Print help message

Examples

Clean /home/Users/user1/test and enter observation mode afterwards.

macbrush /home/Users/user1/test

Clean /home/Users/user1/test and /home/Users/user1/test2 and enter observation mode afterwards.

macbrush /home/Users/user1/test /home/Users/user1/test2

Clean /home/Users/user1/test only. No observation mode.

macbrush --skip-observation /home/Users/user1/test

Simulate cleaning /home/Users/user1/test and use verbose reporting.

macbrush --verbose --simulate /home/Users/user1/test

Authors and Contributors

The tool has been developed by @nils-tekampe.

Support or Contact

Please contact me via github in case you run into any trouble using this tool.