Dot Underscore ._ files in Dropbox

Recently, all my files stored in Dropbox suddenly acquired a “dot underscore” file in addition to the original file, as shown in the screenshot above:

As a result, the total number of files in dropbox doubled from ~45,000 to ~90,000! To make matters worse, all the “._” files were then immediately synced to my other computers with Dropbox installed.

So why were all these files suddenly created after years of using Dropbox without any issues?

Well “._” files are created to store extended information that would normally be stored as an extended file attributes within modern filesystems such as HFS+ (Apple native), NTFS (windows) or Unix/UFS. In other words, these files are only created on filesystems that do not support extended file attributes – which in most cases means FAT, FAT32 or exFAT.

In my case, I had purchased a Transcend JetDrive 12GB SD card for my Macbook Air to extend the storage capacity to 256GB, and it had arrived pre-formatted with the exFAT filesystem. When I then moved my Dropbox folder from the internal drive (formatted as HFS+) and on to the JetDrive, OS X had created “._” files to store the extended attributes for each file. These were then synced up to Dropbox automatically.

The solution was therefore to…

  1. Move my Dropbox files off the JetDrive
  2. Reformat the Jetdrive as HFS+ (“Mac OS Extended – Journaled” as it is called within OS X).
  3. Move the files back onto the JetDrive
  4. Run the dot_clean command against the JetDrive :

    dot_clean /Volumes/Trascend/Dropbox

The dot_clean command merges all attributes stored within the “._” file back into the master file and then removes the “._” from the filesystem. The fact the file has been removed is noticed by Dropbox, which then means they are removed from all synced copies on other computers (and the web interface).

 

 

This article was first published on http://www.dba-resources.com.

Fixing the cursor keys in OS X for Windows users

I’m a longtime Windows user who recently purchased a Mac. Overall I’m very impressed with the machine, but it does have a learning curve, especially for the key bindings.

As a DBA and programmer, I use the Home, End, PageUp and PageDown and CTRL keys extensively to quickly navigate code and text documents. And don’t get me started with Cut, Copy and Paste – my muscle memory for these keys is so well established as to be unbreakable.

Both at work and home I use full size PC keyboards, so I became desperate to find a way to map the PC keys for cursor control to their Mac equivalents and I think I’ve finally found a solution that I am happy with.

Note: These are the changes I have made to allow me to use a full size PC keyboard with a Mac. You will need to experiment with different options if you want to remap an Apple keyboard due to the differences in the ordering of the Control, Option and Command keys.

First, download and install  Karabiner, a very powerful keyboard customizer from pqrs.org. Launch Karabiner from Launchpad and it will add itself to the menu bar (a little square icon). Bring up preferences and you will be greeted with a huge list of pre-defined customizations as shown below:

Karabiner_1

Scroll down (past halfway) to find the For PC Users section (highlighted) and click to expand it. From here, choose the following Key Mappings to make the cursor behave the same in OS X as it does in Windows when using a PC keyboard.

  • Use PC Style Home/End #2
  • Use PC Style Control+Up/Down/Left/Right
  • Use PC Style Copy/Paste
  • Use PC style Select All
In addition, I recommend the following settings for some of the most common Windows system shortcuts that you are likely to use on a Mac without really thinking about it (such as undo, save, find, etc):
  • Enable PC Prev/Next Media keys
  • Use PC Style Undo
  • Use PC Style Redo
  • Use PC Style Save
  • Use PC Style New
  • Use PC Style New Tab #2
  • Use PC Style Find
  • Use PC Style Open

 

Enjoy!

This article was first published on http://www.dba-resources.com.