Interview Questions: Why Should I Hire You?

Posted on in Categories Beyond nixCraft last updated July 31, 2007

I’ve written about one of such trick questions – How important is money to you? Now IT managers share their favorite interview questions and the thinking behind them at computerworld.

‘Why Should I Hire You?’ and Other Favorite Interview Questions (via digg)

On a related note you may find Conducting the UNIX Job Interview: IT Manager Guide with UNIX Interview Questions (IT Job Interview series) book quite useful. This book is not just useful for IT managers but you will get a list of interview questions along with sample answer. A good book for job hunters, IMHO.

Ubuntu Linux install development / system library functions man pages (manual)

Posted on in Categories Debian Linux, Tip of the day, Troubleshooting, Ubuntu Linux last updated July 30, 2007

I am little surprised to find that Ubuntu Linux skips development man pages by default on cloud-based images. A quick search using apt-cache pointed out that I need to install the manpages-dev package on a Ubuntu Linux. It includes manual pages about using GNU/Linux for development. The manpages-posix-dev package includes manual pages about using a POSIX system for development. The man-db package is the on-line manual page i.e. actual man command to view man pages on a Ubuntu or Debian Linux.

Install development man pages on Ubuntu/Debian Linux

Type the following apt-get command to install various packages to view man pages for C standard library functions in Ubuntu or Debian system:
$ sudo apt-get install manpages-dev man-db manpages-posix-dev
Sample outputs:

Fig.01: Installing man pages on a Ubuntu or Debian Linux system
Fig.01: Installing man pages on a Ubuntu or Debian Linux system

How do I view man pages?

To view library calls (functions within program libraries), enter:
$ man 3 function-name
$ man 3 putc
$ man 3 strlen
$ man 3 printf
$ man 3 scanf
$ man 2 execve
$ man 2 fork

The number 3 or 2 indicates the section numbers of the manual as follows:

  • 2 : System calls (functions provided by the kernel)
  • 3 : Library calls (functions within program libraries)

See man page sections for more info:
$ man man

See also

Linux rpm command no such file or directory error and solution

Posted on in Categories File system, Howto, Linux, Linux distribution, RedHat/Fedora Linux, Suse Linux, Troubleshooting last updated July 30, 2007

New Linux user often get this error. Let us say you haved downloaded the RPM file from net and saved to /tmp, you may get error – no no such file or directory – when the file is really downloaded and ls command can show the same.

Answer is pretty simple rpm command needs the full path to RPM command. Use pwd command to get full path and type the following commands:
ls *.rpm
pwd
/tmp
Now install the rpm file:
rpm -ivh myrpm.rpm
or use full path:
rpm -ivh /tmp/myrpm.rpm

Running query on uninstalled rpm package

However if you run query on uninstalled package you will get an error:
# rpm -qi /tmp/bandwidth-0.12-1.el5.rf.x86_64.rpm
Output:

package bandwidth-0.12-1.el5.rf.x86_64.rpm is not installed

To query an uninstalled package pass -p option to rpm command.
# rpm -qip /tmp/bandwidth-0.12-1.el5.rf.x86_64.rpm
Output:

Name        : bandwidth                    Relocations: (not relocatable)
Version     : 0.12                              Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
Release     : 1.el5.rf                      Build Date: Sat 28 Jul 2007 03:27:28 PM CDT
Install Date: (not installed)               Build Host: lisse.leuven.wieers.com
Group       : Applications/Internet         Source RPM: bandwidth-0.12-1.el5.rf.src.rpm
Size        : 30905                            License: GPL
Signature   : DSA/SHA1, Sat 28 Jul 2007 03:31:11 PM CDT, Key ID a20e52146b8d79e6
Packager    : Dag Wieers 
URL         : http://home.comcast.net/~fbui/bandwidth.html
Summary     : Artificial benchmark for measuring memory bandwidth
Description :
bandwidth is an artificial benchmark for measuring memory bandwidth,
useful for identifying a computer's weak areas.

nixCraft FAQ Roundup ~ July, 30, 2007

Posted on in Categories FAQ last updated July 30, 2007

Recently updated/posted Linux and UNIX FAQ (mostly useful to Linux/UNIX new administrators or users) :

Enjoy!

PHP Log All Errors to a Log File to Get Detailed Information

Posted on in Categories Apache, Howto, lighttpd, Linux, php, Security, UNIX last updated July 29, 2007

PHP offers simple but effective solution to log all errors to a log fiie.
On all production web server you must turn off displaying error to end users via a web browser. Remember PHP gives out lots of information about path, database schema and all other sort of sensitive information. You are strongly advised to use error logging in place of error displaying on production web sites. The idea is quite simple only developer should able to see php error log.
Continue reading “PHP Log All Errors to a Log File to Get Detailed Information”

Tech talk: One billion Windows users can be wrong

Posted on in Categories Beyond nixCraft, Linux, Windows last updated July 29, 2007

This article (via lxer) talks about Microsoft latest FUD and how they never stop treating Linux users as idiots. Probably not while it treats its own users in the same fashion. Just take a look at the latest FUD to arrive from the Microsoft chiefs of staff – Kevin Turner, COO, claims that Vista is most secure Windows operating system ever.

Dear Mr. Turner, there is no such a thing called most secure operating system. You can just make attackers job hard, period. (keep in mind that you also need to secure Linux/BSD/UNIX oses).

And yes Microsoft CEO Steve Ballmer claimed that there will be a billion machines running Windows within a year. Few days back I had played with Vista, which has many GUI features from OSX and Compiz. Anyway 1 billion software sale is quite huge, IMHO:

The install base of Windows computers this coming 12 months will reach 1 billion,” Ballmer told the group. “If you stop and just think about that, parse that for a second, by the end of our fiscal year ’08, there will be more PCs running Windows in the world than there are automobiles.

Linux gperf C and C++ command line processing programming tutorial

Posted on in Categories C Programming, Linux, UNIX last updated July 29, 2007

GNU ‘gperf’ generates perfect hash functions. If a long option shows an argument as mandatory, then it is mandatory for the equivalent short option also. Use this tutorial for effective command-line processing in your C/C++ code:

Command-line processing is historically one of the most ignored areas in software development. Just about any relatively complicated software has dozens of available command-line options. In fact, it’s not uncommon to find hundreds of lines of if-else statements coded to process user input, and maintenance of such legacy code becomes a time-consuming affair even for seasoned programmers. In such circumstances, most C developers commonly go for a rather long (and often nested) if-else statement with ANSI C library functions such as strcmp, strcasecmp, and strtok …

The gperf utility is tuned to quickly generate a perfect hash for small to medium datasets. But gperf has other applications, as well. In fact, it’s the tool of choice of maintaining perfect hashes for language keywords in GNU compilers, and recent advances allow you to work with larger datasets. So, consider making gperf part of your next development project.

GNU perfect (gperf) hash function generator makes short work of complex input strings

OpenBSD foundation announced

Posted on in Categories OpenBSD, UNIX last updated July 26, 2007
OpenBSD foundation announced

Good news from OpenBSD project. The OpenBSD Foundation is pleased to announce today it has completed its organization as a Canadian federal non-profit corporation and is ready for public interaction.

The OpenBSD Foundation is a Canadian not-for-profit corporation which exists to support OpenBSD and related projects such as OpenSSH, OpenBGPD, OpenNTPD, and OpenCVS. While the foundation works in close cooperation with the developers of these wonderful free software projects, it is a separate entity.

However this may turn down a few people:

We are not a registered charity, in the sense that we do not issue tax deductible receipts. The reporting overhead (accounting and legal costs) to operate a registered charity in Canada is prohibitive without a sizable revenue stream. Currently, this would divert a great deal of resources that could be better utilized in helping build good free software. We do issue receipts (not tax deductable) for all donations.

Nevertheless it is a good move in right direction.

=> The OpenBSD Foundation

Nokia E90 Review (Good for sys admins)

Posted on in Categories Beyond nixCraft, Linux Embedded devices last updated July 26, 2007

I’m still stuck with Blackberry and Nokia 6130, good folks at Osnews has posted a nice review of Nokia E90 business phone:

The E90 is a Communicator-class device and very popular among businessmen, but also among system administrators too (one of our friends, sysadmin at Google, is using Nokia’s qwerty/wifi devices specifically for SSH access). Read on for our review of the impressive E90.

Also checkout Nokia E90 and N95 side by side feature chat. I don’t have any plan to get new phone but I might try out Nokia 800 Internet Tablet PC soon :D.

BTW, do have an iPhone? If you have let me know your experience…