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. These UNIX command interview questions are mostly asked during Java development and Support role interviews on various investment banks mostly because most of electronic trading systems or stock trading system works on Unix servers. As we know that high volume low latency systems which wants to take advantage of little bit of volatility in market for Equity , Futures and options or Foreign exchange trading need a stable server side operating system and Redhat Linux is doing great job there. with the advent of Algorithmic trading this speed factor becomes more important so getting someone who has good knowledge of operating system and commands on which these trading system runs is definitely required. but these UNIX command interview questions are equally applicable for any job interview which requires some work on Unix Operating System. With the growing use of Linux in form of RedHat, Solaris and IBM AIX its must to keep you familiar with essential Linux commands available on various platforms.
Long back I had once asked one of my friend why are you preparing Unix Command interview questions if you going for a Java Interview and he told me that this job doesn't only require knowledge of Java but also knowledge of Unix, Linux, SQL and other scripting language , which is quite true. After that I thought to collect various UNIX command interview questions asked to Java developers or trading system support interviews and this is the result of that compilation. This list of UNIX command interview questions are by means complete and would be great if you guys contribute some genuine and good Unix Command Interview questions and answersasked during interviews. I have divided the questions on three categories for sake of managing and keeping this list of Unix Interview questions up to date.
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
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
sortresult 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.
10. What is the difference between Swapping and Paging?
Swapping:
Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.
Paging:
Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly.
Intermediate UNIX Interview Questions Answers
1. What is difference between ps -ef and ps -auxwww?
This is indeed a good Unix Interview Command Question and I have faced this issue while ago where one culprit process was not visible by execute ps –ef command and we are wondering which process is holding the file.
ps -ef will omit process with very long command line while ps -auxwww will list those process as well.
2. How do you find how many cpu are in your system and there details?
By looking into file /etc/cpuinfo for example you can use below command:
cat /proc/cpuinfo
3. What is difference between HardLink and SoftLink in UNIX?
4. What is Zombie process in UNIX? How do you find Zombie process in UNIX?
When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it - for example, the parent may need to check the child's exit status. To be able to get this information, the parent calls 'wait()'; In the interval between the child terminating and the parent calling 'wait()', the child is said to be a 'zombie' (If you do 'ps', the child will have a 'Z' in its status field to indicate this.)
Zombie : The process is dead but have not been removed from the process table.
5. What is "chmod" command? What do you understand by this line “r-- -w- --x?
6. There is a file some where in your system which contains word "UnixCommandInterviewQuestions” How will find that file in Unix?
7. In a file word UNIX is appearing many times? How will you count number?
grep -c "Unix" filename
8. How do you set environment variable which will be accessible form sub shell?
By using export for example export count=1 will be available on all sub shell.
9. How do you check if a particular process is listening on a particular port on remote host?
By using telnet command for example “telnet hostname port”, if it able to successfully connect then some process is listening on that port. To read more about telnet read
networking command in UNIX
10. How do you find whether your system is 32 bit or 64 bit ?
Either by using "uname -a" command or by using "arch" command.
Advanced UNIX Interview Questions and Answers
1. How do you find which processes are using a particular file?
By using lsof command in UNIX. It wills list down PID of all the process which is using a particular file.
2. How do you find which remote hosts are connecting to your host on a particular port say 10123?
By using netstat command execute netstat -a | grep "port" and it will list the entire host which is connected to this host on port 10123.
3. What is nohup in UNIX?
4. What is ephemeral port in UNIX?
Ephemeral ports are port used by Operating system for client sockets. There is a specific range on which OS can open any port specified by ephemeral port range.
5. If one process is inserting data into your MySQL database? How will you check how many rows inserted into every second?
Purpose of this Unix Command Interview is asking about "watch" command in UNIX which is repeatedly execute command provided with specified delay.
6. There is a file Unix_Test.txt which contains words Unix, how will you replace all Unix to UNIX?
You can answer this Unix Command Interview question by using SED command in UNIX for example you can execute sed s/Unix/UNIX/g fileName.
7. You have a tab separated file which contains Name, Address and Phone Number, list down all Phone Number without there name and Addresses?
To answer this Unix Command Interview question you can either you AWK or CUT command here. CUT use tab as default separator so you can use
cut -f3 filename.
8. Your application home directory is full? How will you find which directory is taking how much space?
By using disk usage (DU) command in Unix for example du –sh . | grep G will list down all the directory which has GIGS in Size.
9. How do you find for how many days your Server is up?
By using uptime command in UNIX
10. You have an IP address in your network how will you find hostname and vice versa?
This is a standard UNIX command interview question asked by everybody and I guess everybody knows its answer as well. By using
nslookup command in UNIX, you can read more about
Convert IP Address to hostname in Unix here.
I hope this
UNIX command interview questions and answers would be useful for quick glance before going for any UNIX or Java job interview. Please share any interesting UNIX command interview you have come across and I will add into this list. If you are going for any Unix interview on brokerage firm or stock trading company or any Investment bank you can have a quick look here, though most of questions you might already know but its good to review it. if you like this you can see my other
unix command tutorial for beginners as well
Some of my favorite interview questions post , you may find interesting
Read more: http://javarevisited.blogspot.com/2011/05/unix-command-interview-questions.html#ixzz2jyvG5NZW
- Databases Questions & Answers
Databases Questions & Answers 1. What are two methods of retrieving SQL? 2. What curso ...
- Financial Information Exchange (FIX) Protocol Interview Questions Answers[z]
What do you mean by Warrant?Warrant is a financial product which gives right to holder to Buy or Sel ...
- Unix command 积累
UNIX is a multi-user multitasking-optimized operating system that can run on various hardware platfo ...
- Execute Unix Command via Putty_QTP
plink_path = "C:/plink.exe" 'plink.exe 路径 username = "username" '用户名 p ...
- Yandex Big Data Essentials Week1 Unix Command Line Interface Processes managing
free displays the total amount of free and used memory free [options] top provides a dynamic real-ti ...
- Linux / Unix Command: bunzip2--reference
http://linux.about.com/library/cmd/blcmdl1_bunzip2.htm NAME bzip2, bunzip2 - a block-sorting file co ...
- Linux / Unix Command: rz
yum install lrzsz Most communications programs invoke rz and sz automatically. You can also connect ...
- How to ping and test for a specific port from Linux or Unix command line
Use telnet command The syntax is:telnet {host} {port}telnet www.cyberciti.biz 80telnet 192.168.2.254 ...
- Yandex Big Data Essentials Week1 Unix Command Line Interface File Content exploration
cat displays the contents of a file at the command line copies or apppend text file into a document ...
随机推荐
- 记录一次会话CRT
记录一次会话CRT --------------------- su -oracle sqlplus / as sysdba sqlplus username/password 如:普通用户登录 ...
- C#学习笔记(第1周作业)
受队友诱惑,去听了李强的C#公选课,第二天就完成作业了. 作业要求: 1. 小学生加法程序: 2. 能自由设置难度: 3. 对结果进行统计. 第一次写C#程序,遇到不少困难,和队友讨论,百度谷歌一齐上 ...
- 1_1准备工作[wp8特色开发与编程技巧]
1准备工作 大家好,我是徐文康,今天我要开始带大家玩转windowsphone8 app的开发 在这一套视频中,我将带大家从零开始学习编程.在互联网时代熟悉编程是非常有必要的.差异化竞争将变成趋势,那 ...
- Bootstrap轮播获取当前活动的焦点对象
在项目中使用了Bootstrap的轮播,需求是轮播下方有一个已读按钮,当点击已读按钮时,隐藏掉当前的焦点的轮播内容: 如图所示: 所以要获取当前的焦点是哪一条: 下方代码是在网络上找到的一个方 ...
- Ubuntu 14.04下java开发环境的搭建--3--Tomcat及MySQL的安装
前面两篇文章,已经说明了JDK和Eclipse 的安装方法,下面简单说一下,Tomcat及MySQL的安装方法. Tomcat的安装. 在合适的地方解压apache-tomcat-6.0.39.tar ...
- Android 官网提供的Custom-view 编译出错--error: No resource identifier found for attribute
error: No resource identifier found for attribute in custom-views from http://developer.android.com ...
- js设计模式(6)---适配器模式
0.前言 脖子又开始痛了,难道还没成为码农就开始出现颈椎问题,一直以来举得自己不算那种死宅的人,怎么这么年轻就出现这种问题.哎,不管了,还是先把自己学习的适配器模式写出来,算是一种总结吧. 1.为什么 ...
- WIN10主动推升级,有点意思
不论正与盗,皆推升级,是否一样可用?
- 使用GDataXML解析XML文档
转载自:http://blog.csdn.net/tangren03/article/details/7868246 在IOS平台上进行XML文档的解析有很多种方法,在SDK里面有自带的解析方法,但是 ...
- openerp学习笔记 跟踪状态,记录日志,发送消息
跟踪状态基础数据: kl_qingjd/kl_qingjd_data.xml <?xml version="1.0"?><openerp> <d ...