Common basic interview practice questions for Linux operation and maintenance (2)

Common basic interview practice questions for Linux operation and maintenance ( 2 )

11 How to view the processes occupying port 8080.

method one

[root @ zxc data] # ps -ef | grep 8080

root       3886   3804  0 17:11 pts/1    00:00:00 grep 8080

[root@zxc data]#

 

12 The startup scripts of all Linux services are stored in the ( /etc/rc.d/init.d ) directory. 

A /etc/rc.d/init.d  B /etc/init.d  C /etc/rc.d/rc  D /etc/rc.d

 

13 If the user wants a detailed understanding of a command, available ( man ) .

A ls  B help  C man  D dir

 

14 What is the system partition standard for Linux servers in the enterprise? (hard disk 300G, memory 16G)

/boot   200MB

swap    8G

/ leave all to root

 

15 What skills and professional qualities do Linux operation and maintenance engineers need to have?

Proficient in linux Proficient in Shell Proficient in website architecture

Humble and prudent     good at summarizing

 

16 In vim, replace all oldboys with oldgirls and give commands.

:%s#oldboy#oldgirl#g

 

17 Find and delete log files older than seven days in /app/logs/.

method one

find /app/logs/ -type f  -mtime +7|xargs rm -f

Method Two  

find /app/logs/ -type f -mtime +7 -exec rm {} \;

Method three  

find /app/logs/ -typ

 

18 Find and delete the files whose last creation time is 3 days ago and the suffix is ​​".log".

    find directory -type f +mtime +3 |xargs rm -f

 

19 Query the line number of the blank line in the file.

[root@zxc oldboy]# grep -n "^$" a.txt

2:

4:

6:

8:

[root@zxc oldboy]#

 

20 How to check the number of files in the /var/log directory

[root@zxc oldboy]# find /var/log  -maxdepth 1 -type f |nl

 

21 Briefly describe the Linux startup process

   bios hardware self-test - mbr boot - grub menu loads kernel - init process starts - inittab reads run level - runs rc.d/init script - displays login window   

 

22 How to count how many directories are under /uar/home/data

[root@zxc oldboy]# find /uar/home/data -maxdepth 1 -type d |nl

 

2 3  The kernel program that Linux uses to start the system is located in ( /boot )

A /   B /lib/modules/2.4.20_8/kernel   C /boot   D /proc

 

24 统计磁盘空间或文件系统使用情况的命令是(df

A df  B dd  C du  D fdisk

 

25 在使用mkdir命令创建新的目录时,在其父目录不存在时先创建父目录的选项是(-p

A -m   B -d   C -f  D -p

 

26 打印出file1文件第1到第3行

sed  '1,3p' file

 

27 管道的意义

  把前一个命令的结果传递给后面的命令取执行    

 

28 若当前目录为/home,命令ls -l 将显示home目录下的(以长格式的形式显示文件的信息

29 Linux内核引导时,从文件(/etc/fstab)中读取要加载的文件系统。

30 Linux系统中,用来存放系统所需的配置文件和子目录的目录是(/etc

31 进行字符串查找,使用(find)命令。

32 默认情况下管理员创建了一个用户,就会在(/home)目录下创建一个用户主目录。

A /usr  B /home  C /root  D/etc

 

33 vi编辑器里,命令“dd”用来删除当前的()。

A 行  B 变量  C   D 字符

 

34 按下(CTRL+C)键能终止当前运行的命令。

A CTRL+C  B CTRL+F  C CTRL+B  D CTRL+D

 

35 Linux系统中查看IP地址的命令是(ifconfig

A ifconing  B ifconfig  C icmp  D iptables

 

36 Linux系统中,用来存放系统所需的配置文件和子目录是(/etc

A /etc  B /var  C /root  D /home

 

37 关闭Linux系统(不重启)可使用命令(halt

A Ctrl+Alt+Del   B halt   C shutdown -r now   D reboot

shutdown

halt

poweroff

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326006166&siteId=291194637