linuxOperation and maintenance engineers are often asked a variety of questions during the interview. Next, I will sort out the interview questions according to my own experience for your reference.
Take out the document aaa.txt Lines 4 to 7 of
[[email protected] ~]# cat aaa.txt
1.aaa
2.bbbbbbb
3.ccccccccccccc
4.dddddddddddddddddddddd
5.eeeeeeeeeeeeeeeeee
6.ffffffffffffffffffffffffffffffffff
7.gggggggggggggggggggggg
8.hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
9.iiiiiiiiiiiiiiiiiiii
10.jjjjjjjjjjjjjjjjjjjjjjjjjj
11.kkk
12.llllllllll
[[email protected] ~]# sed -n ‘4,7p’ aaa.txt
4.dddddddddddddddddddddd
5.eeeeeeeeeeeeeeeeee
6.ffffffffffffffffffffffffffffffffff
7.gggggggggggggggggggggg
Find the file ending in txt in the current directory
[[email protected] ~]# ls
1.txt 2.txt 3.pdf aaa.txt anaconda-ks.cfg
[[email protected] ~]# find ./ -name “*.txt”
./aaa.txt
./1.txt
./2.txt
Find files over 1m in / usr directory
[[email protected] ~]# find /usr -type f -size +10240k
/usr/lib/locale/locale-archive
/usr/lib64/libicudata.so.50.1.2
Write a timed task from 5:00 to 8:00
- 5-8 * /usr/bin/backup
Principle of master slave replication in MySQL
The update events (update, insert, delete) of the main database DB are written to binlog.
The master database creates a binlog dump thread to send the contents of binlog to the slave library.
The slave library starts and initiates a connection to the master library.
After the slave library is started, an I / O thread is created to read the binlog content from the main database and write it to the relay log.
After starting from the library, create a SQL thread to read the contents from the relay log, and then execute_ Master_ Log_ The POS location starts to execute the read update event and writes the update content to the DB of the slave.
VIM has several modes of operation
commandpattern. End of line mode
Brief introduction of DNS resolution process? visit www.baidu.com Analysis process of
First look up the local DNS cache, find the local / etc / hosts file, whether there is forced resolution, if not, go to / etc/ resolv.conf Find records in the specified DNS server (networking is required. After finding the resolution records in the DNS server, add a cache in the local DNS to complete a DNS resolution
Explain the two modes of DNS query
recursive query
Recursive query is a query mode of DNS server. In this mode, the DNS server receives the client request and must reply to the client with an accurate query result. If the DNS server does not store query DNS information locally, the server will query other servers and submit the returned query results to the client.
Iterative query
Another query method of DNS server is iterative query. The DNS server will provide the client with other DNS server addresses that can resolve the query request. When the client sends a query request, the DNS server does not directly reply to the query result, but tells the client the address of another DNS server, and the client sends the DNS server address to the client The server submits the request and loops in turn until the result of the query is returned.
Describe forward and reverse proxies
Forward agent
For example, if we visit foreign websites at home, but we can’t access them directly, we can use a forward proxy server to send the request to the proxy server. The proxy server can visit the foreign website. In this way, the agent can get the returned data from the foreign website, and then return it to us, so that we can visit it.
Reverse proxy
The actual operation mode of reverse proxy is that the proxy server receives the connection request on the Internet, then forwards the request to the server on the internal network, and returns the result from the server to the client requesting connection on the Internet. At this time, the client only accesses the proxy server, but does not know how many servers there are.
summary
The above is the arrangement of my interview, I hope to help you.