收集的一些简单的UNIX/Linux面试题

上一篇 / 下一篇  2007-05-28 22:00:24 / 个人分类:求职面试

UNIX问题:
1. Q. How do you find out the processes that are currently running or a particular user?
   A. ps -au Myname   (-u by effective user ID (supports names)) (a - all users)

2. Q. How do you kill a process?
   A. kill -9  8 (process_id 8) or kill -9  %7  (job number 7)
      kill -9 -1  (Kill all processes you can kill.)
      killall - kill processes by name most (useful - killall java)


3. Q. What would you use to view contents of a large error log file?
   A. tail  -10 file_name   ( last 10 rows)


4.Q. How do you list contents of a directory including all of its
  subdirectories, providing full details and sorted by modification time?
   A. ls -lac
      -a all entries
      -c by time


5.Q. How do you create a symbolic link to a file (give some reasons of doing so)?
   A. ln /../file1 Link_name
Hard Link, soft Link?

6.Q. How do you check the sizes of all users锟?home directories (one command)?
   A. du -s
      df

7.Q. How do you check for processes started by user 'pat'?

   A. ps -fu pat   (-f -full_format u -user_name )

8.Q. How do you start a job on background?

   A. bg  %4  (job 4)

9. Q. How to remove directory with files?
    A. rm -rf directory_name

10. Q. How can you see all mounted drives?
    A. mount -l

11. Q. How can you find a path to the file in the system?
    A. locate file_name (locate - list files in databases that match a pattern)

12. Q. What Linux  HotKeys do you know?
    A. Ctrl-Alt-F1 Exit to command prompt
       Ctrl-Alt-F7 or F8    Takes you back to KDE desktop from command prompt
       Crtl-Alt-Backspace Restart XWindows
       Ctrl-Alt-D Show desktop

13. 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.

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


TAG: UNIX Linux 面试 求职面试

一个人的安静 引用 删除 zl121452974@126   /   2011-02-16 19:46:37
能给咱整成中文不~!
jm_gold的个人空间 引用 删除 fanjianmin   /   2010-05-06 21:01:27
只要好好看一下基础,基本都会做,很常用的一些命令
 

评分:0

我来说两句

Open Toolbar