{"id":81454,"date":"2023-10-21T06:19:05","date_gmt":"2023-10-20T22:19:05","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=81454"},"modified":"2023-10-21T06:19:05","modified_gmt":"2023-10-20T22:19:05","slug":"linux-system-structure","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-system-structure.html","title":{"rendered":"\u5e26\u4f60\u771f\u6b63\u8ba4\u8bc6Linux \u7cfb\u7edf\u7ed3\u6784"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nLinux\u7cfb\u7edf\u4e00\u822c\u67094\u4e2a\u4e3b\u8981\u90e8\u5206\uff1a\u5185\u6838\u3001shell\u3001\u6587\u4ef6\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u3002\u5185\u6838\u3001shell\u548c\u6587\u4ef6\u7cfb\u7edf\u4e00\u8d77\u5f62\u6210\u4e86\u57fa\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf\u7ed3\u6784\uff0c\u5b83\u4eec\u4f7f\u5f97\u7528\u6237\u53ef\u4ee5\u8fd0\u884c\u7a0b\u5e8f\u3001\u7ba1\u7406\u6587\u4ef6\u5e76\u4f7f\u7528\u7cfb\u7edf\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

1. linux\u5185\u6838<\/strong><\/div>\n

\u5185\u6838\u662f\u64cd\u4f5c\u7cfb\u7edf\u7684\u6838\u5fc3\uff0c\u5177\u6709\u5f88\u591a\u6700\u57fa\u672c\u529f\u80fd\uff0c\u5b83\u8d1f\u8d23\u7ba1\u7406\u7cfb\u7edf\u7684\u8fdb\u7a0b\u3001\u5185\u5b58\u3001\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u3001\u6587\u4ef6\u548c\u7f51\u7edc\u7cfb\u7edf\uff0c\u51b3\u5b9a\u7740\u7cfb\u7edf\u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n

Linux \u5185\u6838\u7531\u5982\u4e0b\u51e0\u90e8\u5206\u7ec4\u6210\uff1a\u5185\u5b58\u7ba1\u7406\u3001\u8fdb\u7a0b\u7ba1\u7406\u3001\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u3001\u6587\u4ef6\u7cfb\u7edf\u548c\u7f51\u7edc\u7ba1\u7406\u7b49\u3002\u5982\u56fe\uff1a<\/p>\n

\"\"<\/p>\n

\u7cfb\u7edf\u8c03\u7528\u63a5\u53e3\uff1a<\/strong><\/span>SCI \u5c42\u63d0\u4f9b\u4e86\u67d0\u4e9b\u673a\u5236\u6267\u884c\u4ece\u7528\u6237\u7a7a\u95f4\u5230\u5185\u6838\u7684\u51fd\u6570\u8c03\u7528\u3002\u8fd9\u4e2a\u63a5\u53e3\u4f9d\u8d56\u4e8e\u4f53\u7cfb\u7ed3\u6784\uff0c\u751a\u81f3\u5728\u76f8\u540c\u7684\u5904\u7406\u5668\u5bb6\u65cf\u5185\u4e5f\u662f\u5982\u6b64\u3002SCI \u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u51fd\u6570\u8c03\u7528\u591a\u8def\u590d\u7528\u548c\u591a\u8def\u5206\u89e3\u670d\u52a1\u3002\u5728 .\/linux\/kernel \u4e2d\u60a8\u53ef\u4ee5\u627e\u5230 SCI \u7684\u5b9e\u73b0\uff0c\u5e76\u5728 .\/linux\/arch \u4e2d\u627e\u5230\u4f9d\u8d56\u4e8e\u4f53\u7cfb\u7ed3\u6784\u7684\u90e8\u5206\u3002<\/p>\n

1.1 \u5185\u5b58\u7ba1\u7406<\/strong><\/span><\/div>\n

\u5bf9\u4efb\u4f55\u4e00\u53f0\u8ba1\u7b97\u673a\u800c\u8a00\uff0c\u5176\u5185\u5b58\u4ee5\u53ca\u5176\u5b83\u8d44\u6e90\u90fd\u662f\u6709\u9650\u7684\u3002\u4e3a\u4e86\u8ba9\u6709\u9650\u7684\u7269\u7406\u5185\u5b58\u6ee1\u8db3\u5e94\u7528\u7a0b\u5e8f\u5bf9\u5185\u5b58\u7684\u5927\u9700\u6c42\u91cf\uff0cLinux \u91c7\u7528\u4e86\u79f0\u4e3a\u201c\u865a\u62df\u5185\u5b58\u201d\u7684\u5185\u5b58\u7ba1\u7406\u65b9\u5f0f\u3002Linux \u5c06\u5185\u5b58\u5212\u5206\u4e3a\u5bb9\u6613\u5904\u7406\u7684\u201c\u5185\u5b58\u9875\u201d\uff08\u5bf9\u4e8e\u5927\u90e8\u5206\u4f53\u7cfb\u7ed3\u6784\u6765\u8bf4\u90fd\u662f 4KB\uff09\u3002Linux \u5305\u62ec\u4e86\u7ba1\u7406\u53ef\u7528\u5185\u5b58\u7684\u65b9\u5f0f\uff0c\u4ee5\u53ca\u7269\u7406\u548c\u865a\u62df\u6620\u5c04\u6240\u4f7f\u7528\u7684\u786c\u4ef6\u673a\u5236\u3002<\/p>\n

\u4e0d\u8fc7\u5185\u5b58\u7ba1\u7406\u8981\u7ba1\u7406\u7684\u53ef\u4e0d\u6b62 4KB \u7f13\u51b2\u533a\u3002Linux \u63d0\u4f9b\u4e86\u5bf9 4KB \u7f13\u51b2\u533a\u7684\u62bd\u8c61\uff0c\u4f8b\u5982 slab \u5206\u914d\u5668\u3002\u8fd9\u79cd\u5185\u5b58\u7ba1\u7406\u6a21\u5f0f\u4f7f\u7528 4KB \u7f13\u51b2\u533a\u4e3a\u57fa\u6570\uff0c\u7136\u540e\u4ece\u4e2d\u5206\u914d\u7ed3\u6784\uff0c\u5e76\u8ddf\u8e2a\u5185\u5b58\u9875\u4f7f\u7528\u60c5\u51b5\uff0c\u6bd4\u5982\u54ea\u4e9b\u5185\u5b58\u9875\u662f\u6ee1\u7684\uff0c\u54ea\u4e9b\u9875\u9762\u6ca1\u6709\u5b8c\u5168\u4f7f\u7528\uff0c\u54ea\u4e9b\u9875\u9762\u4e3a\u7a7a\u3002\u8fd9\u6837\u5c31\u5141\u8bb8\u8be5\u6a21\u5f0f\u6839\u636e\u7cfb\u7edf\u9700\u8981\u6765\u52a8\u6001\u8c03\u6574\u5185\u5b58\u4f7f\u7528\u3002<\/p>\n

\u4e3a\u4e86\u652f\u6301\u591a\u4e2a\u7528\u6237\u4f7f\u7528\u5185\u5b58\uff0c\u6709\u65f6\u4f1a\u51fa\u73b0\u53ef\u7528\u5185\u5b58\u88ab\u6d88\u8017\u5149\u7684\u60c5\u51b5\u3002\u7531\u4e8e\u8fd9\u4e2a\u539f\u56e0\uff0c\u9875\u9762\u53ef\u4ee5\u79fb\u51fa\u5185\u5b58\u5e76\u653e\u5165\u78c1\u76d8\u4e2d\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u79f0\u4e3a\u4ea4\u6362\uff0c\u56e0\u4e3a\u9875\u9762\u4f1a\u88ab\u4ece\u5185\u5b58\u4ea4\u6362\u5230\u786c\u76d8\u4e0a\u3002\u5185\u5b58\u7ba1\u7406\u7684\u6e90\u4ee3\u7801\u53ef\u4ee5\u5728 .\/linux\/mm \u4e2d\u627e\u5230\u3002<\/p>\n

1.2 \u8fdb\u7a0b\u7ba1\u7406<\/strong><\/span><\/div>\n

\u8fdb\u7a0b\u5b9e\u9645\u662f\u67d0\u7279\u5b9a\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u4e2a\u8fd0\u884c\u5b9e\u4f53\u3002<\/strong>\u5728 Linux \u7cfb\u7edf\u4e2d\uff0c\u80fd\u591f\u540c\u65f6\u8fd0\u884c\u591a\u4e2a\u8fdb\u7a0b\uff0cLinux \u901a\u8fc7\u5728\u77ed\u7684\u65f6\u95f4\u95f4\u9694\u5185\u8f6e\u6d41\u8fd0\u884c\u8fd9\u4e9b\u8fdb\u7a0b\u800c\u5b9e\u73b0\u201c\u591a\u4efb\u52a1\u201d\u3002\u8fd9\u4e00\u77ed\u7684\u65f6\u95f4\u95f4\u9694\u79f0\u4e3a\u201c\u65f6\u95f4\u7247\u201d\uff0c\u8ba9\u8fdb\u7a0b\u8f6e\u6d41\u8fd0\u884c\u7684\u65b9\u6cd5\u79f0\u4e3a\u201c\u8fdb\u7a0b\u8c03\u5ea6\u201d \uff0c\u5b8c\u6210\u8c03\u5ea6\u7684\u7a0b\u5e8f\u79f0\u4e3a\u8c03\u5ea6\u7a0b\u5e8f\u3002<\/p>\n

\u8fdb\u7a0b\u8c03\u5ea6\u63a7\u5236\u8fdb\u7a0b\u5bf9CPU\u7684\u8bbf\u95ee\u3002<\/strong>\u5f53\u9700\u8981\u9009\u62e9\u4e0b\u4e00\u4e2a\u8fdb\u7a0b\u8fd0\u884c\u65f6\uff0c\u7531\u8c03\u5ea6\u7a0b\u5e8f\u9009\u62e9\u6700\u503c\u5f97\u8fd0\u884c\u7684\u8fdb\u7a0b\u3002\u53ef\u8fd0\u884c\u8fdb\u7a0b\u5b9e\u9645\u4e0a\u662f\u4ec5\u7b49\u5f85CPU\u8d44\u6e90\u7684\u8fdb\u7a0b\uff0c\u5982\u679c\u67d0\u4e2a\u8fdb\u7a0b\u5728\u7b49\u5f85\u5176\u5b83\u8d44\u6e90\uff0c\u5219\u8be5\u8fdb\u7a0b\u662f\u4e0d\u53ef\u8fd0\u884c\u8fdb\u7a0b\u3002Linux\u4f7f\u7528\u4e86\u6bd4\u8f83\u7b80\u5355\u7684\u57fa\u4e8e\u4f18\u5148\u7ea7\u7684\u8fdb\u7a0b\u8c03\u5ea6\u7b97\u6cd5\u9009\u62e9\u65b0\u7684\u8fdb\u7a0b\u3002<\/p>\n

\u901a\u8fc7\u591a\u4efb\u52a1\u673a\u5236\uff0c\u6bcf\u4e2a\u8fdb\u7a0b\u53ef\u8ba4\u4e3a\u53ea\u6709\u81ea\u5df1\u72ec\u5360\u8ba1\u7b97\u673a\uff0c\u4ece\u800c\u7b80\u5316\u7a0b\u5e8f\u7684\u7f16\u5199\u3002\u6bcf\u4e2a\u8fdb\u7a0b\u6709\u81ea\u5df1\u5355\u72ec\u7684\u5730\u5740\u7a7a\u95f4\uff0c\u5e76\u4e14\u53ea\u80fd\u7531\u8fd9\u4e00\u8fdb\u7a0b\u8bbf\u95ee\uff0c\u8fd9\u6837\uff0c\u64cd\u4f5c\u7cfb\u7edf\u907f\u514d\u4e86\u8fdb\u7a0b\u4e4b\u95f4\u7684\u4e92\u76f8\u5e72\u6270\u4ee5\u53ca\u201c\u574f\u201d\u7a0b\u5e8f\u5bf9\u7cfb\u7edf\u53ef\u80fd\u9020\u6210\u7684\u5371\u5bb3\u3002 \u4e3a\u4e86\u5b8c\u6210\u67d0\u7279\u5b9a\u4efb\u52a1\uff0c\u6709\u65f6\u9700\u8981\u7efc\u5408\u4e24\u4e2a\u7a0b\u5e8f\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u4e00\u4e2a\u7a0b\u5e8f\u8f93\u51fa\u6587\u672c\uff0c\u800c\u53e6\u4e00\u4e2a\u7a0b\u5e8f\u5bf9\u6587\u672c\u8fdb\u884c\u6392\u5e8f\u3002\u4e3a\u6b64\uff0c\u64cd\u4f5c\u7cfb\u7edf\u8fd8\u63d0\u4f9b\u8fdb\u7a0b\u95f4\u7684\u901a\u8baf\u673a\u5236\u6765\u5e2e\u52a9\u5b8c\u6210\u8fd9\u6837\u7684\u4efb\u52a1\u3002Linux \u4e2d\u5e38\u89c1\u7684\u8fdb\u7a0b\u95f4\u901a\u8baf\u673a\u5236\u6709\u4fe1\u53f7\u3001\u7ba1\u9053\u3001\u5171\u4eab\u5185\u5b58\u3001\u4fe1\u53f7\u91cf\u548c\u5957\u63a5\u5b57\u7b49\u3002<\/p>\n

\u5185\u6838\u901a\u8fc7 SCI \u63d0\u4f9b\u4e86\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7f16\u7a0b\u63a5\u53e3\uff08API\uff09\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u8fdb\u7a0b\uff08fork\u3001exec \u6216 Portable Operating System Interface [POS\u2168] \u51fd\u6570\uff09\uff0c\u505c\u6b62\u8fdb\u7a0b\uff08kill\u3001exit\uff09\uff0c\u5e76\u5728\u5b83\u4eec\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u548c\u540c\u6b65\uff08signal \u6216\u8005 POS\u2168 \u673a\u5236\uff09\u3002<\/p>\n

1.3 \u6587\u4ef6\u7cfb\u7edf<\/strong><\/span><\/div>\n

\u548c DOS \u7b49\u64cd\u4f5c\u7cfb\u7edf\u4e0d\u540c\uff0cLinux \u64cd\u4f5c\u7cfb\u7edf\u4e2d\u5355\u72ec\u7684\u6587\u4ef6\u7cfb\u7edf\u5e76\u4e0d\u662f\u7531\u9a71\u52a8\u5668\u53f7\u6216\u9a71\u52a8\u5668\u540d\u79f0\uff08\u5982 A: \u6216 C: \u7b49\uff09\u6765\u6807\u8bc6\u7684\u3002\u76f8\u53cd\uff0c\u548c UNIX \u64cd\u4f5c\u7cfb\u7edf\u4e00\u6837\uff0cLinux \u64cd\u4f5c\u7cfb\u7edf\u5c06\u72ec\u7acb\u7684\u6587\u4ef6\u7cfb\u7edf\u7ec4\u5408\u6210\u4e86\u4e00\u4e2a\u5c42\u6b21\u5316\u7684\u6811\u5f62\u7ed3\u6784\uff0c\u5e76\u4e14\u7531\u4e00\u4e2a\u5355\u72ec\u7684\u5b9e\u4f53\u4ee3\u8868\u8fd9\u4e00\u6587\u4ef6\u7cfb\u7edf\u3002Linux \u5c06\u65b0\u7684\u6587\u4ef6\u7cfb\u7edf\u901a\u8fc7\u4e00\u4e2a\u79f0\u4e3a\u201c\u6302\u88c5\u201d\u6216\u201c\u6302\u4e0a\u201d\u7684\u64cd\u4f5c\u5c06\u5176\u6302\u88c5\u5230\u67d0\u4e2a\u76ee\u5f55\u4e0a\uff0c\u4ece\u800c\u8ba9\u4e0d\u540c\u7684\u6587\u4ef6\u7cfb\u7edf\u7ed3\u5408\u6210\u4e3a\u4e00\u4e2a\u6574\u4f53\u3002Linux \u64cd\u4f5c\u7cfb\u7edf\u7684\u4e00\u4e2a\u91cd\u8981\u7279\u70b9\u662f\u5b83\u652f\u6301\u8bb8\u591a\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6\u7cfb\u7edf\u3002Linux \u4e2d\u6700\u666e\u904d\u4f7f\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u662f Ext2\uff0c\u5b83\u4e5f\u662f Linux \u571f\u751f\u571f\u957f\u7684\u6587\u4ef6\u7cfb\u7edf\u3002\u4f46 Linux \u4e5f\u80fd\u591f\u652f\u6301 FAT\u3001VFAT\u3001FAT32\u3001MINIX \u7b49\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u4ece\u800c\u53ef\u4ee5\u65b9\u4fbf\u5730\u548c\u5176\u5b83\u64cd\u4f5c\u7cfb\u7edf\u4ea4\u6362\u6570\u636e\u3002\u7531\u4e8e Linux \u652f\u6301\u8bb8\u591a\u4e0d\u540c\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u5e76\u4e14\u5c06\u5b83\u4eec\u7ec4\u7ec7\u6210\u4e86\u4e00\u4e2a\u7edf\u4e00\u7684\u865a\u62df\u6587\u4ef6\u7cfb\u7edf.<\/p>\n

\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\uff08VirtualFileSystem,VFS\uff09:<\/strong>\u9690\u85cf\u4e86\u5404\u79cd\u786c\u4ef6\u7684\u5177\u4f53\u7ec6\u8282\uff0c\u628a\u6587\u4ef6\u7cfb\u7edf\u64cd\u4f5c\u548c\u4e0d\u540c\u6587\u4ef6\u7cfb\u7edf\u7684\u5177\u4f53\u5b9e\u73b0\u7ec6\u8282\u5206\u79bb\u4e86\u5f00\u6765\uff0c\u4e3a\u6240\u6709\u7684\u8bbe\u5907\u63d0\u4f9b\u4e86\u7edf\u4e00\u7684\u63a5\u53e3\uff0cVFS\u63d0\u4f9b\u4e86\u591a\u8fbe\u6570\u5341\u79cd\u4e0d\u540c\u7684\u6587\u4ef6\u7cfb\u7edf\u3002\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\u53ef\u4ee5\u5206\u4e3a\u903b\u8f91\u6587\u4ef6\u7cfb\u7edf\u548c\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u3002\u903b\u8f91\u6587\u4ef6\u7cfb\u7edf\u6307Linux\u6240\u652f\u6301\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u5982ext2,fat\u7b49\uff0c\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u6307\u4e3a\u6bcf\u4e00\u79cd\u786c\u4ef6\u63a7\u5236\u5668\u6240\u7f16\u5199\u7684\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u6a21\u5757\u3002<\/p>\n

\u865a\u62df\u6587\u4ef6\u7cfb\u7edf\uff08VFS\uff09\u662f Linux \u5185\u6838\u4e2d\u975e\u5e38\u6709\u7528\u7684\u4e00\u4e2a\u65b9\u9762\uff0c\u56e0\u4e3a\u5b83\u4e3a\u6587\u4ef6\u7cfb\u7edf\u63d0\u4f9b\u4e86\u4e00\u4e2a\u901a\u7528\u7684\u63a5\u53e3\u62bd\u8c61\u3002VFS \u5728 SCI \u548c\u5185\u6838\u6240\u652f\u6301\u7684\u6587\u4ef6\u7cfb\u7edf\u4e4b\u95f4\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u6362\u5c42\u3002\u5373VFS\u5728\u7528\u6237\u548c\u6587\u4ef6\u7cfb\u7edf\u4e4b\u95f4\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u6362\u5c42\u3002<\/p>\n

VFS\u5728\u7528\u6237\u548c\u6587\u4ef6\u7cfb\u7edf\u4e4b\u95f4\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u6362\u5c42:
\n\"\"<\/p>\n

\u5728 VFS \u4e0a\u9762\uff0c\u662f\u5bf9\u8bf8\u5982 open\u3001close\u3001read \u548c write \u4e4b\u7c7b\u7684\u51fd\u6570\u7684\u4e00\u4e2a\u901a\u7528 API \u62bd\u8c61\u3002\u5728 VFS \u4e0b\u9762\u662f\u6587\u4ef6\u7cfb\u7edf\u62bd\u8c61\uff0c\u5b83\u5b9a\u4e49\u4e86\u4e0a\u5c42\u51fd\u6570\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002\u5b83\u4eec\u662f\u7ed9\u5b9a\u6587\u4ef6\u7cfb\u7edf\uff08\u8d85\u8fc7 50 \u4e2a\uff09\u7684\u63d2\u4ef6\u3002\u6587\u4ef6\u7cfb\u7edf\u7684\u6e90\u4ee3\u7801\u53ef\u4ee5\u5728 .\/linux\/fs \u4e2d\u627e\u5230\u3002<\/p>\n

\u6587\u4ef6\u7cfb\u7edf\u5c42\u4e4b\u4e0b\u662f\u7f13\u51b2\u533a\u7f13\u5b58\uff0c\u5b83\u4e3a\u6587\u4ef6\u7cfb\u7edf\u5c42\u63d0\u4f9b\u4e86\u4e00\u4e2a\u901a\u7528\u51fd\u6570\u96c6\uff08\u4e0e\u5177\u4f53\u6587\u4ef6\u7cfb\u7edf\u65e0\u5173\uff09\u3002\u8fd9\u4e2a\u7f13\u5b58\u5c42\u901a\u8fc7\u5c06\u6570\u636e\u4fdd\u7559\u4e00\u6bb5\u65f6\u95f4\uff08\u6216\u8005\u968f\u5373\u9884\u5148\u8bfb\u53d6\u6570\u636e\u4ee5\u4fbf\u5728\u9700\u8981\u662f\u5c31\u53ef\u7528\uff09\u4f18\u5316\u4e86\u5bf9\u7269\u7406\u8bbe\u5907\u7684\u8bbf\u95ee\u3002\u7f13\u51b2\u533a\u7f13\u5b58\u4e4b\u4e0b\u662f\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\uff0c\u5b83\u5b9e\u73b0\u4e86\u7279\u5b9a\u7269\u7406\u8bbe\u5907\u7684\u63a5\u53e3\u3002<\/p>\n

\u56e0\u6b64\uff0c\u7528\u6237\u548c\u8fdb\u7a0b\u4e0d\u9700\u8981\u77e5\u9053\u6587\u4ef6\u6240\u5728\u7684\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\uff0c\u800c\u53ea\u9700\u8981\u8c61\u4f7f\u7528 Ext2 \u6587\u4ef6\u7cfb\u7edf\u4e2d\u7684\u6587\u4ef6\u4e00\u6837\u4f7f\u7528\u5b83\u4eec\u3002<\/p>\n

1.4 \u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f<\/strong><\/span><\/div>\n

\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u662f Linux \u5185\u6838\u7684\u4e3b\u8981\u90e8\u5206\u3002\u548c\u64cd\u4f5c\u7cfb\u7edf\u7684\u5176\u5b83\u90e8\u5206\u7c7b\u4f3c\uff0c\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u8fd0\u884c\u5728\u9ad8\u7279\u6743\u7ea7\u7684\u5904\u7406\u5668\u73af\u5883\u4e2d\uff0c\u4ece\u800c\u53ef\u4ee5\u76f4\u63a5\u5bf9\u786c\u4ef6\u8fdb\u884c\u64cd\u4f5c\uff0c\u4f46\u6b63\u56e0\u4e3a\u5982\u6b64\uff0c\u4efb\u4f55\u4e00\u4e2a\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u7684\u9519\u8bef\u90fd\u53ef\u80fd\u5bfc\u81f4\u64cd\u4f5c\u7cfb\u7edf\u7684\u5d29\u6e83\u3002\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u5b9e\u9645\u63a7\u5236\u64cd\u4f5c\u7cfb\u7edf\u548c\u786c\u4ef6\u8bbe\u5907\u4e4b\u95f4\u7684\u4ea4\u4e92\u3002<\/p>\n

\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u63d0\u4f9b\u4e00\u7ec4\u64cd\u4f5c\u7cfb\u7edf\u53ef\u7406\u89e3\u7684\u62bd\u8c61\u63a5\u53e3\u5b8c\u6210\u548c\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u95f4\u7684\u4ea4\u4e92\uff0c\u800c\u4e0e\u786c\u4ef6\u76f8\u5173\u7684\u5177\u4f53\u64cd\u4f5c\u7ec6\u8282\u7531\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u5b8c\u6210\u3002\u4e00\u822c\u800c\u8a00\uff0c\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u548c\u8bbe\u5907\u7684\u63a7\u5236\u82af\u7247\u6709\u5173\uff0c\u4f8b\u5982\uff0c\u5982\u679c\u8ba1\u7b97\u673a\u786c\u76d8\u662f SCSI \u786c\u76d8\uff0c\u5219\u9700\u8981\u4f7f\u7528 SCSI \u9a71\u52a8\u7a0b\u5e8f\uff0c\u800c\u4e0d\u662f IDE \u9a71\u52a8\u7a0b\u5e8f\u3002<\/p>\n

1.5 \u7f51\u7edc\u63a5\u53e3\uff08NET\uff09<\/strong><\/span><\/div>\n

\u63d0\u4f9b\u4e86\u5bf9\u5404\u79cd\u7f51\u7edc\u6807\u51c6\u7684\u5b58\u53d6\u548c\u5404\u79cd\u7f51\u7edc\u786c\u4ef6\u7684\u652f\u6301\u3002\u7f51\u7edc\u63a5\u53e3\u53ef\u5206\u4e3a\u7f51\u7edc\u534f\u8bae\u548c\u7f51\u7edc\u9a71\u52a8\u7a0b\u5e8f\u3002\u7f51\u7edc\u534f\u8bae\u90e8\u5206\u8d1f\u8d23\u5b9e\u73b0\u6bcf\u4e00\u79cd\u53ef\u80fd\u7684\u7f51\u7edc\u4f20\u8f93\u534f\u8bae\u3002\u4f17\u6240\u5468\u77e5\uff0cTCP\/IP \u534f\u8bae\u662f Internet \u7684\u6807\u51c6\u534f\u8bae\uff0c\u540c\u65f6\u4e5f\u662f\u4e8b\u5b9e\u4e0a\u7684\u5de5\u4e1a\u6807\u51c6\u3002<\/p>\n

Linux \u7684\u7f51\u7edc\u5b9e\u73b0\u652f\u6301 BSD \u5957\u63a5\u5b57\uff0c\u652f\u6301\u5168\u90e8\u7684TCP\/IP\u534f\u8bae\u3002Linux\u5185\u6838\u7684\u7f51\u7edc\u90e8\u5206\u7531BSD\u5957\u63a5\u5b57\u3001\u7f51\u7edc\u534f\u8bae\u5c42\u548c\u7f51\u7edc\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u7ec4\u6210\u3002\u7f51\u7edc\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u8d1f\u8d23\u4e0e\u786c\u4ef6\u8bbe\u5907\u901a\u8baf\uff0c\u6bcf\u4e00\u79cd\u53ef\u80fd\u7684\u786c\u4ef6\u8bbe\u5907\u90fd\u6709\u76f8\u5e94\u7684\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u3002<\/p>\n

2. Linux Shell<\/strong><\/div>\n

shell\u662f\u7cfb\u7edf\u7684\u7528\u6237\u754c\u9762\uff0c\u63d0\u4f9b\u4e86\u7528\u6237\u4e0e\u5185\u6838\u8fdb\u884c\u4ea4\u4e92\u64cd\u4f5c\u7684\u4e00\u79cd\u63a5\u53e3\u3002\u5b83\u63a5\u6536\u7528\u6237\u8f93\u5165\u7684\u547d\u4ee4\u5e76\u628a\u5b83\u9001\u5165\u5185\u6838\u53bb\u6267\u884c\uff0c\u662f\u4e00\u4e2a\u547d\u4ee4\u89e3\u91ca\u5668\u3002\u53e6\u5916\uff0cshell\u7f16\u7a0b\u8bed\u8a00\u5177\u6709\u666e\u901a\u7f16\u7a0b\u8bed\u8a00\u7684\u5f88\u591a\u7279\u70b9\uff0c\u7528\u8fd9\u79cd\u7f16\u7a0b\u8bed\u8a00\u7f16\u5199\u7684shell\u7a0b\u5e8f\u4e0e\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u5177\u6709\u540c\u6837\u7684\u6548\u679c\u3002<\/p>\n

\u76ee\u524d\u4e3b\u8981\u6709\u4e0b\u5217\u7248\u672c\u7684shell\u3002<\/p>\n

1\uff0eBourne Shell\uff1a<\/strong>\u662f\u8d1d\u5c14\u5b9e\u9a8c\u5ba4\u5f00\u53d1\u7684\u3002<\/p>\n

2\uff0eBASH\uff1a<\/strong>\u662fGNU\u7684Bourne Again Shell\uff0c\u662fGNU\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u9ed8\u8ba4\u7684shell,\u5927\u90e8\u5206linux\u7684\u53d1\u884c\u5957\u4ef6\u4f7f\u7528\u7684\u90fd\u662f\u8fd9\u79cdshell\u3002<\/p>\n

3\uff0eKorn Shell\uff1a<\/strong>\u662f\u5bf9Bourne SHell\u7684\u53d1\u5c55\uff0c\u5728\u5927\u90e8\u5206\u5185\u5bb9\u4e0a\u4e0eBourne Shell\u517c\u5bb9\u3002<\/p>\n

4\uff0eC Shell\uff1a<\/strong>\u662fSUN\u516c\u53f8Shell\u7684BSD\u7248\u672c\u3002<\/p>\n

3. linux \u6587\u4ef6\u7cfb\u7edf<\/strong><\/div>\n

\u6587\u4ef6\u7cfb\u7edf\u662f\u6587\u4ef6\u5b58\u653e\u5728\u78c1\u76d8\u7b49\u5b58\u50a8\u8bbe\u5907\u4e0a\u7684\u7ec4\u7ec7\u65b9\u6cd5\u3002Linux\u7cfb\u7edf\u80fd\u652f\u6301\u591a\u79cd\u76ee\u524d\u6d41\u884c\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u5982EXT2\u3001 EXT3\u3001 FAT\u3001 FAT32\u3001 VFAT\u548cISO9660\u3002<\/p>\n

3.1 \u6587\u4ef6\u7c7b\u578b<\/strong><\/span><\/div>\n

Linux\u4e0b\u9762\u7684\u6587\u4ef6\u7c7b\u578b\u4e3b\u8981\u6709\uff1a<\/p>\n

1) \u666e\u901a\u6587\u4ef6\uff1a<\/strong>C\u8bed\u8a00\u5143\u4ee3\u7801\u3001SHELL\u811a\u672c\u3001\u4e8c\u8fdb\u5236\u7684\u53ef\u6267\u884c\u6587\u4ef6\u7b49\u3002\u5206\u4e3a\u7eaf\u6587\u672c\u548c\u4e8c\u8fdb\u5236\u3002<\/p>\n

2) \u76ee\u5f55\u6587\u4ef6\uff1a<\/strong>\u76ee\u5f55\uff0c\u5b58\u50a8\u6587\u4ef6\u7684\u552f\u4e00\u5730\u65b9\u3002<\/p>\n

3) \u94fe\u63a5\u6587\u4ef6\uff1a<\/strong>\u6307\u5411\u540c\u4e00\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u7684\u6587\u4ef6\u3002<\/p>\n

4) \u8bbe\u5907\u6587\u4ef6\uff1a<\/strong>\u4e0e\u7cfb\u7edf\u5916\u8bbe\u76f8\u5173\u7684\uff0c\u901a\u5e38\u5728\/dev\u4e0b\u9762\u3002\u5206\u4e3a\u5757\u8bbe\u5907\u548c\u5b57\u7b26\u8bbe\u5907\u3002<\/p>\n

5\uff09\u7ba1\u9053(FIFO)\u6587\u4ef6:<\/strong> \u63d0\u4f9b\u8fdb\u7a0b\u4e4b\u95f4\u901a\u4fe1\u7684\u4e00\u79cd\u65b9\u5f0f<\/p>\n

6\uff09\u5957\u63a5\u5b57(socket) \u6587\u4ef6\uff1a<\/strong> \u8be5\u6587\u4ef6\u7c7b\u578b\u4e0e\u7f51\u7edc\u901a\u4fe1\u6709\u5173<\/p>\n

\u53ef\u4ee5\u901a\u8fc7ls \u2013l, file, stat\u51e0\u4e2a\u547d\u4ee4\u6765\u67e5\u770b\u6587\u4ef6\u7684\u7c7b\u578b\u7b49\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n

3.2 Linux\u76ee\u5f55<\/strong><\/span><\/div>\n

\u6587\u4ef6\u7ed3\u6784\u662f\u6587\u4ef6\u5b58\u653e\u5728\u78c1\u76d8\u7b49\u5b58\u8d2e\u8bbe\u5907\u4e0a\u7684\u7ec4\u7ec7\u65b9\u6cd5\u3002\u4e3b\u8981\u4f53\u73b0\u5728\u5bf9\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u7ec4\u7ec7\u4e0a\uff1b<\/p>\n

\u76ee\u5f55\u63d0\u4f9b\u4e86\u7ba1\u7406\u6587\u4ef6\u7684\u4e00\u4e2a\u65b9\u4fbf\u800c\u6709\u6548\u7684\u9014\u5f84\u3002<\/p>\n

Linux\u4f7f\u7528\u6807\u51c6\u7684\u76ee\u5f55\u7ed3\u6784\uff0c\u5728\u5b89\u88c5\u7684\u65f6\u5019\uff0c\u5b89\u88c5\u7a0b\u5e8f\u5c31\u5df2\u7ecf\u4e3a\u7528\u6237\u521b\u5efa\u4e86\u6587\u4ef6\u7cfb\u7edf\u548c\u5b8c\u6574\u800c\u56fa\u5b9a\u7684\u76ee\u5f55\u7ec4\u6210\u5f62\u5f0f\uff0c\u5e76\u6307\u5b9a\u4e86\u6bcf\u4e2a\u76ee\u5f55\u7684\u4f5c\u7528\u548c\u5176\u4e2d\u7684\u6587\u4ef6\u7c7b\u578b\u3002<\/p>\n

\u5b8c\u6574\u7684\u76ee\u5f55\u6811\u53ef\u5212\u5206\u4e3a\u5c0f\u7684\u90e8\u5206\uff0c\u8fd9\u4e9b\u5c0f\u90e8\u5206\u53c8\u53ef\u4ee5\u5355\u72ec\u5b58\u653e\u5728\u81ea\u5df1\u7684\u78c1\u76d8\u6216\u5206\u533a\u4e0a\u3002\u8fd9\u6837\uff0c\u76f8\u5bf9\u7a33\u5b9a\u7684\u90e8\u5206\u548c\u7ecf\u5e38\u53d8\u5316\u7684\u90e8\u5206\u53ef\u5355\u72ec\u5b58\u653e\u5728\u4e0d\u540c\u7684\u5206\u533a\u4e2d\uff0c\u4ece\u800c\u65b9\u4fbf\u5907\u4efd\u6216\u7cfb\u7edf\u7ba1\u7406\u3002\u76ee\u5f55\u6811\u7684\u4e3b\u8981\u90e8\u5206\u6709 root\u3001\/usr\u3001\/var\u3001\/home \u7b49\u3002\u8fd9\u6837\u7684\u5e03\u5c40\u53ef\u65b9\u4fbf\u5728 Linux \u8ba1\u7b97\u673a\u4e4b\u95f4\u5171\u4eab\u6587\u4ef6\u7cfb\u7edf\u7684\u67d0\u4e9b\u90e8\u5206\u3002<\/p>\n

\"\"<\/p>\n

Linux\u91c7\u7528\u7684\u662f\u6811\u578b\u7ed3\u6784\u3002\u6700\u4e0a\u5c42\u662f\u6839\u76ee\u5f55\uff0c\u5176\u4ed6\u7684\u6240\u6709\u76ee\u5f55\u90fd\u662f\u4ece\u6839\u76ee\u5f55\u51fa\u53d1\u800c\u751f\u6210\u7684\u3002<\/p>\n

\u5fae\u8f6f\u7684DOS\u548cwindows\u4e5f\u662f\u91c7\u7528\u6811\u578b\u7ed3\u6784\uff0c\u4f46\u662f\u5728DOS\u548cwindows\u4e2d\u8fd9\u6837\u7684\u6811\u578b\u7ed3\u6784\u7684\u6839\u662f\u78c1\u76d8\u5206\u533a\u7684\u76d8\u7b26\uff0c\u6709\u51e0\u4e2a\u5206\u533a\u5c31\u6709\u51e0\u4e2a\u6811\u578b\u7ed3\u6784\uff0c\u4ed6\u4eec\u4e4b\u95f4\u7684\u5173\u7cfb\u662f\u5e76\u5217\u7684\u3002\u6700\u9876\u90e8\u7684\u662f\u4e0d\u540c\u7684\u78c1\u76d8\uff08\u5206\u533a\uff09\uff0c\u5982\uff1aC\uff0cD\uff0cE\uff0cF\u7b49\u3002<\/p>\n

\u4f46\u662f\u5728linux\u4e2d\uff0c\u65e0\u8bba\u64cd\u4f5c\u7cfb\u7edf\u7ba1\u7406\u51e0\u4e2a\u78c1\u76d8\u5206\u533a\uff0c\u8fd9\u6837\u7684\u76ee\u5f55\u6811\u53ea\u6709\u4e00\u4e2a\u3002\u4ece\u7ed3\u6784\u4e0a\u8bb2\uff0c\u5404\u4e2a\u78c1\u76d8\u5206\u533a\u4e0a\u7684\u6811\u578b\u76ee\u5f55\u4e0d\u4e00\u5b9a\u662f\u5e76\u5217\u7684\u3002<\/p>\n

3.3 Linux\u78c1\u76d8\u5206\u533a<\/strong><\/span><\/div>\n

\u4e3b\u5206\u533a\uff0c\u6269\u5c55\u5206\u533a\u548c\u903b\u8f91\u5206\u533a\uff1a<\/strong><\/p>\n

linux\u5206\u533a\u4e0d\u540c\u4e8ewindows,\u786c\u76d8\u548c\u786c\u76d8\u5206\u533a\u5728Linux\u90fd\u8868\u793a\u4e3a\u8bbe\u5907.<\/p>\n

\u786c\u76d8\u5206\u533a\u4e00\u5171\u6709\u4e09\u79cd\uff1a\u4e3b\u5206\u533a\uff0c\u6269\u5c55\u5206\u533a\u548c\u903b\u8f91\u5206\u533a\u3002<\/p>\n

\u786c\u76d8\u7684\u5206\u533a\u4e3b\u8981\u5206\u4e3a\u4e3b\u5206\u533a(Primary Partion)\u548c\u6269\u5c55\u5206\u533a(Extension Partion)\u4e24\u79cd\uff0c\u4e3b\u5206\u533a\u548c\u6269\u5c55\u5206\u533a\u7684\u6570\u76ee\u4e4b\u548c\u4e0d\u80fd\u5927\u4e8e\u56db\u4e2a\u3002<\/p>\n

\u4e3b\u5206\u533a(Primary Partion)\uff1a<\/strong>\u53ef\u4ee5\u9a6c\u4e0a\u88ab\u4f7f\u7528\u4f46\u4e0d\u80fd\u518d\u5206\u533a\u3002<\/p>\n

\u6269\u5c55\u5206\u533a(Extension Partion)\uff1a<\/strong>\u5fc5\u987b\u518d\u8fdb\u884c\u5206\u533a\u540e\u624d\u80fd\u4f7f\u7528\uff0c\u4e5f\u5c31\u662f\u8bf4\u5b83\u5fc5\u987b\u8fd8\u8981\u8fdb\u884c\u4e8c\u6b21\u5206\u533a\u3002<\/p>\n

\u903b\u8f91\u5206\u533a((Logical Partion))\uff1a<\/strong>\u7531\u6269\u5c55\u5206\u533a\u5efa\u7acb\u8d77\u6765\u7684\u5206\u533a\uff0c\u903b\u8f91\u5206\u533a\u6ca1\u6709\u6570\u91cf\u4e0a\u9650\u5236\u3002<\/p>\n

\u6269\u5c55\u5206\u533a\u53ea\u4e0d\u8fc7\u662f\u903b\u8f91\u5206\u533a\u7684\u201c\u5bb9\u5668\u201d\uff0c\u5b9e\u9645\u4e0a\u53ea\u6709\u4e3b\u5206\u533a\u548c\u903b\u8f91\u5206\u533a\u8fdb\u884c\u6570\u636e\u5b58\u50a8\u3002<\/p>\n

Linux\u4e0b\u786c\u76d8\u5206\u533a\u7684\u6807\u8bc6<\/strong><\/p>\n

\u786c\u76d8\u5206\u533a\u7684\u6807\u8bc6\u4e00\u822c\u4f7f\u7528\/dev\/hd[a-z]X\u6216\u8005\/dev\/sd[a-z]X\u6765\u6807\u8bc6\uff0c\u5176\u4e2d[a-z]\u4ee3\u8868\u786c\u76d8\u53f7\uff0cX\u4ee3\u8868\u786c\u76d8\u5185\u7684\u5206\u533a\u53f7\u3002<\/p>\n

\u6574\u5757\u786c\u76d8\u5206\u533a\u7684\u5757\u53f7\u6807\u8bc6:<\/strong>Linux\u4e0b\u7528hda\u3001hdb\u3001sda\u3001sdb \u7b49\u6765\u6807\u8bc6\u4e0d\u540c\u7684\u786c\u76d8;<\/p>\n

\u5176\u4e2d\uff1a<\/p>\n

IDE\u63a5\u53e3\u786c\u76d8\uff1a\u8868\u793a\u4e3a\/dev\/hda1\u3001\/dev\/hdb \u2026\uff1b<\/p>\n

SCSI \u63a5\u53e3\u7684\u786c\u76d8\u3001SATA\u63a5\u53e3\u7684\u786c\u76d8\u8868\u793a\u4e3a\/dev\/sda\u3001\/dev\/sdb \u2026 \u2026 \uff1b<\/p>\n

\u786c\u76d8\u5185\u7684\u5206\u533a\uff1a<\/strong>\u5982\u679cX\u7684\u503c\u662f1\u52304,\u8868\u793a\u786c\u76d8\u7684\u4e3b\u5206\u533a\uff08\u5305\u542b\u6269\u5c55\u5206\u533a\uff09\uff1b\u903b\u8f91\u5206\u533a\u4ece\u662f\u4ece5\u5f00\u59cb\u7684\uff0c\u6bd4\u5982\/dev\/hda5\u80af\u5b9a\u662f\u903b\u8f91\u5206\u533a\u4e86\uff1b<\/p>\n

\u4f8b\u5982\uff1a<\/p>\n

\u7528hda1\u3001hda2\u3001 hda5\u3001hda6 \u6765\u6807\u8bc6\u4e0d\u540c\u7684\u5206\u533a\u3002\u5176\u4e2d\uff0c\u5b57\u6bcda\u4ee3\u8868\u7b2c\u4e00\u5757\u786c\u76d8\uff0cb\u4ee3\u8868\u7b2c\u4e8c\u5757\u786c\u76d8\uff0c\u4f9d\u6b21\u7c7b\u63a8\u3002\u800c\u6570\u5b571 \u4ee3\u8868\u4e00\u5757\u786c\u76d8\u7684\u7b2c\u4e00\u4e2a\u5206\u533a\u30012 \u4ee3\u8868\u7b2c\u4e8c\u4e2a\u5206\u533a\uff0c\u4f9d\u6b21\u7c7b\u63a8\u30021 \u52304 \u5bf9\u5e94\u7684\u662f\u4e3b\u5206\u533a(Primary Partition)\u6216\u6269\u5c55\u5206\u533a(Extension Partition)\u3002\u4ece5\u5f00\u59cb\uff0c\u5bf9\u5e94\u7684\u90fd\u662f\u786c\u76d8\u7684\u903b\u8f91\u5206\u533a(Logical Partition)\u3002\u4e00\u5757\u786c\u76d8\u5373\u4f7f\u53ea\u6709\u4e00\u4e2a\u4e3b\u5206\u533a\uff0c\u903b\u8f91\u5206\u533a\u4e5f\u662f\u4ece5\u5f00\u59cb\u7f16\u53f7\u7684\uff0c\u8fd9\u70b9\u5e94\u7279\u522b\u6ce8\u610f\u3002<\/strong><\/p>\n

\u603b\u7ed3\uff1a\u4e00\u4e2a\u786c\u76d8\u5206\u533a\u9996\u5148\u8981\u786e\u8ba4\u5728\u54ea\u4e2a\u786c\u76d8\uff0c\u7136\u540e\u518d\u786e\u8ba4\u5b83\u6240\u5728\u786c\u76d8\u5185\u7684\u54ea\u4e2a\u5206\u533a\u3002<\/p>\n

\u5bf9\u4e8e\/dev\/hda \u7c7b\u4f3c\u7684\u8868\u793a\u65b9\u6cd5\uff0c\u4e5f\u5e76\u4e0d\u5bde\u751f\u5427\uff1b\u6211\u4eec\u5728Linux\u901a\u8fc7fdisk -l \u5c31\u53ef\u4ee5\u67e5\u5230\u786c\u76d8\u662f\/dev\/hda\u8fd8\u662f\/dev\/hdb\uff1b<\/p>\n

[root@localhost ~]# fdisk -l\r\n\r\nDisk \/dev\/hda: 80.0 GB, 80026361856 bytes\r\n\r\n255 heads, 63 sectors\/track, 9729 cylinders\r\n\r\nUnits = cylinders of 16065 * 512 = 8225280 bytes\r\n\r\nDevice Boot Start End Blocks Id System\r\n\r\n\/dev\/hda1 * 1 970 7791493+ 7 HPFS\/NTFS\r\n\r\n\/dev\/hda2 971 9729 70356667+ 5 Extended\r\n\r\n\/dev\/hda5 971 2915 15623181 b W95 FAT32\r\n\r\n\/dev\/hda6 2916 4131 9767488+ 83 linux\r\n\r\n\/dev\/hda7 4132 5590 11719386 83 linux\r\n\r\n\/dev\/hda8 5591 6806 9767488+ 83 linux\r\n\r\n\/dev\/hda9 6807 9657 22900626 83 linux\r\n\r\n\/dev\/hda10 9658 9729 578308+ 82 linux swap \/ Solaris\r\n<\/pre>\n

\u8bf7\u6ce8\u610f\u7b2c\u4e00\u884c\uff0c Disk \/dev\/hda: 80.0 GB, 80026361856 bytes \uff0c\u8fd9\u4e2a\u5c31\u662f\u8868\u793a\u673a\u5668\u4e2d\u53ea\u6709\u4e00\u4e2a\u786c\u76d8\u8bbe\u5907\/dev\/hda \uff0c\u4f53\u79ef\u5927\u5c0f\u4e3a 80.0G\uff1b\u4e0b\u9762\u7684\u5c31\u662f\u786c\u76d8\u7684\u5206\u533a\uff0c\u6bcf\u4e2a\u5206\u533a\u90fd\u6709\u8be6\u7ec6\u7684\u4fe1\u606f\uff0c\u5728\u8fd9\u91cc\u4e0d\u8be6\u7ec6\u8bf4\u4e86\uff1b<\/p>\n

Linux\u4e0b\u78c1\u76d8\u5206\u533a\u548c\u76ee\u5f55\u7684\u5173\u7cfb\u5982\u4e0b\uff1a<\/strong><\/p>\n

\u2013 \u4efb\u4f55\u4e00\u4e2a\u5206\u533a\u90fd\u5fc5\u987b\u6302\u8f7d\u5230\u67d0\u4e2a\u76ee\u5f55\u4e0a\u3002<\/p>\n

\u2013 \u76ee\u5f55\u662f\u903b\u8f91\u4e0a\u7684\u533a\u5206\u3002\u5206\u533a\u662f\u7269\u7406\u4e0a\u7684\u533a\u5206\u3002<\/p>\n

\u2013 \u78c1\u76d8Linux\u5206\u533a\u90fd\u5fc5\u987b\u6302\u8f7d\u5230\u76ee\u5f55\u6811\u4e2d\u7684\u67d0\u4e2a\u5177\u4f53\u7684\u76ee\u5f55\u4e0a\u624d\u80fd\u8fdb\u884c\u8bfb\u5199\u64cd\u4f5c\u3002<\/p>\n

\u2013 \u6839\u76ee\u5f55\u662f\u6240\u6709Linux\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u6240\u5728\u7684\u5730\u65b9\uff0c\u9700\u8981\u6302\u8f7d\u4e0a\u4e00\u4e2a\u78c1\u76d8\u5206\u533a\u3002<\/p>\n

3.4 linux\u4e3b\u8981\u76ee\u5f55\u7684\u529f\u7528\u3002<\/strong><\/span><\/div>\n

\/bin \u4e8c\u8fdb\u5236\u53ef\u6267\u884c\u547d\u4ee4<\/p>\n

\/dev \u8bbe\u5907\u7279\u6b8a\u6587\u4ef6<\/p>\n

\/etc \u7cfb\u7edf\u7ba1\u7406\u548c\u914d\u7f6e\u6587\u4ef6<\/p>\n

\/etc\/rc.d \u542f\u52a8\u7684\u914d\u7f6e\u6587\u4ef6\u548c\u811a\u672c<\/p>\n

\/home \u7528\u6237\u4e3b\u76ee\u5f55\u7684\u57fa\u70b9\uff0c\u6bd4\u5982\u7528\u6237user\u7684\u4e3b\u76ee\u5f55\u5c31\u662f\/home\/user\uff0c\u53ef\u4ee5\u7528~user\u8868\u793a<\/p>\n

\/lib \u6807\u51c6\u7a0b\u5e8f\u8bbe\u8ba1\u5e93\uff0c\u53c8\u53eb\u52a8\u6001\u94fe\u63a5\u5171\u4eab\u5e93\uff0c\u4f5c\u7528\u7c7b\u4f3cwindows\u91cc\u7684.dll\u6587\u4ef6<\/p>\n

\/sbin \u7cfb\u7edf\u7ba1\u7406\u547d\u4ee4\uff0c\u8fd9\u91cc\u5b58\u653e\u7684\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\u4f7f\u7528\u7684\u7ba1\u7406\u7a0b\u5e8f<\/p>\n

\/tmp \u516c\u7528\u7684\u4e34\u65f6\u6587\u4ef6\u5b58\u50a8\u70b9<\/p>\n

\/root \u7cfb\u7edf\u7ba1\u7406\u5458\u7684\u4e3b\u76ee\u5f55\uff08\u5475\u5475\uff0c\u7279\u6743\u9636\u7ea7\uff09<\/p>\n

\/mnt \u7cfb\u7edf\u63d0\u4f9b\u8fd9\u4e2a\u76ee\u5f55\u662f\u8ba9\u7528\u6237\u4e34\u65f6\u6302\u8f7d\u5176\u4ed6\u7684\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n

\/lost+found \u8fd9\u4e2a\u76ee\u5f55\u5e73\u65f6\u662f\u7a7a\u7684\uff0c\u7cfb\u7edf\u975e\u6b63\u5e38\u5173\u673a\u800c\u7559\u4e0b\u201c\u65e0\u5bb6\u53ef\u5f52\u201d\u7684\u6587\u4ef6\uff08windows\u4e0b\u53eb\u4ec0\u4e48.chk\uff09\u5c31\u5728\u8fd9\u91cc<\/p>\n

\/proc \u865a\u62df\u7684\u76ee\u5f55\uff0c\u662f\u7cfb\u7edf\u5185\u5b58\u7684\u6620\u5c04\u3002\u53ef\u76f4\u63a5\u8bbf\u95ee\u8fd9\u4e2a\u76ee\u5f55\u6765\u83b7\u53d6\u7cfb\u7edf\u4fe1\u606f\u3002<\/p>\n

\/var \u67d0\u4e9b\u5927\u6587\u4ef6\u7684\u6ea2\u51fa\u533a\uff0c\u6bd4\u65b9\u8bf4\u5404\u79cd\u670d\u52a1\u7684\u65e5\u5fd7\u6587\u4ef6<\/p>\n

\/usr \u6700\u5e9e\u5927\u7684\u76ee\u5f55\uff0c\u8981\u7528\u5230\u7684\u5e94\u7528\u7a0b\u5e8f\u548c\u6587\u4ef6\u51e0\u4e4e\u90fd\u5728\u8fd9\u4e2a\u76ee\u5f55\u3002\u5176\u4e2d\u5305\u542b\uff1a<\/p>\n

\/usr\/X11R6 \u5b58\u653eX window\u7684\u76ee\u5f55<\/p>\n

\/usr\/bin \u4f17\u591a\u7684\u5e94\u7528\u7a0b\u5e8f<\/p>\n

\/usr\/sbin \u8d85\u7ea7\u7528\u6237\u7684\u4e00\u4e9b\u7ba1\u7406\u7a0b\u5e8f<\/p>\n

\/usr\/doc linux\u6587\u6863<\/p>\n

\/usr\/include linux\u4e0b\u5f00\u53d1\u548c\u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f\u6240\u9700\u8981\u7684\u5934\u6587\u4ef6<\/p>\n

\/usr\/lib \u5e38\u7528\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u548c\u8f6f\u4ef6\u5305\u7684\u914d\u7f6e\u6587\u4ef6<\/p>\n

\/usr\/man \u5e2e\u52a9\u6587\u6863<\/p>\n

\/usr\/src \u6e90\u4ee3\u7801\uff0clinux\u5185\u6838\u7684\u6e90\u4ee3\u7801\u5c31\u653e\u5728\/usr\/src\/linux\u91cc<\/p>\n

\/usr\/local\/bin \u672c\u5730\u589e\u52a0\u7684\u547d\u4ee4<\/p>\n

\/usr\/local\/lib \u672c\u5730\u589e\u52a0\u7684\u5e93<\/p>\n

3.5 linux\u6587\u4ef6\u7cfb\u7edf<\/strong><\/span><\/div>\n

\u6587\u4ef6\u7cfb\u7edf\u6307\u6587\u4ef6\u5b58\u5728\u7684\u7269\u7406\u7a7a\u95f4\uff0clinux\u7cfb\u7edf\u4e2d\u6bcf\u4e2a\u5206\u533a\u90fd\u662f\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\uff0c\u90fd\u6709\u81ea\u5df1\u7684\u76ee\u5f55\u5c42\u6b21\u7ed3\u6784\u3002linux\u4f1a\u5c06\u8fd9\u4e9b\u5206\u5c5e\u4e0d\u540c\u5206\u533a\u7684\u3001\u5355\u72ec\u7684\u6587\u4ef6\u7cfb\u7edf\u6309\u4e00\u5b9a\u7684\u65b9\u5f0f\u5f62\u6210\u4e00\u4e2a\u7cfb\u7edf\u7684\u603b\u7684\u76ee\u5f55\u5c42\u6b21\u7ed3\u6784\u3002\u4e00\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u8fd0\u884c\u79bb\u4e0d\u5f00\u5bf9\u6587\u4ef6\u7684\u64cd\u4f5c\uff0c\u56e0\u6b64\u5fc5\u7136\u8981\u62e5\u6709\u5e76\u7ef4\u62a4\u81ea\u5df1\u7684\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n

1.\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\uff1a<\/strong><\/p>\n

ext2 \uff1a \u65e9\u671flinux\u4e2d\u5e38\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\next3 \uff1a ext2\u7684\u5347\u7ea7\u7248\uff0c\u5e26\u65e5\u5fd7\u529f\u80fd\r\nRAMFS \uff1a \u5185\u5b58\u6587\u4ef6\u7cfb\u7edf\uff0c\u901f\u5ea6\u5f88\u5feb\r\nNFS \uff1a \u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\uff0c\u7531SUN\u53d1\u660e\uff0c\u4e3b\u8981\u7528\u4e8e\u8fdc\u7a0b\u6587\u4ef6\u5171\u4eab\r\nMS-DOS \uff1a MS-DOS\u6587\u4ef6\u7cfb\u7edf\r\nVFAT \uff1a Windows 95\/98 \u64cd\u4f5c\u7cfb\u7edf\u91c7\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\nFAT \uff1a Windows XP \u64cd\u4f5c\u7cfb\u7edf\u91c7\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\nNTFS\uff1a Windows NT\/XP \u64cd\u4f5c\u7cfb\u7edf\u91c7\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\nHPFS \uff1a OS\/2 \u64cd\u4f5c\u7cfb\u7edf\u91c7\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\nPROC : \u865a\u62df\u7684\u8fdb\u7a0b\u6587\u4ef6\u7cfb\u7edf\r\nISO9660 \uff1a \u5927\u90e8\u5206\u5149\u76d8\u6240\u91c7\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\nufsSun : OS \u6240\u91c7\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\nNCPFS \uff1a Novell \u670d\u52a1\u5668\u6240\u91c7\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\r\nSMBFS \uff1a Samba \u7684\u5171\u4eab\u6587\u4ef6\u7cfb\u7edf\r\nXFS \uff1a \u7531SGI\u5f00\u53d1\u7684\u5148\u8fdb\u7684\u65e5\u5fd7\u6587\u4ef6\u7cfb\u7edf\uff0c\u652f\u6301\u8d85\u5927\u5bb9\u91cf\u6587\u4ef6\r\nJFS \uff1aIBM\u7684AIX\u4f7f\u7528\u7684\u65e5\u5fd7\u6587\u4ef6\u7cfb\u7edf\r\nReiserFS : \u57fa\u4e8e\u5e73\u8861\u6811\u7ed3\u6784\u7684\u6587\u4ef6\u7cfb\u7edf\r\nudf: \u53ef\u64e6\u5199\u7684\u6570\u636e\u5149\u76d8\u6587\u4ef6\u7cfb\u7edf\r\n<\/pre>\n

2.\u6587\u4ef6\u7cfb\u7edf\u7279\u6027\uff1a<\/strong><\/p>\n

\u78c1\u76d8\u5206\u533a\u5b8c\u6bd5\u540e\u8fd8\u9700\u8981\u8fdb\u884c\u683c\u5f0f\u5316(format)\uff0c\u4e4b\u540e\u64cd\u4f5c\u7cfb\u7edf\u624d\u80fd\u591f\u4f7f\u7528\u8fd9\u4e2a\u5206\u533a\u3002 \u683c\u5f0f\u5316\u7684\u76ee\u7684\u662f\u80fd\u4f7f\u64cd\u4f5c\u7cfb\u7edf\u53ef\u4ee5\u4f7f\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\uff08\u5373\u6211\u4eec\u4e0a\u9762\u63d0\u5230\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\uff09.<\/p>\n

\u6bcf\u79cd\u64cd\u4f5c\u7cfb\u7edf\u80fd\u591f\u4f7f\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u5e76\u4e0d\u76f8\u540c. \u5982windows 98 \u4ee5\u524d\u7684\u5fae\u8f6f\u64cd\u4f5c\u7cfb\u7edf\u4e3b\u8981\u5229\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u662f FAT (\u6216 FAT16)\uff0cwindows 2000 \u4ee5\u540e\u7684\u7248\u672c\u6709\u6240\u8c13\u7684 NTFS \u6587\u4ef6\u7cfb\u7edf\uff0c\u81f3\u4e8e Linux \u7684\u6b63\u7edf\u6587\u4ef6\u7cfb\u7edf\u5219\u4e3a Ext2 (Linux second extended file system, ext2fs)\u8fd9\u4e00\u4e2a\u3002\u6b64\u5916\uff0c\u5728\u9ed8\u8ba4\u7684\u60c5\u51b5\u4e0b\uff0cwindows \u64cd\u4f5c\u7cfb\u7edf\u662f\u4e0d\u4f1a\u8ba4\u8bc6 Linux \u7684 Ext2 \u7684\u3002<\/p>\n

\u4f20\u7edf\u7684\u78c1\u76d8\u4e0e\u6587\u4ef6\u7cfb\u7edf\u4e4b\u5e94\u7528\u4e2d\uff0c\u4e00\u4e2a\u5206\u533a\u5c31\u662f\u53ea\u80fd\u591f\u88ab\u683c\u5f0f\u5316\u6210\u4e3a\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u8bf4\u4e00\u4e2a filesystem \u5c31\u662f\u4e00\u4e2a partition\u3002\u4f46\u662f\u7531\u4e8e\u65b0\u6280\u672f\u7684\u5229\u7528\uff0c\u4f8b\u5982\u6211\u4eec\u5e38\u542c\u5230\u7684LVM\u4e0e\u8f6f\u4ef6\u78c1\u76d8\u9635\u5217(software raid)\uff0c \u8fd9\u4e9b\u6280\u672f\u53ef\u4ee5\u5c06\u4e00\u4e2a\u5206\u533a\u683c\u5f0f\u5316\u4e3a\u591a\u4e2a\u6587\u4ef6\u7cfb\u7edf(\u4f8b\u5982LVM)\uff0c\u4e5f\u80fd\u591f\u5c06\u591a\u4e2a\u5206\u533a\u5408\u6210\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf(LVM, RAID)\uff01 \u6240\u4ee5\u8bf4\uff0c\u76ee\u524d\u6211\u4eec\u5728\u683c\u5f0f\u5316\u65f6\u5df2\u7ecf\u4e0d\u518d\u8bf4\u6210\u9488\u5bf9 partition \u6765\u683c\u5f0f\u5316\u4e86\uff0c \u901a\u5e38\u6211\u4eec\u53ef\u4ee5\u79f0\u547c\u4e00\u4e2a\u53ef\u88ab\u6302\u8f7d\u7684\u6570\u636e\u4e3a\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\u800c\u4e0d\u662f\u4e00\u4e2a\u5206\u533a\u5594\uff01<\/p>\n

\u90a3\u4e48\u6587\u4ef6\u7cfb\u7edf\u662f\u5982\u4f55\u8fd0\u884c\u7684\u5462\uff1f\u8fd9\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u7684\u6587\u4ef6\u6570\u636e\u6709\u5173\u3002\u8f83\u65b0\u7684\u64cd\u4f5c\u7cfb\u7edf\u7684\u6587\u4ef6\u6570\u636e\u9664\u4e86\u6587\u4ef6\u5b9e\u9645\u5185\u5bb9\u5916\uff0c \u901a\u5e38\u542b\u6709\u975e\u5e38\u591a\u7684\u5c5e\u6027\uff0c\u4f8b\u5982 Linux \u64cd\u4f5c\u7cfb\u7edf\u7684\u6587\u4ef6\u6743\u9650(rwx)\u4e0e\u6587\u4ef6\u5c5e\u6027(\u62e5\u6709\u8005\u3001\u7fa4\u7ec4\u3001\u65f6\u95f4\u53c2\u6570\u7b49)\u3002 \u6587\u4ef6\u7cfb\u7edf\u901a\u5e38\u4f1a\u5c06\u8fd9\u4e24\u90e8\u4efd\u7684\u6570\u636e\u5206\u522b\u5b58\u653e\u5728\u4e0d\u540c\u7684\u533a\u5757\uff0c\u6743\u9650\u4e0e\u5c5e\u6027\u653e\u7f6e\u5230 inode \u4e2d\uff0c\u81f3\u4e8e\u5b9e\u9645\u6570\u636e\u5219\u653e\u7f6e\u5230 data block \u533a\u5757\u4e2d\u3002 \u53e6\u5916\uff0c\u8fd8\u6709\u4e00\u4e2a\u8d85\u7ea7\u533a\u5757 (superblock) \u4f1a\u8bb0\u5f55\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u6574\u4f53\u4fe1\u606f\uff0c\u5305\u62ec inode \u4e0e block \u7684\u603b\u91cf\u3001\u4f7f\u7528\u91cf\u3001\u5269\u4f59\u91cf\u7b49\u3002<\/p>\n

\u5bf9\u4e8e\u4e00\u4e2a\u78c1\u76d8\u5206\u533a\u6765\u8bf4\uff0c\u5728\u88ab\u6307\u5b9a\u4e3a\u76f8\u5e94\u7684\u6587\u4ef6\u7cfb\u7edf\u540e\uff0c\u6574\u4e2a\u5206\u533a\u88ab\u5206\u4e3a 1024\uff0c2048 \u548c 4096 \u5b57\u8282\u5927\u5c0f\u7684\u5757\u3002\u6839\u636e\u5757\u4f7f\u7528\u7684\u4e0d\u540c\uff0c\u53ef\u5206\u4e3a\uff1a<\/p>\n

\u8d85\u7ea7\u5757(Superblock): \u8fd9\u662f\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u7b2c\u4e00\u5757\u7a7a\u95f4\u3002\u5305\u62ec\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u57fa\u672c\u4fe1\u606f\uff0c\u5982\u5757\u5927\u5c0f\uff0cinode\/block\u7684\u603b\u91cf\u3001\u4f7f\u7528\u91cf\u3001\u5269\u4f59\u91cf\uff0c\u6307\u5411\u7a7a\u95f4 inode \u548c\u6570\u636e\u5757\u7684\u6307\u9488\u7b49\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n

inode\u5757(\u6587\u4ef6\u7d22\u5f15\u8282\u70b9) : \u6587\u4ef6\u7cfb\u7edf\u7d22\u5f15,\u8bb0\u5f55\u6587\u4ef6\u7684\u5c5e\u6027\u3002\u5b83\u662f\u6587\u4ef6\u7cfb\u7edf\u7684\u6700\u57fa\u672c\u5355\u5143\uff0c\u662f\u6587\u4ef6\u7cfb\u7edf\u8fde\u63a5\u4efb\u4f55\u5b50\u76ee\u5f55\u3001\u4efb\u4f55\u6587\u4ef6\u7684\u6865\u6881\u3002\u6bcf\u4e2a\u5b50\u76ee\u5f55\u548c\u6587\u4ef6\u53ea\u6709\u552f\u4e00\u7684\u4e00\u4e2a inode \u5757\u3002\u5b83\u5305\u542b\u4e86\u6587\u4ef6\u7cfb\u7edf\u4e2d\u6587\u4ef6\u7684\u57fa\u672c\u5c5e\u6027(\u6587\u4ef6\u7684\u957f\u5ea6\u3001\u521b\u5efa\u53ca\u4fee\u6539\u65f6\u95f4\u3001\u6743\u9650\u3001\u6240\u5c5e\u5173\u7cfb)\u3001\u5b58\u653e\u6570\u636e\u7684\u4f4d\u7f6e\u7b49\u76f8\u5173\u4fe1\u606f. \u5728 Linux \u4e0b\u53ef\u4ee5\u901a\u8fc7 \u201cls -li\u201d \u547d\u4ee4\u67e5\u770b\u6587\u4ef6\u7684 inode \u4fe1\u606f\u3002\u786c\u8fde\u63a5\u548c\u6e90\u6587\u4ef6\u5177\u6709\u76f8\u540c\u7684 inode \u3002<\/p>\n

\u6570\u636e\u5757(Block) :\u5b9e\u9645\u8bb0\u5f55\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u82e5\u6587\u4ef6\u592a\u5927\u65f6\uff0c\u4f1a\u5360\u7528\u591a\u4e2ablock\u3002\u4e3a\u4e86\u63d0\u9ad8\u76ee\u5f55\u8bbf\u95ee\u6548\u7387\uff0cLinux\u8fd8\u63d0\u4f9b\u4e86\u8868\u8fbe\u8def\u5f84\u4e0einode\u5bf9\u5e94\u5173\u7cfb\u7684dentry\u7ed3\u6784\u3002\u5b83\u63cf\u8ff0\u4e86\u8def\u5f84\u4fe1\u606f\u5e76\u8fde\u63a5\u5230\u8282\u70b9inode\uff0c\u5b83\u5305\u62ec\u5404\u79cd\u76ee\u5f55\u4fe1\u606f\uff0c\u8fd8\u6307\u5411\u4e86inode\u548c\u8d85\u7ea7\u5757\u3002<\/p>\n

\u5c31\u50cf\u4e00\u672c\u4e66\u6709\u5c01\u9762\u3001\u76ee\u5f55\u548c\u6b63\u6587\u4e00\u6837\u3002\u5728\u6587\u4ef6\u7cfb\u7edf\u4e2d\uff0c\u8d85\u7ea7\u5757\u5c31\u76f8\u5f53\u4e8e\u5c01\u9762\uff0c\u4ece\u5c01\u9762\u53ef\u4ee5\u5f97\u77e5\u8fd9\u672c\u4e66\u7684\u57fa\u672c\u4fe1\u606f\uff1b inode \u5757\u76f8\u5f53\u4e8e\u76ee\u5f55\uff0c\u4ece\u76ee\u5f55\u53ef\u4ee5\u5f97\u77e5\u5404\u7ae0\u8282\u5185\u5bb9\u7684\u4f4d\u7f6e\uff1b\u800c\u6570\u636e\u5757\u5219\u76f8\u5f53\u4e8e\u4e66\u7684\u6b63\u6587\uff0c\u8bb0\u5f55\u7740\u5177\u4f53\u5185\u5bb9\u3002<\/p>\n

Linux\u6b63\u7edf\u7684\u6587\u4ef6\u7cfb\u7edf(\u5982ext2\u30013\u7b49)\u5c06\u786c\u76d8\u5206\u533a\u65f6\u4f1a\u5212\u5206\u51fa\u8d85\u7ea7\u5757\u3001inode Table\u533a\u5757\u548cdata block\u6570\u636e\u533a\u57df\u3002\u4e00\u4e2a\u6587\u4ef6\u7531\u4e00\u4e2a\u8d85\u7ea7\u5757\u3001inode\u548c\u6570\u636e\u533a\u57df\u5757\u7ec4\u6210\u3002Inode\u5305\u542b\u6587\u4ef6\u7684\u5c5e\u6027(\u5982\u8bfb\u5199\u5c5e\u6027\u3001owner\u7b49\uff0c\u4ee5\u53ca\u6307\u5411\u6570\u636e\u5757\u7684\u6307\u9488)\uff0c\u6570\u636e\u533a\u57df\u5757\u5219\u662f\u6587\u4ef6\u5185\u5bb9\u3002\u5f53\u67e5\u770b\u67d0\u4e2a\u6587\u4ef6\u65f6\uff0c\u4f1a\u5148\u4eceinode table\u4e2d\u67e5\u51fa\u6587\u4ef6\u5c5e\u6027\u53ca\u6570\u636e\u5b58\u653e\u70b9\uff0c\u518d\u4ece\u6570\u636e\u5757\u4e2d\u8bfb\u53d6\u6570\u636e\u3002<\/p>\n

\"\"<\/p>\n

\u6211\u4eec\u5c06 inode\u4e0eblock\u533a\u5757\u7528\u56fe\u89e3\u6765\u8bf4\u660e\u4e00\u4e0b\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u6587\u4ef6\u7cfb\u7edf\u5148\u683c\u5f0f\u5316\u51fainode\u4e0eblock\u7684\u533a\u5757\uff0c\u5047\u8bbe\u67d0\u4e00\u4e2a\u6587\u4ef6\u7684\u5c5e\u6027\u4e0e\u6743\u9650\u6570\u636e\u662f\u653e\u7f6e\u5230 inode 4\u53f7(\u4e0b\u56fe\u8f83\u5c0f\u65b9\u683c\u5185)\uff0c\u800c\u8fd9\u4e2ainode\u8bb0\u5f55\u4e86\u6587\u4ef6\u6570\u636e\u7684\u5b9e\u9645\u653e\u7f6e\u70b9\u4e3a 2, 7, 13, 15 \u8fd9\u56db\u4e2a block \u53f7\u7801\uff0c\u6b64\u65f6\u6211\u4eec\u7684\u64cd\u4f5c\u7cfb\u7edf\u5c31\u80fd\u591f\u636e\u6b64\u6765\u6392\u5217\u78c1\u76d8\u7684\u9605\u8bfb\u987a\u5e8f\uff0c\u53ef\u4ee5\u4e00\u53e3\u6c14\u5c06\u56db\u4e2a block \u5185\u5bb9\u8bfb\u51fa\u6765\uff01 \u90a3\u4e48\u6570\u636e\u7684\u8bfb\u53d6\u5c31\u5982\u540c\u4e0b\u56fe\u4e2d\u7684\u7bad\u5934\u6240\u6307\u5b9a\u7684\u6a21\u6837\u4e86\u3002<\/p>\n

\"\"<\/p>\n

\u8fd9\u79cd\u6570\u636e\u5b58\u53d6\u7684\u65b9\u6cd5\u6211\u4eec\u79f0\u4e3a\u7d22\u5f15\u5f0f\u6587\u4ef6\u7cfb\u7edf(indexed allocation)\u3002<\/strong>\u90a3\u6709\u6ca1\u6709\u5176\u4ed6\u7684\u60ef\u7528\u6587\u4ef6\u7cfb\u7edf\u53ef\u4ee5\u6bd4\u8f83\u4e00\u4e0b\u554a\uff1f \u6709\u7684\uff0c\u90a3\u5c31\u662f\u6211\u4eec\u60ef\u7528\u7684\u95ea\u76d8(\u95ea\u5b58)\uff0c\u95ea\u76d8\u4f7f\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u4e00\u822c\u4e3a FAT \u683c\u5f0f\u3002FAT \u8fd9\u79cd\u683c\u5f0f\u7684\u6587\u4ef6\u7cfb\u7edf\u5e76\u6ca1\u6709 inode \u5b58\u5728\uff0c\u6240\u4ee5 FAT \u6ca1\u6709\u529e\u6cd5\u5c06\u8fd9\u4e2a\u6587\u4ef6\u7684\u6240\u6709 block \u5728\u4e00\u5f00\u59cb\u5c31\u8bfb\u53d6\u51fa\u6765\u3002\u6bcf\u4e2a block \u53f7\u7801\u90fd\u8bb0\u5f55\u5728\u524d\u4e00\u4e2a block \u5f53\u4e2d\uff0c \u5176\u8bfb\u53d6\u65b9\u5f0f\u6709\u70b9\u50cf\u4e0b\u56fe\u6240\u793a:<\/p>\n

\"\"<\/p>\n

\u4e0a\u56fe\u4e2d\u6211\u4eec\u5047\u8bbe\u6587\u4ef6\u7684\u6570\u636e\u4f9d\u5e8f\u5199\u51651->7->4->15\u53f7\u8fd9\u56db\u4e2a block \u53f7\u7801\u4e2d\uff0c \u4f46\u8fd9\u4e2a\u6587\u4ef6\u7cfb\u7edf\u6ca1\u6709\u529e\u6cd5\u4e00\u53e3\u6c14\u5c31\u77e5\u9053\u56db\u4e2a block \u7684\u53f7\u7801\uff0c\u4ed6\u5f97\u8981\u4e00\u4e2a\u4e00\u4e2a\u7684\u5c06 block \u8bfb\u51fa\u540e\uff0c\u624d\u4f1a\u77e5\u9053\u4e0b\u4e00\u4e2a block \u5728\u4f55\u5904\u3002 \u5982\u679c\u540c\u4e00\u4e2a\u6587\u4ef6\u6570\u636e\u5199\u5165\u7684 block \u5206\u6563\u7684\u592a\u8fc7\u5389\u5bb3\u65f6\uff0c\u5219\u6211\u4eec\u7684\u78c1\u76d8\u8bfb\u53d6\u5934\u5c06\u65e0\u6cd5\u5728\u78c1\u76d8\u8f6c\u4e00\u5708\u5c31\u8bfb\u5230\u6240\u6709\u7684\u6570\u636e\uff0c \u56e0\u6b64\u78c1\u76d8\u5c31\u4f1a\u591a\u8f6c\u597d\u51e0\u5708\u624d\u80fd\u5b8c\u6574\u7684\u8bfb\u53d6\u5230\u8fd9\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\uff01<\/p>\n

\u5e38\u5e38\u4f1a\u542c\u5230\u6240\u8c13\u7684\u201c\u788e\u7247\u6574\u7406\u201d\u5427\uff1f <\/strong>\u9700\u8981\u788e\u7247\u6574\u7406\u7684\u539f\u56e0\u5c31\u662f\u6587\u4ef6\u5199\u5165\u7684 block \u592a\u8fc7\u4e8e\u79bb\u6563\u4e86\uff0c\u6b64\u65f6\u6587\u4ef6\u8bfb\u53d6\u7684\u6548\u80fd\u5c06\u4f1a\u53d8\u7684\u5f88\u5dee\u6240\u81f4\u3002 \u8fd9\u4e2a\u65f6\u5019\u53ef\u4ee5\u900f\u8fc7\u788e\u7247\u6574\u7406\u5c06\u540c\u4e00\u4e2a\u6587\u4ef6\u6240\u5c5e\u7684 blocks \u6c47\u6574\u5728\u4e00\u8d77\uff0c\u8fd9\u6837\u6570\u636e\u7684\u8bfb\u53d6\u4f1a\u6bd4\u8f83\u5bb9\u6613\u554a\uff01 \u60f3\u5f53\u7136\uff0cFAT \u7684\u6587\u4ef6\u7cfb\u7edf\u9700\u8981\u7ecf\u5e38\u7684\u788e\u7247\u6574\u7406\u4e00\u4e0b\uff0c\u90a3\u4e48 Ext2 \u662f\u5426\u9700\u8981\u78c1\u76d8\u91cd\u6574\u5462\uff1f<\/p>\n

\u7531\u4e8e Ext2 \u662f\u7d22\u5f15\u5f0f\u6587\u4ef6\u7cfb\u7edf\uff0c<\/strong>\u57fa\u672c\u4e0a\u4e0d\u592a\u9700\u8981\u5e38\u5e38\u8fdb\u884c\u788e\u7247\u6574\u7406\u7684\u3002\u4f46\u662f\u5982\u679c\u6587\u4ef6\u7cfb\u7edf\u4f7f\u7528\u592a\u4e45\uff0c \u5e38\u5e38\u5220\u9664\/\u7f16\u8f91\/\u65b0\u589e\u6587\u4ef6\u65f6\uff0c\u90a3\u4e48\u8fd8\u662f\u53ef\u80fd\u4f1a\u9020\u6210\u6587\u4ef6\u6570\u636e\u592a\u8fc7\u4e8e\u79bb\u6563\u7684\u95ee\u9898\uff0c\u6b64\u65f6\u6216\u8bb8\u4f1a\u9700\u8981\u8fdb\u884c\u91cd\u6574\u4e00\u4e0b\u7684\u3002 \u4e0d\u8fc7\uff0c\u8001\u5b9e\u8bf4\uff0c\u9e1f\u54e5\u5012\u662f\u6ca1\u6709\u5728 Linux \u64cd\u4f5c\u7cfb\u7edf\u4e0a\u9762\u8fdb\u884c\u8fc7 Ext2\/Ext3 \u6587\u4ef6\u7cfb\u7edf\u7684\u788e\u7247\u6574\u7406\u8bf4\uff01\u4f3c\u4e4e\u4e0d\u592a\u9700\u8981\u5566\uff01<\/p>\n

\u53ef\u4ee5\u7528ln\u547d\u4ee4\u5bf9\u4e00\u4e2a\u5df2\u7ecf\u5b58\u5728\u7684\u6587\u4ef6\u518d\u5efa\u7acb\u4e00\u4e2a\u65b0\u7684\u8fde\u63a5\uff0c\u800c\u4e0d\u590d\u5236\u6587\u4ef6\u7684\u5185\u5bb9\u3002\u8fde\u63a5\u6709\u8f6f\u8fde\u63a5\u548c\u786c\u8fde\u63a5\u4e4b\u5206\uff0c\u8f6f\u8fde\u63a5\u53c8\u53eb\u7b26\u53f7\u8fde\u63a5\u3002\u5b83\u4eec\u5404\u81ea\u7684\u7279\u70b9\u662f\uff1a<\/p>\n

\u786c\u8fde\u63a5\uff1a<\/strong>\u539f\u6587\u4ef6\u540d\u548c\u8fde\u63a5\u6587\u4ef6\u540d\u90fd\u6307\u5411\u76f8\u540c\u7684\u7269\u7406\u5730\u5740\u3002\u76ee\u5f55\u4e0d\u80fd\u6709\u786c\u8fde\u63a5\uff1b\u786c\u8fde\u63a5\u4e0d\u80fd\u8de8\u8d8a\u6587\u4ef6\u7cfb\u7edf\uff08\u4e0d\u80fd\u8de8\u8d8a\u4e0d\u540c\u7684\u5206\u533a\uff09\u6587\u4ef6\u5728\u78c1\u76d8\u4e2d\u53ea\u6709\u4e00\u4e2a\u62f7\u8d1d\uff0c\u8282\u7701\u786c\u76d8\u7a7a\u95f4\uff1b<\/p>\n

\u7531\u4e8e\u5220\u9664\u6587\u4ef6\u8981\u5728\u540c\u4e00\u4e2a\u7d22\u5f15\u8282\u70b9\u5c5e\u4e8e\u552f\u4e00\u7684\u8fde\u63a5\u65f6\u624d\u80fd\u6210\u529f\uff0c\u56e0\u6b64\u53ef\u4ee5\u9632\u6b62\u4e0d\u5fc5\u8981\u7684\u8bef\u5220\u9664\u3002<\/p>\n

\u7b26\u53f7\u8fde\u63a5\uff1a<\/strong>\u7528ln -s\u547d\u4ee4\u5efa\u7acb\u6587\u4ef6\u7684\u7b26\u53f7\u8fde\u63a5\u7b26\u53f7\u8fde\u63a5\u662flinux\u7279\u6b8a\u6587\u4ef6\u7684\u4e00\u79cd\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u6587\u4ef6\uff0c\u5b83\u7684\u6570\u636e\u662f\u5b83\u6240\u8fde\u63a5\u7684\u6587\u4ef6\u7684\u8def\u5f84\u540d\u3002\u7c7b\u4f3cwindows\u4e0b\u7684\u5feb\u6377\u65b9\u5f0f\u3002<\/p>\n

\u53ef\u4ee5\u5220\u9664\u539f\u6709\u7684\u6587\u4ef6\u800c\u4fdd\u5b58\u8fde\u63a5\u6587\u4ef6\uff0c\u6ca1\u6709\u9632\u6b62\u8bef\u5220\u9664\u529f\u80fd\u3002<\/p>\n

\u8fd9\u4e00\u6bb5\u7684\u7684\u5185\u5bb9\u8fc7\u4e8e\u62bd\u8c61\uff0c\u53c8\u662f\u8282\u70b9\u53c8\u662f\u6570\u7ec4\u7684\uff0c\u6211\u5df2\u7ecf\u5c3d\u91cf\u901a\u4fd7\u518d\u901a\u4fd7\u4e86\uff0c\u53c8\u4e0d\u597d\u52a0\u4f8b\u5b50\u4f5c\u6f14\u793a\u3002\u5927\u5bb6\u5982\u679c\u8fd8\u662f\u4e91\u91cc\u96fe\u91cc\u7684\u8bdd\uff0c\u6211\u4e5f\u6ca1\u6709\u4ec0\u4e48\u529e\u6cd5\u4e86\uff0c\u53ea\u6709\u5148\u8bb0\u4f4f\uff0c\u65e5\u540e\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u6162\u6162\u4f53\u4f1a\u3001\u7406\u89e3\u4e86\u3002\u8fd9\u4e5f\u662f\u6211\u5b66\u4e60\u7684\u4e00\u4e2a\u65b9\u6cd5\u5427\u3002<\/p>\n

3.6 \u6587\u4ef6\u7cfb\u7edf\u5728\u5185\u6838\u4e2d\u7684\u8868\u793a<\/strong><\/span><\/div>\n

\u5185\u6838\u6570\u636e\u7ed3\u6784<\/strong><\/p>\n

Linux\u5185\u6838\u7684VFS\u5b50\u7cfb\u7edf\u53ef\u4ee5\u56fe\u793a\u5982\u4e0b\uff1a<\/p>\n

\"\"<\/p>\n

\u6587\u4ef6\u4e0eIO: \u6bcf\u4e2a\u8fdb\u7a0b\u5728PCB\uff08Process Control Block\uff09\u4e2d\u90fd\u4fdd\u5b58\u7740\u4e00\u4efd\u6587\u4ef6\u63cf\u8ff0\u7b26\u8868\uff0c\u6587\u4ef6\u63cf\u8ff0\u7b26\u5c31\u662f\u8fd9\u4e2a\u8868\u7684\u7d22\u5f15\uff0c\u6bcf\u4e2a\u8868\u9879\u90fd\u6709\u4e00\u4e2a\u6307\u5411\u5df2\u6253\u5f00\u6587\u4ef6\u7684\u6307\u9488\uff0c\u73b0\u5728\u6211\u4eec\u660e\u786e\u4e00\u4e0b\uff1a\u5df2\u6253\u5f00\u7684\u6587\u4ef6\u5728\u5185\u6838\u4e2d\u7528file\u7ed3\u6784\u4f53\u8868\u793a\uff0c\u6587\u4ef6\u63cf\u8ff0\u7b26\u8868\u4e2d\u7684\u6307\u9488\u6307\u5411file\u7ed3\u6784\u4f53\u3002<\/p>\n

\u5728file\u7ed3\u6784\u4f53\u4e2d\u7ef4\u62a4File Status Flag\uff08file\u7ed3\u6784\u4f53\u7684\u6210\u5458f_flags\uff09\u548c\u5f53\u524d\u8bfb\u5199\u4f4d\u7f6e\uff08file\u7ed3\u6784\u4f53\u7684\u6210\u5458f_pos\uff09\u3002\u5728\u4e0a\u56fe\u4e2d\uff0c\u8fdb\u7a0b1\u548c\u8fdb\u7a0b2\u90fd\u6253\u5f00\u540c\u4e00\u6587\u4ef6\uff0c\u4f46\u662f\u5bf9\u5e94\u4e0d\u540c\u7684file\u7ed3\u6784\u4f53\uff0c\u56e0\u6b64\u53ef\u4ee5\u6709\u4e0d\u540c\u7684File Status Flag\u548c\u8bfb\u5199\u4f4d\u7f6e\u3002file\u7ed3\u6784\u4f53\u4e2d\u6bd4\u8f83\u91cd\u8981\u7684\u6210\u5458\u8fd8\u6709f_count\uff0c\u8868\u793a\u5f15\u7528\u8ba1\u6570\uff08Reference Count\uff09\uff0c\u540e\u9762\u6211\u4eec\u4f1a\u8bb2\u5230\uff0cdup\u3001fork\u7b49\u7cfb\u7edf\u8c03\u7528\u4f1a\u5bfc\u81f4\u591a\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\u6307\u5411\u540c\u4e00\u4e2afile\u7ed3\u6784\u4f53\uff0c\u4f8b\u5982\u6709fd1\u548cfd2\u90fd\u5f15\u7528\u540c\u4e00\u4e2afile\u7ed3\u6784\u4f53\uff0c\u90a3\u4e48\u5b83\u7684\u5f15\u7528\u8ba1\u6570\u5c31\u662f2\uff0c\u5f53close(fd1)\u65f6\u5e76\u4e0d\u4f1a\u91ca\u653efile\u7ed3\u6784\u4f53\uff0c\u800c\u53ea\u662f\u628a\u5f15\u7528\u8ba1\u6570\u51cf\u52301\uff0c\u5982\u679c\u518dclose(fd2)\uff0c\u5f15\u7528\u8ba1\u6570\u5c31\u4f1a\u51cf\u52300\u540c\u65f6\u91ca\u653efile\u7ed3\u6784\u4f53\uff0c\u8fd9\u624d\u771f\u7684\u5173\u95ed\u4e86\u6587\u4ef6\u3002<\/p>\n

\u6bcf\u4e2afile\u7ed3\u6784\u4f53\u90fd\u6307\u5411\u4e00\u4e2afile_operations\u7ed3\u6784\u4f53\uff0c\u8fd9\u4e2a\u7ed3\u6784\u4f53\u7684\u6210\u5458\u90fd\u662f\u51fd\u6570\u6307\u9488\uff0c\u6307\u5411\u5b9e\u73b0\u5404\u79cd\u6587\u4ef6\u64cd\u4f5c\u7684\u5185\u6838\u51fd\u6570\u3002\u6bd4\u5982\u5728\u7528\u6237\u7a0b\u5e8f\u4e2dread\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0cread\u901a\u8fc7\u7cfb\u7edf\u8c03\u7528\u8fdb\u5165\u5185\u6838\uff0c\u7136\u540e\u627e\u5230\u8fd9\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\u6240\u6307\u5411\u7684file\u7ed3\u6784\u4f53\uff0c\u627e\u5230file\u7ed3\u6784\u4f53\u6240\u6307\u5411\u7684file_operations\u7ed3\u6784\u4f53\uff0c\u8c03\u7528\u5b83\u7684read\u6210\u5458\u6240\u6307\u5411\u7684\u5185\u6838\u51fd\u6570\u4ee5\u5b8c\u6210\u7528\u6237\u8bf7\u6c42\u3002\u5728\u7528\u6237\u7a0b\u5e8f\u4e2d\u8c03\u7528lseek\u3001read\u3001write\u3001ioctl\u3001open\u7b49\u51fd\u6570\uff0c\u6700\u7ec8\u90fd\u7531\u5185\u6838\u8c03\u7528file_operations\u7684\u5404\u6210\u5458\u6240\u6307\u5411\u7684\u5185\u6838\u51fd\u6570\u5b8c\u6210\u7528\u6237\u8bf7\u6c42\u3002<\/p>\n

file_operations\u7ed3\u6784\u4f53\u4e2d\u7684release\u6210\u5458\u7528\u4e8e\u5b8c\u6210\u7528\u6237\u7a0b\u5e8f\u7684close\u8bf7\u6c42\uff0c\u4e4b\u6240\u4ee5\u53ebrelease\u800c\u4e0d\u53ebclose\u662f\u56e0\u4e3a\u5b83\u4e0d\u4e00\u5b9a\u771f\u7684\u5173\u95ed\u6587\u4ef6\uff0c\u800c\u662f\u51cf\u5c11\u5f15\u7528\u8ba1\u6570\uff0c\u53ea\u6709\u5f15\u7528\u8ba1\u6570\u51cf\u52300\u624d\u5173\u95ed\u6587\u4ef6\u3002\u5bf9\u4e8e\u540c\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\u4e0a\u6253\u5f00\u7684\u5e38\u89c4\u6587\u4ef6\u6765\u8bf4\uff0cread\u3001write\u7b49\u6587\u4ef6\u64cd\u4f5c\u7684\u6b65\u9aa4\u548c\u65b9\u6cd5\u5e94\u8be5\u662f\u4e00\u6837\u7684\uff0c\u8c03\u7528\u7684\u51fd\u6570\u5e94\u8be5\u662f\u76f8\u540c\u7684\uff0c\u6240\u4ee5\u56fe\u4e2d\u7684\u4e09\u4e2a\u6253\u5f00\u6587\u4ef6\u7684file\u7ed3\u6784\u4f53\u6307\u5411\u540c\u4e00\u4e2afile_operations\u7ed3\u6784\u4f53\u3002\u5982\u679c\u6253\u5f00\u4e00\u4e2a\u5b57\u7b26\u8bbe\u5907\u6587\u4ef6\uff0c\u90a3\u4e48\u5b83\u7684read\u3001write\u64cd\u4f5c\u80af\u5b9a\u548c\u5e38\u89c4\u6587\u4ef6\u4e0d\u4e00\u6837\uff0c\u4e0d\u662f\u8bfb\u5199\u78c1\u76d8\u7684\u6570\u636e\u5757\u800c\u662f\u8bfb\u5199\u786c\u4ef6\u8bbe\u5907\uff0c\u6240\u4ee5file\u7ed3\u6784\u4f53\u5e94\u8be5\u6307\u5411\u4e0d\u540c\u7684file_operations\u7ed3\u6784\u4f53\uff0c\u5176\u4e2d\u7684\u5404\u79cd\u6587\u4ef6\u64cd\u4f5c\u51fd\u6570\u7531\u8be5\u8bbe\u5907\u7684\u9a71\u52a8\u7a0b\u5e8f\u5b9e\u73b0\u3002<\/p>\n

\u6bcf\u4e2afile\u7ed3\u6784\u4f53\u90fd\u6709\u4e00\u4e2a\u6307\u5411dentry\u7ed3\u6784\u4f53\u7684\u6307\u9488\uff0c\u201cdentry\u201d\u662fdirectory entry\uff08\u76ee\u5f55\u9879\uff09\u7684\u7f29\u5199\u3002\u6211\u4eec\u4f20\u7ed9open\u3001stat\u7b49\u51fd\u6570\u7684\u53c2\u6570\u7684\u662f\u4e00\u4e2a\u8def\u5f84\uff0c\u4f8b\u5982\/home\/akaedu\/a\uff0c\u9700\u8981\u6839\u636e\u8def\u5f84\u627e\u5230\u6587\u4ef6\u7684inode\u3002\u4e3a\u4e86\u51cf\u5c11\u8bfb\u76d8\u6b21\u6570\uff0c\u5185\u6838\u7f13\u5b58\u4e86\u76ee\u5f55\u7684\u6811\u72b6\u7ed3\u6784\uff0c\u79f0\u4e3adentry cache\uff0c\u5176\u4e2d\u6bcf\u4e2a\u8282\u70b9\u662f\u4e00\u4e2adentry\u7ed3\u6784\u4f53\uff0c\u53ea\u8981\u6cbf\u7740\u8def\u5f84\u5404\u90e8\u5206\u7684dentry\u641c\u7d22\u5373\u53ef\uff0c\u4ece\u6839\u76ee\u5f55\/\u627e\u5230home\u76ee\u5f55\uff0c\u7136\u540e\u627e\u5230akaedu\u76ee\u5f55\uff0c\u7136\u540e\u627e\u5230\u6587\u4ef6a\u3002dentry cache\u53ea\u4fdd\u5b58\u6700\u8fd1\u8bbf\u95ee\u8fc7\u7684\u76ee\u5f55\u9879\uff0c\u5982\u679c\u8981\u627e\u7684\u76ee\u5f55\u9879\u5728cache\u4e2d\u6ca1\u6709\uff0c\u5c31\u8981\u4ece\u78c1\u76d8\u8bfb\u5230\u5185\u5b58\u4e2d\u3002<\/p>\n

\u6bcf\u4e2adentry\u7ed3\u6784\u4f53\u90fd\u6709\u4e00\u4e2a\u6307\u9488\u6307\u5411inode\u7ed3\u6784\u4f53\u3002inode\u7ed3\u6784\u4f53\u4fdd\u5b58\u7740\u4ece\u78c1\u76d8inode\u8bfb\u4e0a\u6765\u7684\u4fe1\u606f\u3002\u5728\u4e0a\u56fe\u7684\u4f8b\u5b50\u4e2d\uff0c\u6709\u4e24\u4e2adentry\uff0c\u5206\u522b\u8868\u793a\/home\/akaedu\/a\u548c\/home\/akaedu\/b\uff0c\u5b83\u4eec\u90fd\u6307\u5411\u540c\u4e00\u4e2ainode\uff0c\u8bf4\u660e\u8fd9\u4e24\u4e2a\u6587\u4ef6\u4e92\u4e3a\u786c\u94fe\u63a5\u3002inode\u7ed3\u6784\u4f53\u4e2d\u4fdd\u5b58\u7740\u4ece\u78c1\u76d8\u5206\u533a\u7684inode\u8bfb\u4e0a\u6765\u4fe1\u606f\uff0c\u4f8b\u5982\u6240\u6709\u8005\u3001\u6587\u4ef6\u5927\u5c0f\u3001\u6587\u4ef6\u7c7b\u578b\u548c\u6743\u9650\u4f4d\u7b49\u3002\u6bcf\u4e2ainode\u7ed3\u6784\u4f53\u90fd\u6709\u4e00\u4e2a\u6307\u5411inode_operations\u7ed3\u6784\u4f53\u7684\u6307\u9488\uff0c\u540e\u8005\u4e5f\u662f\u4e00\u7ec4\u51fd\u6570\u6307\u9488\u6307\u5411\u4e00\u4e9b\u5b8c\u6210\u6587\u4ef6\u76ee\u5f55\u64cd\u4f5c\u7684\u5185\u6838\u51fd\u6570\u3002<\/p>\n

\u548cfile_operations\u4e0d\u540c\uff0cinode_operations\u6240\u6307\u5411\u7684\u4e0d\u662f\u9488\u5bf9\u67d0\u4e00\u4e2a\u6587\u4ef6\u8fdb\u884c\u64cd\u4f5c\u7684\u51fd\u6570\uff0c\u800c\u662f\u5f71\u54cd\u6587\u4ef6\u548c\u76ee\u5f55\u5e03\u5c40\u7684\u51fd\u6570\uff0c\u4f8b\u5982\u6dfb\u52a0\u5220\u9664\u6587\u4ef6\u548c\u76ee\u5f55\u3001\u8ddf\u8e2a\u7b26\u53f7\u94fe\u63a5\u7b49\u7b49\uff0c\u5c5e\u4e8e\u540c\u4e00\u6587\u4ef6\u7cfb\u7edf\u7684\u5404inode\u7ed3\u6784\u4f53\u53ef\u4ee5\u6307\u5411\u540c\u4e00\u4e2ainode_operations\u7ed3\u6784\u4f53\u3002<\/p>\n

inode\u7ed3\u6784\u4f53\u6709\u4e00\u4e2a\u6307\u5411super_block\u7ed3\u6784\u4f53\u7684\u6307\u9488\u3002super_block\u7ed3\u6784\u4f53\u4fdd\u5b58\u7740\u4ece\u78c1\u76d8\u5206\u533a\u7684\u8d85\u7ea7\u5757\u8bfb\u4e0a\u6765\u7684\u4fe1\u606f\uff0c\u4f8b\u5982\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\u3001\u5757\u5927\u5c0f\u7b49\u3002super_block\u7ed3\u6784\u4f53\u7684s_root\u6210\u5458\u662f\u4e00\u4e2a\u6307\u5411dentry\u7684\u6307\u9488\uff0c\u8868\u793a\u8fd9\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u6839\u76ee\u5f55\u88abmount\u5230\u54ea\u91cc\uff0c\u5728\u4e0a\u56fe\u7684\u4f8b\u5b50\u4e2d\u8fd9\u4e2a\u5206\u533a\u88abmount\u5230\/home\u76ee\u5f55\u4e0b\u3002<\/p>\n

file\u3001dentry\u3001inode\u3001super_block\u8fd9\u51e0\u4e2a\u7ed3\u6784\u4f53\u7ec4\u6210\u4e86VFS\u7684\u6838\u5fc3\u6982\u5ff5\u3002\u5bf9\u4e8eext2\u6587\u4ef6\u7cfb\u7edf\u6765\u8bf4\uff0c\u5728\u78c1\u76d8\u5b58\u50a8\u5e03\u5c40\u4e0a\u4e5f\u6709inode\u548c\u8d85\u7ea7\u5757\u7684\u6982\u5ff5\uff0c\u6240\u4ee5\u5f88\u5bb9\u6613\u548cVFS\u4e2d\u7684\u6982\u5ff5\u5efa\u7acb\u5bf9\u5e94\u5173\u7cfb\u3002\u800c\u53e6\u5916\u4e00\u4e9b\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\u6765\u81ea\u975eUNIX\u7cfb\u7edf\uff08\u4f8b\u5982Windows\u7684FAT32\u3001NTFS\uff09\uff0c\u53ef\u80fd\u6ca1\u6709inode\u6216\u8d85\u7ea7\u5757\u8fd9\u6837\u7684\u6982\u5ff5\uff0c\u4f46\u4e3a\u4e86\u80fdmount\u5230Linux\u7cfb\u7edf\uff0c\u4e5f\u53ea\u597d\u5728\u9a71\u52a8\u7a0b\u5e8f\u4e2d\u786c\u51d1\u4e00\u4e0b\uff0c\u5728Linux\u4e0b\u770bFAT32\u548cNTFS\u5206\u533a\u4f1a\u53d1\u73b0\u6743\u9650\u4f4d\u662f\u9519\u7684\uff0c\u6240\u6709\u6587\u4ef6\u90fd\u662frwxrwxrwx\uff0c\u56e0\u4e3a\u5b83\u4eec\u672c\u6765\u5c31\u6ca1\u6709inode\u548c\u6743\u9650\u4f4d\u7684\u6982\u5ff5\uff0c\u8fd9\u662f\u786c\u51d1\u51fa\u6765\u7684\u3002<\/p>\n

3.7 \u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf<\/strong><\/span><\/div>\n

linux\u7cfb\u7edf\u4e2d\u6bcf\u4e2a\u5206\u533a\u90fd\u662f\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\uff0c\u90fd\u6709\u81ea\u5df1\u7684\u76ee\u5f55\u5c42\u6b21\u7ed3\u6784\u3002linux\u4f1a\u5c06\u8fd9\u4e9b\u5206\u5c5e\u4e0d\u540c\u5206\u533a\u7684\u3001\u5355\u72ec\u7684\u6587\u4ef6\u7cfb\u7edf\u6309\u4e00\u5b9a\u7684\u65b9\u5f0f\u5f62\u6210\u4e00\u4e2a\u7cfb\u7edf\u7684\u603b\u7684\u76ee\u5f55\u5c42\u6b21\u7ed3\u6784\u3002\u8fd9\u91cc\u6240\u8bf4\u7684\u201c\u6309\u4e00\u5b9a\u65b9\u5f0f\u201d\u5c31\u662f\u6307\u7684\u6302\u8f7d\u3002<\/p>\n

\u5c06\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u9876\u5c42\u76ee\u5f55\u6302\u5230\u53e6\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\u7684\u5b50\u76ee\u5f55\u4e0a\uff0c\u4f7f\u5b83\u4eec\u6210\u4e3a\u4e00\u4e2a\u6574\u4f53\uff0c\u79f0\u4e3a\u6302\u8f7d\u3002\u628a\u8be5\u5b50\u76ee\u5f55\u79f0\u4e3a\u6302\u8f7d\u70b9.<\/p>\n

\u4f8b\u5982\u8981\u8bfb\u53d6\u786c\u76d8\u4e2d\u7684\u4e00\u4e2a\u683c\u5f0f\u5316\u597d\u7684\u5206\u533a\u3001\u5149\u76d8\u6216\u8f6f\u4ef6\u7b49\u8bbe\u5907\u65f6\uff0c\u5fc5\u987b\u5148\u628a\u8fd9\u4e9b\u8bbe\u5907\u5bf9\u5e94\u5230\u67d0\u4e2a\u76ee\u5f55\u4e0a\uff0c\u800c\u8fd9\u4e2a\u76ee\u5f55\u5c31\u79f0\u4e3a\u201c\u6302\u8f7d\u70b9\uff08mount point\uff09\u201d\uff0c\u8fd9\u6837\u624d\u53ef\u4ee5\u8bfb\u53d6\u8fd9\u4e9b\u8bbe\u5907\u3002 \u6302\u8f7d\u540e\u5c06\u7269\u7406\u5206\u533a\u7ec6\u8282\u5c4f\u853d\u6389\uff0c\u7528\u6237\u53ea\u6709\u7edf\u4e00\u7684\u903b\u8f91\u6982\u5ff5\u3002\u6240\u6709\u7684\u4e1c\u897f\u90fd\u662f\u6587\u4ef6\u3002<\/p>\n

\u6ce8\u610f\uff1a<\/strong><\/p>\n

1\u3001\u6302\u8f7d\u70b9\u5fc5\u987b\u662f\u4e00\u4e2a\u76ee\u5f55\u3002<\/p>\n

2\u3001\u4e00\u4e2a\u5206\u533a\u6302\u8f7d\u5728\u4e00\u4e2a\u5df2\u5b58\u5728\u7684\u76ee\u5f55\u4e0a\uff0c\u8fd9\u4e2a\u76ee\u5f55\u53ef\u4ee5\u4e0d\u4e3a\u7a7a\uff0c\u4f46\u6302\u8f7d\u540e\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u4ee5\u524d\u7684\u5185\u5bb9\u5c06\u4e0d\u53ef\u7528\u3002<\/p>\n

\u5bf9\u4e8e\u5176\u4ed6\u64cd\u4f5c\u7cfb\u7edf\u5efa\u7acb\u7684\u6587\u4ef6\u7cfb\u7edf\u7684\u6302\u8f7d\u4e5f\u662f\u8fd9\u6837\u3002\u4f46\u662f\u9700\u8981\u7406\u89e3\u7684\u662f\uff1a\u5149\u76d8\u3001\u8f6f\u76d8\u3001\u5176\u4ed6\u64cd\u4f5c\u7cfb\u7edf\u4f7f\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u7684\u683c\u5f0f\u4e0elinux\u4f7f\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\u662f\u4e0d\u4e00\u6837\u7684\u3002\u5149\u76d8\u662fISO9660\uff1b\u8f6f\u76d8\u662ffat16\u6216ext2\uff1bwindows NT\u662ffat16\u3001NTFS\uff1bwindows98\u662ffat16\u3001fat32\uff1bwindows2000\u548cwindowsXP\u662ffat16\u3001fat32\u3001 NTFS\u3002\u6302\u8f7d\u524d\u8981\u4e86\u89e3linux\u662f\u5426\u652f\u6301\u6240\u8981\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\u3002<\/p>\n

\u6302\u8f7d\u65f6\u4f7f\u7528mount\u547d\u4ee4\uff0c\u5176\u683c\u5f0f\uff1amount [-\u53c2\u6570] [\u8bbe\u5907\u540d\u79f0] [\u6302\u8f7d\u70b9]<\/p>\n

\u5176\u4e2d\u5e38\u7528\u7684\u53c2\u6570\u6709\uff1a<\/strong><\/p>\n

-t \u6307\u5b9a\u8bbe\u5907\u7684\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\uff08\u4ec0\u4e48\u63d0\u5230\u7684\u6587\u4ef6\u7c7b\u578b\uff09<\/p>\n

-o \u6307\u5b9a\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u65f6\u7684\u9009\u9879\u3002\u6709\u4e9b\u4e5f\u53ef\u7528\u5728\/etc\/fstab\u4e2d\u3002\u5e38\u7528\u7684\u6709<\/p>\n

codepage=XXX \u4ee3\u7801\u9875\r\niocharset=XXX \u5b57\u7b26\u96c6\r\nro \u4ee5\u53ea\u8bfb\u65b9\u5f0f\u6302\u8f7d\r\nrw \u4ee5\u8bfb\u5199\u65b9\u5f0f\u6302\u8f7d\r\nnouser \u4f7f\u4e00\u822c\u7528\u6237\u65e0\u6cd5\u6302\u8f7d\r\nuser \u53ef\u4ee5\u8ba9\u4e00\u822c\u7528\u6237\u6302\u8f7d\u8bbe\u5907\r\n<\/pre>\n

\u4f8b\u5982\uff1a<\/strong><\/p>\n

1. \u6302\u8f7dwindows\u7684\u6587\u4ef6\u7cfb\u7edf\uff1a<\/strong><\/p>\n

1\uff09\u9996\u5148\u6211\u4eec\u4f7f\u7528sudo fdisk -l\u67e5\u770b\u6302\u8f7d\u7684\u8bbe\u5907\uff0c\u4f8b\u5982\u6700\u4e0b\u9762\u6709\uff1a\/dev\/hda5<\/p>\n

2\uff09mkdir\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\uff0c\u8fd9\u91cc\u7684\u76ee\u5f55\u662f\u4f5c\u4e3a\u6302\u5728\u76ee\u5f55\uff0c\u5c31\u662f\u4f60\u8981\u628aE\u76d8\u6302\u5230\u8fd9\u4e2a\u76ee\u5f55\u4e0b\uff1amk \/mnt\/winc<\/p>\n

3\uff09windows\u548clinux\u4f7f\u7528\u7684\u4e0d\u662f\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\uff0c\u4e00\u822c\u60c5\u51b5\u4e0blinux\u4e0d\u6302\u8f7dwindows\u6587\u4ef6\u7cfb\u7edf\uff0c\u6240\u4ee5\u8981\u4f60\u624b\u52a8mount\uff1a<\/p>\n

 # mount -t vfat \/dev\/hda5 \/mnt\/winc \uff08 -t vfat\u6307\u51fa\u8fd9\u91cc\u7684\u6587\u4ef6\u7cfb\u7edffat32\uff09<\/pre>\n

\u73b0\u5728\u5c31\u53ef\u4ee5\u8fdb\u5165\/mnt\/winc\u7b49\u76ee\u5f55\u8bfb\u5199\u8fd9\u4e9b\u6587\u4ef6\u4e86\u3002<\/p>\n

2.\u6302\u8f7d\u5149\u76d8\uff1a# mk \/mnt\/cdrom<\/strong><\/p>\n

 # mount -t iso9660 \/dev\/cdrom \/mnt\/cdrom (\u5173\u76d8\u7684\u540d\u5b57\u4e00\u822c\u90fd\u662fcdrom\uff0c\u8fd9\u6761\u547d\u4ee4\u4e00\u822c\u90fd\u901a\u7528)<\/pre>\n

3.\u865a\u62df\u673a\u5171\u4eab\u6587\u4ef6\u5939\uff1a\u4f8b\u5982\u5728VirtualBox\u4e0b\uff0c\u4e3b\u673a\u662fWindows\uff0cUbuntu\u662fGuest\u3002<\/strong>\u5171\u5206\u4e09\u6b65\uff1a<\/p>\n

1). \u9996\u5148\u8981\u5b89\u88c5\u865a\u62df\u7535\u8111\u5de5\u5177\u5305\uff1a<\/p>\n

\u5728VirtualBox\u7684\u83dc\u5355\u91cc\u9009\u62e9\u201d\u8bbe\u5907\u201d->\u201d\u5b89\u88c5\u865a\u62df\u7535\u8111\u5de5\u5177\u5305\u201d\uff0c\u4f60\u4f1a\u53d1\u73b0\u5728Ubuntu\u684c\u9762\u4e0a\u591a\u51fa\u4e00\u4e2a\u5149\u76d8\u56fe\u6807\uff0c\u8fd9\u5f20\u5149\u76d8\u9ed8\u8ba4\u88ab\u81ea\u52a8\u52a0\u8f7d\u5230\u4e86\u6587\u4ef6\u5939\/media\/cdom0\uff0c\u800c\u4e14\/cdrom\u81ea\u52a8\u6307\u5411\u8fd9\u4e2a\u6587\u4ef6\u5939\u3002\u9ed8\u8ba4\u8bbe\u7f6e\u4e0b\u6587\u4ef6\u7ba1\u7406\u5668\u4f1a\u81ea\u52a8\u6253\u5f00\u8fd9\u5f20\u5149\u76d8\uff0c\u53ef\u4ee5\u770b\u5230\u91cc\u9762\u6709\u4e2a\u201dVBoxLinuxAdditions.run\u201d\u6587\u4ef6\u3002\u6253\u5f00\u4e00\u4e2a\u547d\u4ee4\u884c\u7ec8\u7aef\uff0c\u4f9d\u6b21\u8f93\u5165\u201dcd \/cdrom\u201d\u548c\u201dsudo sh .\/VBoxLinuxAdditions.run\u201d\uff0c\u4e0d\u542b\u53cc\u5f15\u53f7\uff0c\u5f00\u59cb\u5b89\u88c5\u5de5\u5177\u5305\u3002\u5b89\u88c5\u5b8c\u6bd5\uff0c\u4f1a\u7528\u82f1\u6587\u63d0\u793a\u8981\u91cd\u542fUbuntu\uff0c\u5efa\u8bae\u7acb\u523b\u91cd\u542f\u3002\u91cd\u542f\u540e\uff0c\u6bd4\u8f83\u660e\u663e\u7684\u53d8\u5316\u662f\u9f20\u6807\u662f\u5171\u4eab\u6a21\u5f0f\uff0c\u5e76\u4e14\u526a\u8d34\u677f\u4e5f\u548cWindows\u5171\u4eab\u4e86\u3002\u5982\u679c\u6709\u8fd9\u4e9b\u53d8\u5316\uff0c\u8bf4\u660e\u865a\u62df\u7535\u8111\u5de5\u5177\u5305\u5df2\u7ecf\u88c5\u6210\u529f\u3002<\/p>\n

2). \u4e0b\u4e00\u6b65\u8bbe\u7f6e\u5171\u4eab\u6587\u4ef6\u5939\u3002<\/p>\n

\u5728\u5171\u4eab\u6587\u4ef6\u5939\u8bbe\u7f6e\u7a97\u53e3\u4e2d\uff0c\u5355\u51fb\u53f3\u4fa7\u7684\u201d\u6dfb\u52a0\u4e00\u4e2a\u5171\u4eab\u6587\u4ef6\u5939\u201d\uff0c\u8def\u5f84\u9009\u62e9\u4f60\u60f3\u8981\u5171\u4eab\u7684Windows\u6587\u4ef6\u5939\uff0c\u5171\u4eab\u540d\u4efb\u53d6\u4e00\u4e2a\u81ea\u5df1\u559c\u6b22\u7684\uff0c\u6bd4\u5982\u201dmyshare\u201d\uff0c\u9009\u9879read-only\u662f\u6307\u662f\u5426\u53ea\u5141\u8bb8ubuntu\u8bfb\u8fd9\u4e2a\u6587\u4ef6\u5939\uff0c\u8bf7\u6839\u636e\u9700\u8981\u9009\u62e9\u8fd9\u4e2a\u9009\u9879\u3002<\/p>\n

3). \u5728ubuntu\u4e0b\u6302\u8f7d\u8fd9\u4e2a\u5171\u4eab\u6587\u4ef6\u5939:sudo mount -t vboxsf myshare \/media\/share<\/p>\n

\u5176\u4e2d\u201dmyshare\u201d\u662f\u4e4b\u524d\u53d6\u7684\u5171\u4eab\u6587\u4ef6\u5939\u7684\u540d\u5b57\uff0c\u201d\/media\/share\u201d\u662f\u8981\u6302\u8f7d\u5230\u7684\u76ee\u6807\u6587\u4ef6.<\/p>\n

3.8 \u81ea\u52a8\u6302\u8f7dwindows\u5206\u533a<\/strong><\/span><\/div>\n

\u6bcf\u6b21\u5f00\u673a\u8bbf\u95eewindows\u5206\u533a\u90fd\u8981\u8fd0\u884cmount\u547d\u4ee4\u663e\u7136\u592a\u70e6\u7410\uff0c\u4e3a\u4ec0\u4e48\u8bbf\u95ee\u5176\u4ed6\u7684linux\u5206\u533a\u4e0d\u7528\u4f7f\u7528mount\u547d\u4ee4\u5462\uff1f<\/p>\n

\u5176\u5b9e\uff0c\u6bcf\u6b21\u5f00\u673a\u65f6\uff0clinux\u81ea\u52a8\u5c06\u9700\u8981\u6302\u8f7d\u7684linux\u5206\u533a\u6302\u8f7d\u4e0a\u4e86\u3002\u90a3\u4e48\u6211\u4eec\u662f\u4e0d\u662f\u53ef\u4ee5\u8bbe\u5b9a\u8ba9linux\u5728\u542f\u52a8\u7684\u65f6\u5019\u4e5f\u6302\u8f7d\u6211\u4eec\u5e0c\u671b\u6302\u8f7d\u7684\u5206\u533a\uff0c\u5982windows\u5206\u533a\uff0c\u4ee5\u5b9e\u73b0\u6587\u4ef6\u7cfb\u7edf\u7684\u81ea\u52a8\u6302\u8f7d\u5462\uff1f<\/p>\n

\u8fd9\u662f\u5b8c\u5168\u53ef\u4ee5\u7684\u3002\u5728\/etc\u76ee\u5f55\u4e0b\u6709\u4e2afstab\u6587\u4ef6\uff0c\u5b83\u91cc\u9762\u5217\u51fa\u4e86linux\u5f00\u673a\u65f6\u81ea\u52a8\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u7684\u5217\u8868\u3002\u6211\u7684\/etc\/fstab\u6587\u4ef6\u5982\u4e0b\uff1a<\/p>\n

\/dev\/hda2 \/ ext3 defaults 1 1\r\n\/dev\/hda1 \/boot ext3 defaults 1 2\r\nnone \/dev\/pts devpts gid=5,mode=620 0 0\r\nnone \/proc proc defaults 0 0\r\nnone \/dev\/shm tmpfs defaults 0 0\r\n\/dev\/hda3 swap swap defaults 0 0\r\n\/dev\/cdrom \/mnt\/cdrom iso9660 noauto,codepage=936,iocharset=gb2312 0 0\r\n\/dev\/fd0 \/mnt\/floppy auto noauto,owner,kudzu 0 0\r\n\/dev\/hdb1 \/mnt\/winc vfat defaults,codepage=936,iocharset=cp936 0 0\r\n\/dev\/hda5 \/mnt\/wind vfat defaults,codepage=936,iocharset=cp936 0 0\r\n<\/pre>\n

\u5728\/etc\/fstab\u6587\u4ef6\u91cc\uff0c\u7b2c\u4e00\u5217\u662f\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u7684\u8bbe\u5907\u540d\uff0c\u7b2c\u4e8c\u5217\u662f\u6302\u8f7d\u70b9\uff0c\u7b2c\u4e09\u5217\u662f\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\uff0c\u7b2c\u56db\u5217\u662f\u6302\u8f7d\u7684\u9009\u9879\uff0c\u9009\u9879\u95f4\u7528\u9017\u53f7\u5206\u9694\u3002\u7b2c\u4e94\u516d\u5217\u4e0d\u77e5\u9053\u662f\u4ec0\u4e48\u610f\u601d\uff0c\u8fd8\u671b\u9ad8\u624b\u6307\u70b9\u3002<\/p>\n

\u5728\u6700\u540e\u4e24\u884c\u662f\u6211\u624b\u5de5\u6dfb\u52a0\u7684windows\u4e0b\u7684C\uff1bD\u76d8\uff0c\u52a0\u4e86codepage=936\u548ciocharset=cp936\u53c2\u6570\u4ee5\u652f\u6301\u4e2d\u6587\u6587\u4ef6\u540d\u3002\u53c2\u6570defaults\u5b9e\u9645\u4e0a\u5305\u542b\u4e86\u4e00\u7ec4\u9ed8\u8ba4\u53c2\u6570\uff1a<\/p>\n

rw \u4ee5\u53ef\u8bfb\u5199\u6a21\u5f0f\u6302\u8f7d<\/p>\n

suid \u5f00\u542f\u7528\u6237ID\u548c\u7fa4\u7ec4ID\u8bbe\u7f6e\u4f4d<\/p>\n

dev \u53ef\u89e3\u8bfb\u6587\u4ef6\u7cfb\u7edf\u4e0a\u7684\u5b57\u7b26\u6216\u533a\u5757\u8bbe\u5907<\/p>\n

exec \u53ef\u6267\u884c\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n

auto \u81ea\u52a8\u6302\u8f7d<\/p>\n

nouser \u4f7f\u4e00\u822c\u7528\u6237\u65e0\u6cd5\u6302\u8f7d<\/p>\n

async \u4ee5\u975e\u540c\u6b65\u65b9\u5f0f\u6267\u884c\u6587\u4ef6\u7cfb\u7edf\u7684\u8f93\u5165\u8f93\u51fa\u64cd\u4f5c<\/p>\n

\u5927\u5bb6\u53ef\u4ee5\u770b\u5230\u5728\u8fd9\u4e2a\u5217\u8868\u91cc\uff0c\u5149\u9a71\u548c\u8f6f\u9a71\u662f\u4e0d\u81ea\u52a8\u6302\u8f7d\u7684\uff0c\u53c2\u6570\u8bbe\u7f6e\u4e3anoauto\u3002\uff08\u5982\u679c\u4f60\u975e\u8981\u8bbe\u6210\u81ea\u52a8\u6302\u8f7d\uff0c\u4f60\u8981\u786e\u4fdd\u6bcf\u6b21\u5f00\u673a\u65f6\u4f60\u7684\u5149\u9a71\u548c\u8f6f\u9a71\u91cc\u90fd\u8981\u6709\u76d8\uff0c\u5475\u5475\u3002)<\/p>\n

3.9 \u8f6f\u8fde\u63a5\u3001\u786c\u94fe\u63a5<\/strong><\/span><\/div>\n

\u53ef\u4ee5\u7528ln\u547d\u4ee4\u5bf9\u4e00\u4e2a\u5df2\u7ecf\u5b58\u5728\u7684\u6587\u4ef6\u518d\u5efa\u7acb\u4e00\u4e2a\u65b0\u7684\u8fde\u63a5\uff0c\u800c\u4e0d\u590d\u5236\u6587\u4ef6\u7684\u5185\u5bb9\u3002\u8fde\u63a5\u6709\u8f6f\u8fde\u63a5\u548c\u786c\u8fde\u63a5\u4e4b\u5206\uff0c\u8f6f\u8fde\u63a5\u53c8\u53eb\u7b26\u53f7\u8fde\u63a5\u3002\u5b83\u4eec\u5404\u81ea\u7684\u7279\u70b9\u662f\uff1a
\n\u786c\u8fde\u63a5\uff1a\u662f\u7ed9\u6587\u4ef6\u4e00\u4e2a\u526f\u672c\uff0c\u539f\u6587\u4ef6\u540d\u548c\u8fde\u63a5\u6587\u4ef6\u540d\u90fd\u6307\u5411\u76f8\u540c\u7684\u7269\u7406\u5730\u5740\u3002\u76ee\u5f55\u4e0d\u80fd\u6709\u786c\u8fde\u63a5\uff1b\u786c\u8fde\u63a5\u4e0d\u80fd\u8de8\u8d8a\u6587\u4ef6\u7cfb\u7edf\uff08\u4e0d\u80fd\u8de8\u8d8a\u4e0d\u540c\u7684\u5206\u533a\uff09\u6587\u4ef6\u5728\u78c1\u76d8\u4e2d\u53ea\u6709\u4e00\u4e2a\u62f7\u8d1d\uff0c\u8282\u7701\u786c\u76d8\u7a7a\u95f4\uff1b<\/p>\n

\u4fee\u6539\u5176\u4e2d\u4e00\u4e2a\uff0c\u4e0e\u5176\u8fde\u63a5\u7684\u6587\u4ef6\u540c\u65f6\u88ab\u4fee\u6539\u3002\u5982\u679c\u5220\u9664\u5176\u4e2d\u4efb\u610f\u4e00\u4e2a\u5176\u4f59\u7684\u6587\u4ef6\u5c06\u4e0d\u53d7\u5f71\u54cd\u3002<\/p>\n

\u7531\u4e8e\u5220\u9664\u6587\u4ef6\u8981\u5728\u540c\u4e00\u4e2a\u7d22\u5f15\u8282\u70b9\u5c5e\u4e8e\u552f\u4e00\u7684\u8fde\u63a5\u65f6\u624d\u80fd\u6210\u529f\uff0c\u56e0\u6b64\u53ef\u4ee5\u9632\u6b62\u4e0d\u5fc5\u8981\u7684\u8bef\u5220\u9664\u3002<\/p>\n

\u7b26\u53f7\u8fde\u63a5\uff08\u8f6f\u8fde\u63a5\uff09\uff1a\u7528ln -s\u547d\u4ee4\u5efa\u7acb\u6587\u4ef6\u7684\u7b26\u53f7\u8fde\u63a5\u7b26\u53f7\u8fde\u63a5\u662flinux\u7279\u6b8a\u6587\u4ef6\u7684\u4e00\u79cd\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u6587\u4ef6\uff0c\u5b83\u7684\u6570\u636e\u662f\u5b83\u6240\u8fde\u63a5\u7684\u6587\u4ef6\u7684\u8def\u5f84\u540d\u3002\u7c7b\u4f3cwindows\u4e0b\u7684\u5feb\u6377\u65b9\u5f0f\u3002<\/p>\n

\u5f53\u7136\u5220\u9664\u8fd9\u4e2a\u8fde\u63a5\uff0c\u4e5f\u4e0d\u4f1a\u5f71\u54cd\u5230\u6e90\u6587\u4ef6\uff0c\u4f46\u5bf9\u8fde\u63a5\u6587\u4ef6\u7684\u4f7f\u7528\u3001\u5f15\u7528\u90fd\u662f\u76f4\u63a5\u8c03\u7528\u6e90\u6587\u4ef6\u7684\u3002<\/p>\n

\u5177\u4f53\u5173\u7cfb\u53ef\u4ee5\u770b\u4e0b\u56fe\uff1a<\/p>\n

\"\"<\/p>\n

\u4ece\u56fe\u4e0a\u53ef\u4ee5\u770b\u51fa\u786c\u94fe\u63a5\u548c\u8f6f\u94fe\u63a5\u7684\u533a\u522b\uff1a<\/p>\n

1\uff1a\u786c\u94fe\u63a5\u539f\u6587\u4ef6\u548c\u65b0\u6587\u4ef6\u7684inode\u7f16\u53f7\u4e00\u81f4\u3002\u800c\u8f6f\u94fe\u63a5\u4e0d\u4e00\u6837\u3002<\/p>\n

2\uff1a\u5bf9\u539f\u6587\u4ef6\u5220\u9664\uff0c\u4f1a\u5bfc\u81f4\u8f6f\u94fe\u63a5\u4e0d\u53ef\u7528\uff0c\u800c\u786c\u94fe\u63a5\u4e0d\u53d7\u5f71\u54cd\u3002<\/p>\n

3\uff1a\u5bf9\u539f\u6587\u4ef6\u7684\u4fee\u6539\uff0c\u8f6f\u3001\u786c\u94fe\u63a5\u6587\u4ef6\u5185\u5bb9\u4e5f\u4e00\u6837\u7684\u4fee\u6539\uff0c\u56e0\u4e3a\u90fd\u662f\u6307\u5411\u540c\u4e00\u4e2a\u6587\u4ef6\u5185\u5bb9\u7684\u3002<\/p>\n

3.10 \u6587\u4ef6\u76ee\u5f55\u7ba1\u7406\u547d\u4ee4<\/strong><\/span><\/div>\n

\u78c1\u76d8\u548c\u6587\u4ef6\u7a7a\u95f4 \uff1afdisk df du<\/p>\n

\u6587\u4ef6\u76ee\u5f55\u4e0e\u7ba1\u7406\uff1a cd pwd mkdir rmdir ls cp rm mv<\/p>\n

\u67e5\u770b\u6587\u4ef6\u5185\u5bb9 cat\u3001tac\u3001more\u3001less\u3001head \u3001tail<\/p>\n

\u6587\u4ef6\u76ee\u5f55\u4e0e\u6743\u9650 \uff1achmod chown chgrp umask<\/p>\n

\u6587\u4ef6\u67e5\u627e\uff1awhich\u3001whereis\u3001locate\u3001find\u3001find<\/p>\n

4. linux \u5e94\u7528<\/strong><\/div>\n

\u6807\u51c6\u7684Linux\u7cfb\u7edf\u4e00\u822c\u90fd\u6709\u4e00\u5957\u90fd\u6709\u79f0\u4e3a\u5e94\u7528\u7a0b\u5e8f\u7684\u7a0b\u5e8f\u96c6\uff0c\u5b83\u5305\u62ec\u6587\u672c\u7f16\u8f91\u5668\u3001\u7f16\u7a0b\u8bed\u8a00\u3001X Window\u3001\u529e\u516c\u5957\u4ef6\u3001Internet\u5de5\u5177\u548c\u6570\u636e\u5e93\u7b49\u3002<\/p>\n

5. linux\u5185\u6838\u53c2\u6570\u4f18\u5316<\/strong><\/div>\n

\u5185\u6838\u53c2\u6570\u662f\u7528\u6237\u548c\u7cfb\u7edf\u5185\u6838\u4e4b\u95f4\u4ea4\u4e92\u7684\u4e00\u4e2a\u63a5\u53e3\uff0c\u901a\u8fc7\u8fd9\u4e2a\u63a5\u53e3\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u7cfb\u7edf\u8fd0\u884c\u7684\u540c\u65f6\u52a8\u6001\u66f4\u65b0\u5185\u6838\u914d\u7f6e\uff0c\u800c\u8fd9\u4e9b\u5185\u6838\u53c2\u6570\u662f\u901a\u8fc7Linux Proc\u6587\u4ef6\u7cfb\u7edf\u5b58\u5728\u7684\u3002\u56e0\u6b64\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574Proc\u6587\u4ef6\u7cfb\u7edf\u8fbe\u5230\u4f18\u5316Linux\u6027\u80fd\u7684\u76ee\u7684\u3002<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.codeceo.com\/article\/linux-system.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/linux-system-structure.html<\/a>\u7f16\u8f91\uff1a\u5cb3\u6c38\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb Linux\u7cfb\u7edf\u4e00\u822c\u67094\u4e2a\u4e3b\u8981\u90e8\u5206\uff1a\u5185\u6838\u3001shell\u3001\u6587\u4ef6\u7cfb\u7edf\u548c\u5e94\u7528\u7a0b\u5e8f\u3002\u5185\u6838\u3001shell\u548c\u6587\u4ef6\u7cfb\u7edf\u4e00\u8d77\u5f62 […]<\/p>\n","protected":false},"author":63,"featured_media":81465,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-81454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/81454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=81454"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/81454\/revisions"}],"predecessor-version":[{"id":81492,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/81454\/revisions\/81492"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/81465"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=81454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=81454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=81454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}