CleanOSXFiles
Description Requirements Installation Configuration Usage Download
Current version
Version number: 1.0
Release date: 1/Jan/2010
Authors: Vittorio 'vb' Bertola
License: GNU GPL version 2
Interface language: English
Programming language: Perl
OS/Environment: Mac OS X/Linux
Description
CleanOSXFiles is a simple Perl script to remove the annoying extra files written by Mac OS X's Finder into every directory - files such as .DS_Store and ._filename. These files are useful and invisible as long as you remain inside a Mac environment, but become useless and apparent when directory trees are exported into other operating systems, for example via tar. The script will recursively parse every subdirectory and clean it from the unnecessary files.
Please remember that, while the .DS_Store files are visible in Mac OS X, the ._filename files (one for every file) created by the Finder under certain conditions are a representation of a "resource fork" and will not be accessible by the script if run under Mac OS X. You will only be able to remove these files after having exported the directory structure to another operating system (for example, by tarring and untarring it), by running the script on the target machine.
Requirements
CleanOSXFiles requires a standard Perl installation.
Installation
Download the file and extract it in a temporary directory:
cd /tmp tar xvfz cleanosxfiles-1.0.tar.gz
then move the cleanosxfiles script into your favourite directory, and make it world-executable by typing
chmod 755 cleanosxfiles
Configuration
No configuration needs to be performed.
Usage
Just launch the script from the Linux command line or from a Mac OS X terminal.
The script takes as argument the starting directory - the root of the directory tree to be cleaned.
Optionally, before the argument, you can specify -n to execute a dry run: the script will tell you which files it would have deleted, but it will not actually delete them.
Examples:
cleanosxfiles /tmp/myfiles/ cleanosxfiles -n .
Download
Click here to download:
CleanOSXFiles 1.0 (879 bytes)