Friday, July 16, 2010

hidden arguments, easter egg, or what?

I just learned today that there is a hidden argument of 'date' command under Linux.

It is 'date --iso=seconds', which is equivalent to 'date +%FT%T%z' command.

The '--iso=seconds' argument is not recorded in the manual nor usage help.   However, it is not supported in Solaris. So, I fixed a script problem today by replacing the non-standard --iso=seconds argument with the +%FT%T%z argument for date.

I found another hidden argument of the 'cov-maintain-db' command in coverity prevent 4.5.  You may use 'cov-maintain-db --raw-db' command to open a 'sqlite' shell on the coverity database. However, AFAIK, coverity is moving to postgre sql database in their latest release.  So, this hidden argument becomes useless.

In my 10 years experiences in computing industry, it's funny to know that there are actually so many un-documented command, arguments, or APIs everywhere. It's the easter egg and trick of the IT industry.  It's so universal and it seems everyone, every company is fond of doing this, as a demonstration of their power over end users. :-)

That's why I like open source software.  You may dig into the source code to uncover many hidden or un-official stuffs.

--
Hao Leo Chen
http://leochen.net