Sunday 22 February 2009

Unix Interview Questions (Part1)

Following are some unix commonly asked interview questions  

Q 1  What is command to check space in Unix 
Ans : df -k 

Q 2 If a file has permission 000 then who can access the File 
Ans : System Administrator .

Q 3 What is command to kill last background Job 
Ans : kill $!

Q 4 How you will list all Hidden files 
Ans : ls -la|grep ^[.] 

Q 5 What is command to create Zero Byte File 
Ans : touch filename 

Q 6  What is difference between diff and cmp command 
Ans : cmp -It compares two files byte by byte and displays first mismatch. 
           diff -It displays all changes required to make files identical.

Q 7  What does $# stands for 
Ans : It will return the number of parameters passed as command line argument.

Q 8 How many prompts are availaible in Unix System
Ans : PS1 the default prompt 
          PS2 Multiline Prompt 

Q 9 How to kill a process forcibily 
Ans : kill -9 PID 
PID (unique identifier of process) 

Q 10 How to create a hidden file 
Ans : While creating file put . DOT in front of file name

If you need more interview questions please mail us at

My Profile