Get date with nanoseconds on MacOS

Recently I tried to run my own simple bash script (written on Linux) on my Mac and I found that results are bad because a “date” function.

So the problem is – date on MacOS doesn’t have nanoseconds option.

Solution is simple: install “coreutils” from MacPorts

$ sudo port install coreutils

that’s it!

Now GNU version of the date is available as gdate:

$ gdate +%s%N
1379413863366167000

Installation of Midnight Commander on MacOS 10.8.3

Today I needed to install MC on my Mac.
So that is step-by-step guide:

– Installed MacPorts
Downloaded last version pkg from here http://www.macports.org/install.php and installed it

Then I tried to install MC (sudo port install mc) but got error:

Warning: The Command Line Tools for Xcode don’t appear to be installed; most ports will likely fail to build.

Continue reading