linux Operation and maintenance engineers are often asked various questions during the interview , Next, I will arrange the interview questions according to my own experience for your reference .
Take out the file aaa.txt Of the 4 To 7 That's ok
[root@localhost ~]# cat aaa.txt
[root@localhost ~]# sed -n '4,7p' aaa.txt
Find the current directory txt Final document
[root@localhost ~]# ls
1.txt 2.txt 3.pdf aaa.txt anaconda-ks.cfg
[root@localhost ~]# find ./ -name "*.txt"
lookup /usr More than 1M The file of
[root@localhost ~]# find /usr -type f -size +10240k
Write a scheduled task 5 Point to 8 Point to perform
- 5-8 * /usr/bin/backup
mysql Master slave replication principle
Main library db Update event for (update、insert、delete) Written to binlog.
The master library creates a binlog dump thread, hold binlog Content sent from library .
Start and initiate a connection from the library , Connect to the main library .
After starting from the library , Create a I/O Threads , Read from the main library binlog Content and write to relay log.
After starting from the library , Create a SQL Threads , from relay log Read the contents inside , from Exec_Master_Log_Pos The location starts executing the read update event , Write the update to slave Of db.
vim There are several modes of operation
command Pattern . End of line mode , Edit mode
sketch dns Analytical process ？ visit www.baidu.com Analytic flow
Priority to local dns cache , Look for local /etc/hosts file , Whether there is forced parsing , If you don't go /etc/resolv.conf designated dns Search for records in the server ( Networking required , stay dns After finding the resolution record in the server , In the local dns Add cache to , Finish once dns analysis
Explain DNS Two modes of query
Recursive query is a kind of DNS The query mode of the server , In this mode DNS The server received a client request , You must reply to the client with an accurate query result . If DNS The server does not store queries locally DNS Information , Then the server will ask other servers , And submit the returned query results to the client .
DNS Another query method of the server is iterative query ,DNS The server will provide other services to the client that can resolve the query request DNS Server address , When the client sends a query request ,DNS The server does not reply directly to the query results , Instead, tell the client another DNS Server address , The client will go to this DNS The server submits the request , Loop back and forth until the result of the query is returned .
Describe forward and reverse proxies
For example, we visit foreign websites at home , No direct access to , We can use a forward proxy server , Request sent to agent service , The proxy server can access foreign websites , In this way, the agent goes to the foreign website to get the returned data , And back to us , So we can visit .
Reverse proxy is actually run as a proxy server to accept internet Connection request on , Then forward the request to the server on the internal network , And return the results from the server to the internet Clients requesting connections on , At this time, the client only accesses the proxy server, but does not know how many servers are behind it .
The above is the arrangement of my interview , I hope that's helpful .