1. Linux startup process 2, Linux delete file principle 3, Hard link and soft connection difference
The difference is that the inode is different
Hard links, the same node, different file names, space does not increase;
Soft links (similar to Windows shortcuts), different nodes, block contents point to source file path.
View node Ls-li Stat Lookup node find
How to use soft links: ln [-SF] source file destination file
Option:-s means creating a soft link, without adding a hard link
-F means that there is a time to delete when creating
#建立软链接
mv/data/ftp/data2/
Ln-s/data2/ftp/data/ftp
#删除软连接
#当删除链接文件时, if you accidentally erase the original file,
Rm/data/ftp
#只是少了一个 "/" is to delete the link file, that is, at the end of the file do not add "/"
Conclusion:
Be careful when deleting files
When deleting a soft link file, be careful to use tab construction, and do not add "/" to the back of the directory.
Files are kept in sync, whether it's a soft link or a hard link
4. SSH principle
Authentication methods based on public and private keys:
使用ssh-keygen等程序生成公钥 id_dsa.pub 和私钥 id_dsa对,服务端放在将要远程登录过来的那个账号的目录的.ssh目录下面。客户端使用密钥和算法协商阶段生成的会话密钥加密账号、认证方法、id_dsa.pub,将结果发送给服务端。服务端使用会话密钥解密报文,得到账号、id_dsa.pub。服务端在这个账号的目录的.ssh目录下找对应的公钥,如果没有找到,发送失败消息给客户端,如果找到,比较客户发送过来的这个公钥和找到的公钥,如果内容相同,服务端生成一个随机的字符串,简称“质询”,然后使用找到的公钥加密这个质询,然后使用会话密钥再次加密。服务端把这个双重加密的数据发送给客户端。客户端使用会话密钥解密报文,然后使用id_dsa再次解密数据,得到质询。客户端使用会话密钥加密质询,发送给服务端。服务端使用会话密钥解密报文,得到质询,判断是不是自己生成的那个质询,如果不相同,发送失败消息给客户端,如果相同,认证通过。
5, Nat Principle 6, the principle of distribution
Distributed File System (distributed) means that the physical storage resources managed by the file system are not necessarily directly connected to the local nodes, but are connected to the nodes through the computer network. The design of a distributed file system is based on client/server mode. A typical network might include multiple servers for multiple users to access. In addition, the peer-to feature allows some systems to play the dual role of the client and server.
Four, Distributed File system Fastdfs design principle
It is particularly suitable for online services with medium and small files (recommended range: 4KB < file_size <500MB).
Tracker and Storage synchronization mechanisms
Upload and download
7, the shell principle of operation 8, the principle of DDoS
9. Cross-Station * * *
The principle is to enter (incoming) malicious HTML code into a Web site with an XSS vulnerability, and when other users browse the site, the HTML code is automatically executed to achieve the purpose. For example, theft of user cookies, destruction of page structure, redirection to other websites, etc. Never trust the user's input. The user's input needs to be processed, allowing only valid values to be entered, and all other values filtered out.
Ftp
Linux Fundamentals and Fundamentals