[lbackup-discussion] Mac OS X excluding files without suffixes/extensions

henri reply to this message via the mailing list
Sun Oct 4 22:48:46 NZDT 2009


On Mac OS X sometimes files do not have extensions or suffixes to help  
you exclude these files during a backup. If you wish to exclude files  
like this from the backup then read on for further details.

If the file has been indexed by spotlight you may want to consider  
using the UTI (Universal Type Identifier) in order to determine the  
kind of file you are dealing with.

It is possible run a script to build the exclude list with various  
information or to add appropriate extensions or suffixes to the files  
which are missing these suffixes/extensions. The 'mdls' command is  
able to provide you with the UTI information if spotlight has built  
the index for the file. Specifically, you will want to use the 'mdls'  
command to retrieve the "kMDItemContentType" which is equivalent to  
the UTI.

Alternatively, if spotlight is disabled you may use the 'file' command  
in order to extract the file type information for a file. Again, this  
will allow you to update/build the excludes file or alternvativly you  
will be able to use the information returned by he 'file' command to  
update the suffix/extension of the file.

If you are going to update a number of different kind of files. Then  
some sort of reference in a file will probably be very useful.  
However, there may be a reference located somewhere in the system? If  
you know where such a map is located then please reply to this thread.



More information about the lbackup-discussion mailing list