linux questions

linux:
1.How do you identify a Java process id in a UNIX machine?
jps

2.How do you get a thread dump of a Java process in a UNIX machine?
jmap

3.If you have multiple java processes running in a UNIX machine, how would you identify a particular process?
pf -ef | grep processid

4.What tools/commands do you use to help you identify an out of control Java process in a UNIX machine?

5.How would you display the number of active established connections to localhost in a UNIX machine?
netstat

6.How do you find out drive statistics in a UNIX machine?
fdisk

7.How do you list the files in current directory sorted by size in a UNIX machine?
# du /etc | sort -nr | more

8.How do you delete blank lines in a file in a UNIX machine ?
有时当进行某些配置文件的查看时,分去除注释(如:"#"),但之后还会发现中间也许会有好多空行,所以,现小结一下去除空行的方法。

1)用tr命令
# grep -v "#" /etc/snmp/snmpd.conf |tr -s '/n'

2)用sed命令
# grep -v "#" /etc/snmp/snmpd.conf |sed '/^$/d'

3)用awk命令
# grep -v "#" /etc/snmp/snmpd.conf |awk '{if($0!="")print}'
# grep -v "#" /etc/snmp/snmpd.conf | awk '{if(length !=0) print $0}'

4)用grep命令
# grep -v "#" /etc/snmp/snmpd.conf |grep -v "^$"

5) 用grep命令
# grep ^[^#]  /etc/snmp/snmpd.conf
我解释下^[^#]/  是个正则表达式。 ^[^#] 取的结果为非#开头的行。

注:本文中的"|"管道前是去除注释,管道后是去除空行。上面所有例子中是用grep -v来去除注释,也可以用sed -e "s/#.*//g" filename 来过滤。


9.How would you display all the files recursively under current directory in a UNIX machine?
ll -r

10.How would you display disk usage in kilobytes in a UNIX machine?
du:查询档案或目录的磁盘使用空间

11.How do you run a process in background?
http://blog.csdn.net/zjnig711/article/details/6722652

Personal and Behavioral/Situational
1.Did you have to use any design patterns in your Java project

2."Tell me about yourself or about some of the recent projects you have worked with? What do you consider your
most significant achievement? Why do you think you are qualified for this position? Why should we hire you and what kind of contributions will you make?"

3.Why are you leaving your current position?

4.How do you handle pressure? Do you like or dislike these situations?

5."What are your strengths and weaknesses? Can you describe a situation where you took initiative? Can you
describe a situation where you applied your problem solving skills?"

6."Describe a time when you were faced with a stressful situation that demonstrated your coping skills? Give me an example of a time when you used your fact finding skills to solve a problem? Describe a time when you applied
your analytical and/or problem solving skills?"

7."Do you follow any software development processes like agile methodology, XP, RUP etc?

猜你喜欢

转载自huyumin.iteye.com/blog/1703303