设为首页 加入收藏

TOP

Linux Interview Questions For software testers(三)
2014-11-23 23:29:03 来源: 作者: 【 】 浏览:11
Tags:Linux Interview Questions For software testers
4096 Dec 7 14:22 etc
drwxr-xr-x 11 dotpc dotpc 4096 Mar 21 15:54 client-2.9.5
-rw-r–r– 1 dotpc dotpc 644836 Mar 22 09:53 client-2.9.5.tar.gz


A. This is a result of command $ls -l
we have two files, 6 directories and one link to client-2.9.5 directory.
There is number of files in every directory, size and data of last change.


53. Q. If you would like to run two commands in sequence what operators you can use


A. ; or && the difference is:
if you separate commands with ; second command will be run automatically.
if you separate commands with && second command will be run only in the case
the first was run successfully.


54. Q. How you will uncompress the file
A. Use tar command (The GNU version of the tar archiving utility):
tar -zxvf file_name.tar.gz


55. Q.How do you execute a program or script, my_script in your current directoty
A. ./my_script


56. Q.How to find current time configuration in the file my_new.cfg
A. grep time my_new.cfg
Grep searches the named input files (or standard input if
no files are named, or the file name – is given) for lines
containing a match to the given pattern.


Q. What does grep() stand for
A. General Regular Expression Parser.


57. Q. What does the top command display
A. Top provides an ongoing look at processor activity in real
time. It displays a listing of the most CPU-intensive
tasks on the system, and can provide an interactive inter
face for manipulating processes. (q is to quit)


58. Q. How can you find configuration on linux
A. by using /sin/ifconfig
If no arguments are given, ifconfig displays the status of the cur-
rently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argu-
ment is given, it displays the status of all interfaces, even those
that are down. Otherwise, it configures an interface.


59. Q. How to find difference in two configuration files on the same server
A. Use diff command that is compare files line by line
diff -u /usr/home/my_project1/etc/ABC.conf /usr/home/my_project2/etc/ABC.conf


60. Q. What is the best way to see the end of a logfile.log file
A. Use tail command – output the last part of files
tail -n file_name ( the last N lines, instead of the last 10 as default)


61. Q. Please write a loop for removing all files in the current directory that contains a word ‘log’
A. for i in *log*; do rm $i; done


62. Question: How to switch to a previously used directory
Answer: cd -


首页 上一页 1 2 3 4 下一页 尾页 3/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇float属性的作用 下一篇软件测试过程中主要遇到哪些挑战?

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: