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