Unix Linux IMPORTANT QUESTION ANSWER PART 1
for IGNOU BCA MCA Students
UNIX command Questions Answers asked in Interview
UNIX or Linux operating system has become default Server operating system and for whichever programming job you give interview you find some UNIX command interview questions there.
Beginners UNIX Interview Questions Answers
1. Write command to list all the links from a directory?
In this UNIX command interview questions interviewer is generally checking whether user knows basic use of "ls"
"grep" and regular expression etc
You can write command like:
ls -lrt | grep "^l"
2. Create a read-only file in your home directory?
This is a simple UNIX command interview questions where you need to create a file and change its parameter to read-only by using chmod command you can also change your umask to create read only file. touch file chmod 400 file
read more about file and directory permission in unix and linux here.
3. How will you find which operating system your system is running on in UNIX?
By using command "uname -a" in UNIX
4. How will you run a process in background? How will you bring that into foreground and how will you kill that process?
For running a process in background use "&" in command line. For bringing it back in foreground use command "fg jobid" and for getting job id you use command "jobs", for killing that process find PID and use kill -9 PID command. This is indeed a good Unix Command interview questions because many of programmer not familiar
with background process in UNIX.
5. How do you know if a remote host is alive or not?
You can check these by using either ping or telnet command in UNIX. This question is most asked in various Unix command Interview because its most basic networking test anybody wants to do it.
6. How do you see command line history in UNIX?
Very useful indeed, use history command along with grep command in unix to find any relevant command you
have already executed. Purpose of this Unix Command Interview Questions is probably to check how familiar candidate is from available tools in UNIX operation system.
7. How do you copy file from one host to other?
Many options but you can say by using "scp" command. You can also use rsync command to answer this UNIX
interview question or even sftp would be ok.
8. How do you find which process is taking how much CPU?
By using "top" command in UNIX, there could be multiple follow-up UNIX command interview questions based
upon response of this because "TOP" command has various interactive options to sort result based upon various
parameter.
9. How do you check how much space left in current drive ?
By using "df" command in UNIX. For example "df -h ." will list how full your current drive is. This is part of anyone day to day activity so I think this Unix Interview question will be to check anyone who claims to working in UNIX but not really working on it.
No comments:
Post a Comment