Category Archives: Unix/Linux

Solaris interview questions

List the files in current directory sorted by size ? - ls -l | grep ^- | sort -nr
List the hidden files in current directory ? - ls -a1 | grep "^\."
Delete blank lines in a file ? - cat sample.txt | grep -v ‘^$’ > new_sample.txt
Search for a sample string in particular files [...]

Also posted in General, Networking | 15 Comments

Perl interview questions and answers

What arguments do you frequently use for the Perl interpreter and what do they mean?
What does the command ‘use strict’ do and why should you use it?
What do the symbols $ @ and % mean when prefixing a variable?
What elements of the Perl language could you use to structure your code to allow for maximum [...]

Also posted in Web dev | 20 Comments

Linux admin interview questions

How do you take a single line of input from the user in a shell script?
Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files.
Write a regular expression (or sed script) to replace all occurrences of the letter ‘f’, followed by any number of characters, followed by [...]

Posted in Unix/Linux | 18 Comments

Operating system questions

What are the basic functions of an operating system? - Operating system controls and coordinates the use of the hardware among the various applications programs for various uses. Operating system acts as resource allocator and manager. Since there are many possibly conflicting requests for resources the operating system must decide which requests are allocated resources [...]

Also posted in Hardware, Windows | 9 Comments

Interview questions for Linux admin

Advantages/disadvantages of script vs compiled program.
Name a replacement for PHP/Perl/MySQL/Linux/Apache and show main differences.

Also posted in Database | 2 Comments

Linux admin interview questions

How do you list the files in an UNIX directory while also showing hidden files? ls -ltra
How do you execute a UNIX command in the background? Use the “&”.

Also posted in Database | 7 Comments

Unix sysadmin interview questions

Q: How would you make the following SQL statement run faster? SELECT * FROM TABLEA WHERE COL1=’A’ AND COL2=’B’; A: Make sure that COL1 and COL2 have indexes.Find out which condition will return less values and use that as the first conditonal.

Posted in Unix/Linux | 5 Comments

Unix/Linux programming interview questions

Question 1: What is the major advantage of a hash table? (Asked by Silicon Magic Corp. people)
Answer: The major advantage of a hash table is its speed. Because the hash function is to take a range of key values and transform them into index values in such a way that the key values are [...]

Posted in Unix/Linux | 5 Comments

Unix/Linux administration interview questions

What is LILO?
LILO stands for Linux boot loader. It will load the MBR, master boot record, into the memory, and tell the system which partition and hard drive to boot from.

Posted in Unix/Linux | 6 Comments