#!/bin/bash clear echo " ############################### # .DS_Store Cleaner # ############################### # Removes all .DS_Store files # # in a specified folder. # # SystemsBoy -05-03-05- # ---------------------------------------------------- Mac OS X puts .DS_Store files in every directory on your filesystem. These files contain information about the appearance of the window when the direc- tory is open. .DS_Store determines window size, position, and view style, i.e. column, list or icon. This script removes all .DS_Store files within a specified folder and within that folder's children. ---------------------------------------------------- " echo " Please enter the path to the folder..." read folder echo " Are you sure you want to remove all .DS_Store files in: \"$folder\"?... (Y/N)" read sure if [ $sure = Y -o $sure = y ] then # removal routine # sudo find "$folder" -name .DS_Store -exec rm -rf {""} \; echo " ---------------------------------------------------- All .DS_Store files have been removed from: \"$folder\" and its subfolders. You will find windows set back to their original positions, sizes and view styles. Bye now. " else echo " Never mind then... " fi exit 0