[OS X TeX] Unix expert help needed

Herbert Schulz herbs at wideopenwest.com
Thu May 24 08:40:47 EDT 2007


On May 24, 2007, at 5:04 AM, Bruno Voisin wrote:

> Le 24 mai 07 à 07:24, Herbert Schulz a écrit :
>
>> Certainly not trivial to me. I asked how to get rid of  
>> the .DS_Store files (among other things --- do you really have  
>> anything more than the .DS_Store files?) in a directory on this  
>> list a while back too! I made a shell script I called  
>> cleands_store that contains
>>
>> #!/bin/bash
>> # remove .DS-Store files recursively
>> find "$1" -type f -name .DS_Store -exec rm -f {} \;
>>
>> (don't; forget the final return!), made it executable by running  
>> the command
>>
>> chmod 755 cleands_store
>>
>> and placed it in ~/bin/ (create that directory if necessary).  
>> Then, when I want to clean out the .DS_Store files from a  
>> directory (and any sub-directories, recursively) I run
>>
>> ~/bin/cleands_store full/path/to/directory
>>
>> and it just gets done.
>
> Thanks for that, this script seems quite useful (avoiding to  
> navigate through the directory hierarchy and erase manually  
> all .DS_Store files, which is what I had been doing until now).
>
> However, .DS_Store files are not the only little peskies to get rid  
> of: when Mac files include resource forks, these forks appear as  
> additional "." files IIRC on Windows and Linux. I just witnessed  
> that yesterday opening on a colleague's Windows 2000 computer a  
> directory created on my Mac.
>
> Is there a way of getting rid of these resource files before  
> creating the archive of a directory, to be used afterwards on a  
> Linux or Windows computer? Or are resource forks automatically  
> discarded when creating a .tar.gz or .tar.bz2 archive?
>
> I imagine resource forks are included in .zip archives, given the  
> Finder's menu item File > Create Archive creates precisely .zip  
> archives.
>
> Bruno Voisin
>

Howdy,

I've completely forgotten about the resource forks. Even `ls -a` on  
Mac OS X hides them! The folders I've stripped were for Mac  
consumption so I haven't worried about them. I do remember sending  
some photos from iPhoto va CD to a friend with a Windows machine and  
he had to wade through the "extra" files. I think I've seen resource  
fork strippers out there but haven't looked into which one may be  
best or how to use some CLI tools to do it---I'll be there is one but  
maybe it's only with the developer tools.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list