Sensible Open Source

Blog Status

  • 4 yrs 48 wks 5 days old
  • Updated: 11 Mar 2010
  • 455 entries
  • 174 comments
Total: 1,213,250
since: 5 Apr 2005

LinkBlogS

Creating Vidcasts

18 June 2007, Monday 7:05 P GMT-06
Tags:      

Man, Can't Microsoft Catch A Break?

16 March 2007, Friday 12:26 P GMT-06

Viacom, Google andYou Tube, Oh My!

16 March 2007, Friday 12:25 P GMT-06

Switch to digital TV to start in October

16 March 2007, Friday 7:46 A GMT-06

Is the Ice Ready? No, Its Still To Hot To Use...

16 March 2007, Friday 7:43 A GMT-06

MIT Entire Curriculum At disposal of e-learners

6 March 2007, Tuesday 11:52 A GMT-06

A cure for e-mail attention disorder?

2 March 2007, Friday 12:51 A GMT-06
Tags:  

Windows-on-Mac software gets virtualization update

1 March 2007, Thursday 5:08 A GMT-06

EnterpriseDB is/n't Open Source

1 March 2007, Thursday 3:37 A GMT-06

BitTorrent download portal debuts

27 February 2007, Tuesday 9:05 A GMT-06

$45b TXU buyout

27 February 2007, Tuesday 9:02 A GMT-06

iPhone Competitors Got The Touch

26 February 2007, Monday 3:43 A GMT-06
Tags:        

HTC - Smart Mobility

25 February 2007, Sunday 4:22 A GMT-06

Hard to find 1-800 numbers

23 February 2007, Friday 8:35 A GMT-06

Cuba Embraces Open-Source Software

21 February 2007, Wednesday 3:10 A GMT-06

Vista at the tipping point, Err Dipping Point?

11 February 2007, Sunday 11:11 A GMT-06
Tags:  

PostgreSQL Open Source And Persistence

3 February 2007, Saturday 10:32 P GMT-06

Blackboard Pledges No Patent Blocks

3 February 2007, Saturday 10:28 P GMT-06

UVU

5 January 2007, Friday 11:58 P GMT-06

Open-source IP PBX software appliance"

4 January 2007, Thursday 3:44 A GMT-06

Asterisk an under-appreciated Open Source Success Story

4 January 2007, Thursday 3:43 A GMT-06

Open Source AJAX Tooling

4 January 2007, Thursday 3:41 A GMT-06

Google MAIL API Secuirty Alert

1 January 2007, Monday 7:37 P GMT-06
Tags:    

United States Patent Application: 0060288329

26 December 2006, Tuesday 4:00 A GMT-06

LinkBlog Popular Tags

                                       







««Mar 2010»»
SMTWTFS
  12
3
456
789
10
111213
14151617181920
21222324252627
28293031

 

August 16, 2012

Time Left

2 years 5 months 4 days

                   

RSS Add-Me








Google Related Links

OSX Crumbs Left On Window's File Systems: Disable Network Volumes

posted 5 December 2009, Saturday

When an OS X client accesses a network volume, especially in windows, the file .DS_STORE is deposited in the directory. This file is best suited locally for the OSX client but has no use to the Windows clients and therefore not desired. 

 

For completion of the issue, the .DS_STORE file holds, mostly, cosmetic attributes for Finder some of these are windows position, icon position, view style, background image, and view style.   

 

As a result the following solution below prevents this file from being created:

  • Open up an OS X terminal and issue the command  
  • defaults write com.apple.desktopservices DSDontWriteNetworkStores true  
  • Reboot the system for the change to take effect.
This solves the crumbs the OSX client may leaves on disparate systems network volumes and the side effect is no one cares that you were there, just that you didn't leave files that are useless to them 
 
Also, when zipping a directory from your client and sending it off to whomever, you may want to sanitize the files and not include the .DS_STORE.
 
Below is a quick solution, not from the OS X Terminal:
 
 'find . -name ".DS_Store" -type f -print0 | xargs -0 rm'  
 
Simply this removes all ".DS_STORE" at the directory level and down, recursively through the sub-directories.  Than simply archive the directory.  You can turn this into an alias if you like.
 
If you rather create a zip file from the get go a little grep and awk will work just the same as written below:

zip -d TARGETZIPFILE.zip `unzip -l TARGETZIPFILE.zip | grep .DS_Store | awk '{print $4}'`   
 
You could set this up as an alias, but may consider a function for further options if you like.  Instead of inserting (the Hard Coded) ".DS_STORE" you could make this a command line parameter (Hence, this is why a function should be used).
 
This may not fall under the same criteria, however, since I use DIFF a lot from the command line here is a function I use to remove unwanted files ".DS_STORE" from my directory compares (I use this for svn):  
 
 diff -rq DIR1 DIR2  | grep -v -e '.DS_Store' -e 'Thumbs' -e '.svn' | sort; }
  
Creating a function here to pass the directory names $1 compared to $2 the sdiff function is below: 
 function sdiff { diff -rq $1 $2  | grep -v -e '.DS_Store' -e 'Thumbs' -e '.svn' | sort; }
Note I do not create an alias as this requires passing parameters, the directory names and aliases cant take these parameters.  Implementation is resorted to a shell function. 
 
To further customize this one could create a function that takes command line options for the two directories as above. Additional, including the ability to include any number of file names one would like to exclude as additional parameters. Creating a loop to traverse the command line parameters to issue an -e $3,  -e $4, .... -e $n and then append | sort;
 
I leave this as an exercise for you.  
 
Enjoy! 
sos 
 
 
 
 
 
 
 
 
 
 

tags:      

links: digg this    del.icio.us    technorati    reddit