LINUX / UNIX Interview Questions




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

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

2. 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.
3. What command is used to type files to the screen?
Level: Low
Expected answer: cat, more, pg
4. What command is used to remove a file?
Level: Low
Expected answer: rm
5. Can you remove an open file under UNIX?
Level: Low
Expected answer: yes
6. 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
7. 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
8. 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
9. 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.
10. 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.
11. 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.
12. How can you find dead processes?
Level: Intermediate
Expected answer: ps -ef|grep zombie -- or -- who -d depending on the system.
13. How can you find all the processes on your system?
Level: Low
Expected answer: Use the ps command
14. How can you find your id on a system?
Level: Low
Expected answer: Use the "who am i" command.
15. What is the finger command?
Level: Low
Expected answer: The finger command uses data in the passwd file to give information on system users.
16. What is the easiest method to create a file on UNIX?
Level: Low
Expected answer: Use the touch command
17. 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.
18. 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:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf...