Removing .DS_Store from Network Drives

| 0 Comments

Removing the .DS_Store files already created on your network drive. In the example below, specifically only list the smbfs based mount points.

#!/bin/bash

FS=smbfs

for mountpoint in `mount | grep ${FS} | awk '{print $3}'`
do
for mp_file in `find ${mountpoint} -name .DS_Store -fstype ${FS} -exec ls {} \;`
        do
        ls -lh "${mp_file}"
        rm -fv "${mp_file}"
        done
done

Leave a comment

Recent Entries

Enabling Spotlight on the Mac
cd /System/Library/LaunchDaemons sudo launchctl load -w com.apple.metadata.mds.plist sudo mdutil -E /…
Removing .DS_Store from Network Drives
Removing the .DS_Store files already created on your network drive. In the example below, specifically only list the smbfs based…
Disable .DS_Store on Network Drives
From http://support.apple.com/kb/HT1629 defaults write com.apple.desktopservices DSDontWriteNetworkStores true --- Summary This is an advanced article that contains information about preventing .DS_Store…