Professional Documents
Culture Documents
UNIX Interview Questions
UNIX Interview Questions
UNIX Interview Questions
3. What is the difference between pipe (|) and tee command in unix
4. Write a command to find all of the files which have been accessed within the last
30 days.
6. How to get a particular string as your prompt ? Give syntax of that command?
7. Give a regular expression that finds two things, try to come up with regular
expressions that find each individually using "egrep0" command?
11. What is the basic difference between unix and windows operating systems?
14. Through which command will redirect output to both screen and files at the same
time
16. Which command will you use to change the permissions on file?
20. What is the syntax of grep command and what is its use?
21. Suppose 1000 processes are running on the system out of those if you have to
show only certain process ids which command will you use
23. How do you copy a directory with many files and folders into another directory?
34. What is the advantage of each user having its own copy of the shell?
37. Give two UNIX kernel parameters that effect an Oracle install
38. How would you change all occurrences of a value using VI?
40. Give the command to display space usage on the UNIX file system.
42. Explain the read, write, and execute permissions on a UNIX directory.
43. What UNIX command will control the default file permissions when files are
created?
45. How do you list the files in an UNIX directory while also showing hidden files?
49. What are the differences between CUI and GUI interfaces?
52. If we want to see first 35 lines of a file which command we have to use?
53. What are the different commands used to view the contents of a file?
70. In UNIX file permissions what does the second field denotes?
72. What is the difference between "cron" command and "at" command?
83. What is tar command and what are the different types of tar commands?
86. What is the difference between relative path and absolute path?
88. What is the command to find out the difference between files and folders?
89. What is the command to find out which shell you are running?
91. How do you check for processes started by particular user suppose the user
name is 'Suresh'?
93. What is the command to view contents of a large error log file?
95. How do you find out all processes that are currently running in UNIX OS?
96. The command grep first second third /usr/you/myfile a) prints lines containing
the words first, second or third from the file /usr/you/myfile b) searches for lines
containing the pattern first in the files second, third, and /usr/you/myfile and
prints them c) searches the files /usr/you/myfiel and third for lines containing the
words first or second and prints them d) replaces the word first with the word
second in the files third and /usr/you/myfile e) None of the above
99. What command would users use to see what file one page at a time in UNIX?
100. What command a user use to view a long text file one page at a time in
UNIX?
101. How does the user view the contents of a text file in UNIX?
102. How does a user get the current date, time in UNIX?
103. Give command that will make the file "run.sh" executable?
104. Give Command that will move a single file called "unix.txt"
105. What command is used to replace the existing string with some other?
106. What is the main advantage of creating links to a file instead of copies of the
file?
107. What are each of the standard files and what are they normally associated
with?
108. Could you tell something about the Unix System Kernel?
112. What are the processes that are not bothered by the swapper? Give Reason
116. What are the events done by the Kernel after a process is being swapped out
from the main memory?
120. What is major difference between the Historic Unix and the new BSD release
of Unix System V in terms of Memory Management?
123. How do you create special files like named pipes and device files?
124. What is a FIFO?
127. What are the read or write or execute bits on a directory mean?
130. What are the main differences between Apache 1.x and 2.x?
134. Name key files or directories on a Windows system that should always be
backed up?
135. Name key files or directories on a UNIX system that should always be backed
up?
136. From command line how will you add a user account?
158. what is the name os the first os and tell me the year when it was discovered
159. fork()?
165. The very first process created by the kernel that runs till the kernel process is
halts is
166. The UNIX shell is.... a).does not come with the rest of the system b).forms
the interface between the user and the kernel c) does not give any scope for
programming d) does not allow calling one program from with in another e) all of
the above
170. Display the Disk Usage of file sizes under each directory in current Directory?
171. Set the Display automatically for the current new user?
172. What does the following command line produce? Explain each aspect of this
line. $ (date ; ps -ef | awk {print $1}' | sort | uniq | wc -l ) >> Activity.log
173. What is the most graceful way to get to run level single user mode?
178. In LINUX, What are two subtle differences in using the more and the pg
commands?
180. What file should you examine to determine the defined runlevels for your
system?
181. What is the complete name of the default configuration file for LILO?
182. What text filter can you use to display a binary file in octal numbers?
183. What is the name and path of the main system log?
184. What is the minimum number of partitions you need to install Linux?
187. You want to create a compressed backup of the users' home directories. What
utility should you use?
190. How does the boot process[init levels] work on Linux? How is it different from
Solaris?
194. Which directory is closer to the top of the file system tree, parent directory or
current directory?
195. What is the difference between home directory and working directory?
Source: http://www.allinterview.com
1. How do you take a single line of input from the user in a shell script?
2. Write a script to convert all DOS style backslashes to UNIX style slashes in a
list of files.
3. Write a regular expression (or sed script) to replace all occurrences of the
letter ‘f’, followed by any number of characters, followed by the letter ‘a’,
followed by one or more numeric characters, followed by the letter ‘n’, and
replace what’s found with the string “UNIX”.
4. Write a script to list all the differences between two directories.
5. Write a program in any language you choose, to reverse a file.
6. What are the fields of the password file?
7. What does a plus at the beginning of a line in the password file signify?
8. Using the man pages, find the correct ioctl to send console output to an
arbitrary pty.
9. What is an MX record?
10. What is the prom command on a Sun that shows the SCSI devices?
11. What is the factory default SCSI target for /dev/sd0?
12. Where is that value controlled?
13. What happens to a child process that dies and has no parent process to wait
for it and what’s bad about this?
14. What’s wrong with sendmail? What would you fix?
15. What command do you run to check file system consistency?
16. What’s wrong with running shutdown on a network?
17. What can be wrong with setuid scripts?
18. What value does spawn return?
19. Write a script to send mail from three other machines on the network to root
at the machine you’re on. Use a ‘here doc’, but include in the mail message
the name of the machine the mail is sent from and the disk utilization
statistics on each machine?
20. Why can’t root just cd to someone’s home directory and run a program called
a.out sitting there by typing “a.out”, and why is this good?
21. What is the difference between UDP and TCP?
22. What is DNS?
23. What does nslookup do?
24. How do you create a swapfile?
25. How would you check the route table on a workstation/server?
26. How do you find which ypmaster you are bound to?
27. How do you fix a problem where a printer will cutoff anything over 1MB?
28. What is the largest file system size in solaris? SunOS?
29. What are the different RAID levels?
Source: http://www.techinterviews.com