Immigration Financial Information Bangladesh Gateway General World Cup Entertainment Programing University and College Scholarship Job Interview Health Job

Sunday, March 15, 2009

UNIX Interview Question

UNIX Question

# How can you determine the space left in a file system?

Level: Low Expected answer: There are several commands to do this: du, df, or bdf

# How can you determine the number of SQLNET users logged in to the UNIX system? Level: Intermediate Expected answer: SQLNET users will show up with a process unique name that begins with oracle, if you do a ps -ef|grep oracle|wc -l you can get a count of the number of users.

# What command is used to type files to the screen? Level: Low Expected answer: cat, more, pg

# What command is used to remove a file? Level: Low Expected answer: rm

# Can you remove an open file under UNIX? Level: Low Expected answer: yes

# How do you create a decision tree in a shell script? Level: intermediate Expected answer: depending on shell, usually a case-esac or an if-endif or fi structure

# What is the purpose of the grep command? Level: Low Expected answer: grep is a string search command that parses the specified string from the specified file or files

# The system has a program that always includes the word nocomp in its name, how can you determine the number of processes that are using this program? Level: intermediate Expected answer: ps -ef|grep *nocomp*|wc -l

# What is an inode? Level: Intermediate Expected answer: an inode is a file status indicator. It is stored in both disk and memory and tracts file status. There is one inode for each file on the system.

# The system administrator tells you that the system hasn?t been rebooted in 6 months, should he be proud of this? Level: High Expected answer: Maybe. Some UNIX systems don?t clean up well after themselves. Inode problems and dead user processes can accumulate causing possible performance and corruption problems. Most UNIX systems should have a scheduled periodic reboot so file systems can be checked and cleaned and dead or zombie processes cleared out.

# What is redirection and how is it used? Level: Intermediate Expected answer: redirection is the process by which input or output to or from a process is redirected to another process. This can be done using the pipe symbol "|", the greater than symbol ">" or the "tee" command. This is one of the strengths of UNIX allowing the output from one command to be redirected directly into the input of another command.

# How can you find dead processes? Level: Intermediate Expected answer: ps -ef|grep zombie -- or -- who -d depending on the system.

# How can you find all the processes on your system? Level: Low Expected answer: Use the ps command

# How can you find your id on a system? Level: Low Expected answer: Use the "who am i" command.

# What is the finger command? Level: Low Expected answer: The finger command uses data in the passwd file to give information on system users.

# What is the easiest method to create a file on UNIX? Level: Low Expected answer: Use the touch command

# What does >> do? Level: Intermediate Expected answer: The ">>" redirection symbol appends the output from the command specified into the file specified. The file must already have been created.

# If you aren?t sure what command does a particular UNIX function what is the best way to determine the command? Expected answer: The UNIX man -k command will search the man pages for the value specified. Review the results from the command to find the command of interest.

 

No comments :

Post a Comment