{"id":57569,"date":"2025-08-15T15:29:57","date_gmt":"2025-08-15T07:29:57","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/57569.html"},"modified":"2025-08-15T15:29:57","modified_gmt":"2025-08-15T07:29:57","slug":"linux%e7%b3%bb%e7%bb%9f%e4%b9%8binfocmp-%e5%91%bd%e4%bb%a4%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/57569.html","title":{"rendered":"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3"},"content":{"rendered":"<h3>\u4e00\u3001\u547d\u4ee4\u6982\u8ff0<\/h3>\n<p>infocmp \u662f\u4e00\u4e2a\u7528\u4e8e \u6bd4\u8f83\u6216\u8f93\u51fa terminfo \u63cf\u8ff0 \u7684\u5de5\u5177&#xff0c;\u5176\u6838\u5fc3\u529f\u80fd\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\u6bd4\u8f83\u591a\u4e2a\u7ec8\u7aef\u63cf\u8ff0\u7684\u5dee\u5f02&#xff08;\u5982\u5e03\u5c14\u503c\u3001\u6570\u503c\u3001\u5b57\u7b26\u4e32\u80fd\u529b&#xff09;\u3002<\/li>\n<li>\u751f\u6210 terminfo \u6e90\u7801\u5217\u8868&#xff08;\u652f\u6301 terminfo \u540d\u79f0\u3001C \u53d8\u91cf\u540d\u3001termcap \u540d\u79f0&#xff09;\u3002<\/li>\n<li>\u8f6c\u6362 terminfo \u5230 termcap \u683c\u5f0f&#xff08;\u652f\u6301\u517c\u5bb9\u6027\u8c03\u6574&#xff09;\u3002<\/li>\n<li>\u5206\u6790 use&#061; \u5b57\u6bb5&#xff08;\u751f\u6210\u76f8\u5bf9\u63cf\u8ff0\u4ee5\u590d\u7528\u901a\u7528\u5b9a\u4e49&#xff09;\u3002<\/li>\n<\/ul>\n<h4>\u26a0\ufe0f \u6ce8\u610f\u4e8b\u9879<\/h4>\n<ul>\n<li>terminfo \u662f\u5b58\u50a8\u7ec8\u7aef\u529f\u80fd\u7684\u6570\u636e\u5e93&#xff0c;termcap \u662f\u65e7\u7248\u6587\u672c\u683c\u5f0f\u3002<\/li>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;infocmp \u4f1a\u4ece \/usr\/share\/terminfo \u6216\u73af\u5883\u53d8\u91cf TERMINFO \u4e2d\u8bfb\u53d6\u6570\u636e\u3002<\/li>\n<li>\u4f7f\u7528 infocmp \u65f6\u9700\u786e\u4fdd\u7ec8\u7aef\u540d\u79f0\u5b58\u5728&#xff08;\u5982 xterm-256color&#xff09;\u3002<\/li>\n<\/ul>\n<h3>\u4e8c\u3001\u57fa\u672c\u8bed\u6cd5<\/h3>\n<p>infocmp <span class=\"token punctuation\">[<\/span>\u9009\u9879<span class=\"token punctuation\">]<\/span> <span class=\"token punctuation\">[<\/span>\u7ec8\u7aef\u540d<span class=\"token punctuation\">..<\/span>.<span class=\"token punctuation\">]<\/span><\/p>\n<h4>\u53c2\u6570\u8bf4\u660e&#xff1a;<\/h4>\n<ul>\n<li>[\u9009\u9879]&#xff1a;\u63a7\u5236\u8f93\u51fa\u683c\u5f0f\u3001\u6bd4\u8f83\u6a21\u5f0f\u7b49&#xff08;\u8be6\u89c1\u4e0b\u6587&#xff09;\u3002<\/li>\n<li>[\u7ec8\u7aef\u540d&#8230;]&#xff1a;\u6307\u5b9a\u8981\u6bd4\u8f83\u6216\u8f93\u51fa\u7684\u7ec8\u7aef\u540d\u79f0&#xff08;\u5982 vt100 xterm&#xff09;\u3002<\/li>\n<\/ul>\n<h3>\u4e09\u3001\u6838\u5fc3\u9009\u9879\u8be6\u89e3<\/h3>\n<h4>1. \u6bd4\u8f83\u6a21\u5f0f<\/h4>\n<table>\n<tr>\u9009\u9879\u8bf4\u660e\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>-d<\/td>\n<td>\u663e\u793a\u4e0d\u540c\u7ec8\u7aef\u95f4\u7684\u5dee\u5f02&#xff08;\u4ec5\u5e03\u5c14\/\u6570\u503c\/\u5b57\u7b26\u4e32\u5b57\u6bb5&#xff09;<\/td>\n<td>infocmp -d vt100 xterm<\/td>\n<\/tr>\n<tr>\n<td>-c<\/td>\n<td>\u663e\u793a\u591a\u4e2a\u7ec8\u7aef\u7684\u5171\u901a\u80fd\u529b&#xff08;\u5ffd\u7565\u672a\u8bbe\u7f6e\u7684\u5b57\u6bb5&#xff09;<\/td>\n<td>infocmp -c vt100 xterm<\/td>\n<\/tr>\n<tr>\n<td>-n<\/td>\n<td>\u663e\u793a\u672a\u5728\u4efb\u4f55\u7ec8\u7aef\u4e2d\u5b9a\u4e49\u7684\u80fd\u529b<\/td>\n<td>infocmp -n vt100 xterm<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>2. \u6e90\u7801\u751f\u6210<\/h4>\n<table>\n<tr>\u9009\u9879\u8bf4\u660e\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>-I<\/td>\n<td>\u4f7f\u7528 terminfo \u540d\u79f0\u8f93\u51fa\u6e90\u7801<\/td>\n<td>infocmp -I vt100<\/td>\n<\/tr>\n<tr>\n<td>-L<\/td>\n<td>\u4f7f\u7528 &lt;term.h&gt; \u4e2d\u7684 C \u53d8\u91cf\u540d\u8f93\u51fa\u6e90\u7801<\/td>\n<td>infocmp -L vt100<\/td>\n<\/tr>\n<tr>\n<td>-C<\/td>\n<td>\u4f7f\u7528 termcap \u540d\u79f0\u8f93\u51fa\u6e90\u7801&#xff08;\u9700\u7ed3\u5408 -r&#xff09;<\/td>\n<td>infocmp -C -r vt100<\/td>\n<\/tr>\n<tr>\n<td>-K<\/td>\n<td>\u4f18\u5316 termcap \u517c\u5bb9\u6027&#xff08;BSD \u98ce\u683c&#xff09;<\/td>\n<td>infocmp -C -K vt100<\/td>\n<\/tr>\n<tr>\n<td>-r<\/td>\n<td>\u8f93\u51fa\u6240\u6709\u80fd\u529b&#xff08;\u4e0d\u9650\u4e8e termcap \u652f\u6301\u5b57\u6bb5&#xff09;<\/td>\n<td>infocmp -C -r vt100<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>3. use&#061; \u5206\u6790<\/h4>\n<table>\n<tr>\u9009\u9879\u8bf4\u660e\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>-u<\/td>\n<td>\u751f\u6210\u7b2c\u4e00\u4e2a\u7ec8\u7aef\u7684\u76f8\u5bf9\u63cf\u8ff0&#xff08;\u57fa\u4e8e\u5176\u4ed6\u7ec8\u7aef\u7684 use&#061; \u5b57\u6bb5&#xff09;<\/td>\n<td>infocmp -u vt100 xterm<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4. \u6570\u636e\u5e93\u7ba1\u7406<\/h4>\n<table>\n<tr>\u9009\u9879\u8bf4\u660e\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>-A directory<\/td>\n<td>\u6307\u5b9a\u7b2c\u4e00\u4e2a\u7ec8\u7aef\u7684\u6570\u636e\u5e93\u8def\u5f84<\/td>\n<td>infocmp -A \/custom\/db vt100<\/td>\n<\/tr>\n<tr>\n<td>-B directory<\/td>\n<td>\u6307\u5b9a\u5176\u4ed6\u7ec8\u7aef\u7684\u6570\u636e\u5e93\u8def\u5f84<\/td>\n<td>infocmp -B \/custom\/db vt100 xterm<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5. \u5176\u4ed6\u9009\u9879<\/h4>\n<table>\n<tr>\u9009\u9879\u8bf4\u660e\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>-0<\/td>\n<td>\u5355\u884c\u8f93\u51fa&#xff08;\u4e0d\u6362\u884c&#xff09;<\/td>\n<td>infocmp -0 vt100<\/td>\n<\/tr>\n<tr>\n<td>-1<\/td>\n<td>\u6bcf\u4e2a\u5b57\u6bb5\u72ec\u5360\u4e00\u884c<\/td>\n<td>infocmp -1 vt100<\/td>\n<\/tr>\n<tr>\n<td>-a<\/td>\n<td>\u4fdd\u7559\u6ce8\u91ca\u5b57\u6bb5&#xff08;\u4ee5 . \u5f00\u5934&#xff09;<\/td>\n<td>infocmp -a vt100<\/td>\n<\/tr>\n<tr>\n<td>-D<\/td>\n<td>\u6253\u5370\u6570\u636e\u5e93\u641c\u7d22\u8def\u5f84\u5e76\u9000\u51fa<\/td>\n<td>infocmp -D<\/td>\n<\/tr>\n<tr>\n<td>-E<\/td>\n<td>\u8f93\u51fa C \u7ed3\u6784\u4f53\u521d\u59cb\u5316\u8868<\/td>\n<td>infocmp -E vt100<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u56db\u3001\u6838\u5fc3\u529f\u80fd\u8be6\u89e3<\/h3>\n<h4>1. \u6bd4\u8f83\u7ec8\u7aef\u5dee\u5f02<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-d<\/span> vt100 xterm<\/p>\n<ul>\n<li>\u6548\u679c&#xff1a;\u5217\u51fa vt100 \u548c xterm \u5728\u5e03\u5c14\u3001\u6570\u503c\u3001\u5b57\u7b26\u4e32\u80fd\u529b\u4e0a\u7684\u5dee\u5f02\u3002<\/li>\n<li>\u8f93\u51fa\u793a\u4f8b&#xff1a;Comparing vt100 to xterm.<br \/>\n    First terminal: vt100<br \/>\n    Second terminal: xterm<br \/>\nDifferences:<br \/>\n    num: colors&#064; vs 8<br \/>\n    str: setab&#061;\\\\E[4%p1%dm vs \\\\E[48;5;%p1%dm<\/p>\n<\/li>\n<\/ul>\n<h4>2. \u751f\u6210 termcap \u683c\u5f0f<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-C<\/span> <span class=\"token parameter variable\">-r<\/span> <span class=\"token parameter variable\">-K<\/span> vt100<\/p>\n<ul>\n<li>\u6548\u679c&#xff1a;\u5c06 vt100 \u7684 terminfo \u63cf\u8ff0\u8f6c\u6362\u4e3a\u517c\u5bb9 BSD \u7684 termcap \u683c\u5f0f\u3002<\/li>\n<li>\u9002\u7528\u573a\u666f&#xff1a;\u65e7\u7cfb\u7edf\u6216\u5de5\u5177\u4ec5\u652f\u6301 termcap \u65f6\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<h4>3. \u751f\u6210\u76f8\u5bf9\u63cf\u8ff0&#xff08;use&#061; \u5b57\u6bb5&#xff09;<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-u<\/span> vt100 xterm<\/p>\n<ul>\n<li>\u6548\u679c&#xff1a;\u751f\u6210 vt100 \u7684\u63cf\u8ff0&#xff0c;\u5e76\u5c1d\u8bd5\u590d\u7528 xterm \u7684\u5b9a\u4e49\u3002<\/li>\n<li>\u8f93\u51fa\u793a\u4f8b&#xff1a;vt100|xterm compatible terminal,<br \/>\n    use&#061;xterm,<br \/>\n    cols#80,<br \/>\n    lines#24,<\/p>\n<\/li>\n<\/ul>\n<h4>4. \u8f93\u51fa C \u7ed3\u6784\u4f53<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-E<\/span> vt100<\/p>\n<ul>\n<li>\u6548\u679c&#xff1a;\u751f\u6210 TERMTYPE \u7ed3\u6784\u4f53\u7684 C \u521d\u59cb\u5316\u4ee3\u7801\u3002<\/li>\n<li>\u9002\u7528\u573a\u666f&#xff1a;\u5f00\u53d1\u81ea\u5b9a\u4e49\u7ec8\u7aef\u5e93\u65f6\u76f4\u63a5\u5d4c\u5165\u80fd\u529b\u8868\u3002<\/li>\n<\/ul>\n<h3>\u4e94\u3001\u5b9e\u9645\u5e94\u7528\u793a\u4f8b<\/h3>\n<h4>\u793a\u4f8b 1&#xff1a;\u67e5\u770b\u9ed8\u8ba4\u7ec8\u7aef\u7684 terminfo \u6e90\u7801<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-I<\/span><\/p>\n<ul>\n<li>\u8f93\u51fa&#xff1a;\u5f53\u524d\u73af\u5883\u53d8\u91cf TERM \u5bf9\u5e94\u7684\u7ec8\u7aef\u63cf\u8ff0&#xff08;\u5982 xterm-256color&#xff09;\u3002<\/li>\n<\/ul>\n<h4>\u793a\u4f8b 2&#xff1a;\u5c06 terminfo \u8f6c\u6362\u4e3a termcap \u5e76\u4fdd\u5b58<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-C<\/span> <span class=\"token parameter variable\">-r<\/span> vt100 <span class=\"token operator\">&gt;<\/span> vt100.termcap<\/p>\n<ul>\n<li>\u6548\u679c&#xff1a;\u751f\u6210 vt100 \u7684 termcap \u6587\u4ef6&#xff0c;\u4f9b\u65e7\u7cfb\u7edf\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<h4>\u793a\u4f8b 3&#xff1a;\u6bd4\u8f83\u4e24\u4e2a\u7ec8\u7aef\u7684\u5171\u901a\u80fd\u529b<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-c<\/span> vt100 ansi<\/p>\n<ul>\n<li>\u8f93\u51fa&#xff1a;\u5217\u51fa vt100 \u548c ansi \u7684\u5171\u901a\u5b57\u6bb5&#xff0c;\u9a8c\u8bc1\u662f\u5426\u53ef\u590d\u7528\u5b9a\u4e49\u3002<\/li>\n<\/ul>\n<h4>\u793a\u4f8b 4&#xff1a;\u751f\u6210\u5355\u884c\u683c\u5f0f\u7684 terminfo \u63cf\u8ff0<\/h4>\n<p>infocmp <span class=\"token parameter variable\">-0<\/span> vt100<\/p>\n<ul>\n<li>\u6548\u679c&#xff1a;\u6240\u6709\u5b57\u6bb5\u5408\u5e76\u4e3a\u4e00\u884c&#xff0c;\u4fbf\u4e8e\u811a\u672c\u89e3\u6790\u3002<\/li>\n<\/ul>\n<h3>\u516d\u3001\u6ce8\u610f\u4e8b\u9879<\/h3>\n<li>\n<p>\u7ec8\u7aef\u540d\u79f0\u5339\u914d&#xff1a;<\/p>\n<ul>\n<li>\u82e5\u7ec8\u7aef\u540d\u4e0d\u5b58\u5728&#xff0c;infocmp \u4f1a\u62a5\u9519&#xff08;\u5982 unknown terminal: unknown&#xff09;\u3002<\/li>\n<li>\u53ef\u901a\u8fc7 toe \u547d\u4ee4\u67e5\u770b\u7cfb\u7edf\u652f\u6301\u7684\u7ec8\u7aef\u5217\u8868\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>termcap \u8f6c\u6362\u9650\u5236&#xff1a;<\/p>\n<ul>\n<li>termcap \u4e0d\u652f\u6301\u67d0\u4e9b terminfo \u7684\u53c2\u6570\u5316\u5b57\u7b26\u4e32&#xff08;\u5982 %p1%&#039;x&#039;%&#043;%c&#xff09;\u3002<\/li>\n<li>\u8f6c\u6362\u540e\u9700\u624b\u52a8\u7f16\u8f91\u6ce8\u91ca\u6389\u7684\u90e8\u5206&#xff08;\u4ee5 # \u5f00\u5934&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>use&#061; \u5b57\u6bb5\u987a\u5e8f&#xff1a;<\/p>\n<ul>\n<li>use&#061; \u5b57\u6bb5\u7684\u987a\u5e8f\u5f71\u54cd\u6700\u7ec8\u7f16\u8bd1\u7ed3\u679c&#xff08;tic \u4ece\u5de6\u5230\u53f3\u89e3\u6790&#xff09;\u3002<\/li>\n<li>\u4f7f\u7528 -u \u65f6\u5e94\u6309\u4f18\u5148\u7ea7\u6392\u5e8f\u7ec8\u7aef\u540d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u6570\u636e\u5e93\u8def\u5f84\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u82e5 infocmp \u65e0\u6cd5\u627e\u5230\u7ec8\u7aef\u63cf\u8ff0&#xff0c;\u53ef\u8bbe\u7f6e TERMINFO \u73af\u5883\u53d8\u91cf&#xff1a;<span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\">TERMINFO<\/span><span class=\"token operator\">&#061;<\/span>\/custom\/terminfo\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u8f93\u51fa\u683c\u5f0f\u63a7\u5236&#xff1a;<\/p>\n<ul>\n<li>\u4f7f\u7528 -1 \u9009\u9879\u53ef\u63d0\u9ad8\u53ef\u8bfb\u6027&#xff08;\u6bcf\u5b57\u6bb5\u72ec\u7acb\u4e00\u884c&#xff09;\u3002<\/li>\n<li>\u4f7f\u7528 -0 \u9009\u9879\u9002\u5408\u811a\u672c\u5904\u7406&#xff08;\u5355\u884c\u8f93\u51fa&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<h3>\u4e03\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/h3>\n<h4>Q1: \u5982\u4f55\u67e5\u770b\u652f\u6301\u7684\u7ec8\u7aef\u5217\u8868&#xff1f;<\/h4>\n<ul>\n<li>\u65b9\u6cd5&#xff1a;toe\n<\/li>\n<\/ul>\n<h4>Q2: \u5982\u4f55\u5c06 terminfo \u8f6c\u6362\u4e3a termcap&#xff1f;<\/h4>\n<ul>\n<li>\u65b9\u6cd5&#xff1a;infocmp <span class=\"token parameter variable\">-C<\/span> <span class=\"token parameter variable\">-r<\/span> vt100 <span class=\"token operator\">&gt;<\/span> vt100.termcap\n<\/li>\n<\/ul>\n<h4>Q3: \u5982\u4f55\u751f\u6210 C \u7ed3\u6784\u4f53\u521d\u59cb\u5316\u4ee3\u7801&#xff1f;<\/h4>\n<ul>\n<li>\u65b9\u6cd5&#xff1a;infocmp <span class=\"token parameter variable\">-E<\/span> vt100\n<\/li>\n<\/ul>\n<h4>Q4: \u5982\u4f55\u6bd4\u8f83\u591a\u4e2a\u7ec8\u7aef\u7684\u5171\u901a\u80fd\u529b&#xff1f;<\/h4>\n<ul>\n<li>\u65b9\u6cd5&#xff1a;infocmp <span class=\"token parameter variable\">-c<\/span> vt100 xterm ansi\n<\/li>\n<\/ul>\n<h4>Q5: \u5982\u4f55\u6307\u5b9a\u81ea\u5b9a\u4e49\u6570\u636e\u5e93\u8def\u5f84&#xff1f;<\/h4>\n<ul>\n<li>\u65b9\u6cd5&#xff1a;infocmp <span class=\"token parameter variable\">-A<\/span> \/custom\/db <span class=\"token parameter variable\">-B<\/span> \/custom\/db vt100 xterm\n<\/li>\n<\/ul>\n<h3>\u516b\u3001\u603b\u7ed3\u8868\u683c&#xff1a;\u5e38\u7528\u547d\u4ee4\u7528\u9014\u4e00\u89c8<\/h3>\n<table>\n<tr>\u547d\u4ee4\u529f\u80fd\u5907\u6ce8<\/tr>\n<tbody>\n<tr>\n<td>infocmp -d vt100 xterm<\/td>\n<td>\u6bd4\u8f83 vt100 \u548c xterm \u7684\u5dee\u5f02<\/td>\n<td>\u5feb\u901f\u5b9a\u4f4d\u517c\u5bb9\u6027\u95ee\u9898<\/td>\n<\/tr>\n<tr>\n<td>infocmp -C -r vt100<\/td>\n<td>\u751f\u6210 termcap \u683c\u5f0f\u7684 vt100 \u63cf\u8ff0<\/td>\n<td>\u517c\u5bb9\u65e7\u7cfb\u7edf<\/td>\n<\/tr>\n<tr>\n<td>infocmp -u vt100 xterm<\/td>\n<td>\u751f\u6210 vt100 \u7684\u76f8\u5bf9\u63cf\u8ff0&#xff08;\u590d\u7528 xterm&#xff09;<\/td>\n<td>\u51cf\u5c11\u91cd\u590d\u5b9a\u4e49<\/td>\n<\/tr>\n<tr>\n<td>infocmp -E vt100<\/td>\n<td>\u8f93\u51fa vt100 \u7684 C \u7ed3\u6784\u4f53\u521d\u59cb\u5316\u8868<\/td>\n<td>\u5d4c\u5165\u5f00\u53d1\u4ee3\u7801<\/td>\n<\/tr>\n<tr>\n<td>infocmp -0 vt100<\/td>\n<td>\u5355\u884c\u8f93\u51fa vt100 \u7684\u63cf\u8ff0<\/td>\n<td>\u811a\u672c\u89e3\u6790\u53cb\u597d<\/td>\n<\/tr>\n<tr>\n<td>infocmp -D<\/td>\n<td>\u6253\u5370\u6570\u636e\u5e93\u641c\u7d22\u8def\u5f84<\/td>\n<td>\u8c03\u8bd5\u8def\u5f84\u95ee\u9898<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb848\u6b21\uff0c\u70b9\u8d5e19\u6b21\uff0c\u6536\u85cf13\u6b21\u3002infocmp \u662f\u4e00\u4e2a\u7528\u4e8e\u6bd4\u8f83\u548c\u8f93\u51fa\u7ec8\u7aef\u63cf\u8ff0(terminfo)\u7684\u5de5\u5177\uff0c\u4e3b\u8981\u529f\u80fd\u5305\u62ec\u6bd4\u8f83\u7ec8\u7aef\u5dee\u5f02\u3001\u751f\u6210 terminfo \u6e90\u7801\u3001\u8f6c\u6362\u4e3a termcap \u683c\u5f0f\u4ee5\u53ca\u5206\u6790 use= \u5b57\u6bb5\u3002\u901a\u8fc7\u4e0d\u540c\u9009\u9879\u53ef\u63a7\u5236\u8f93\u51fa\u683c\u5f0f\uff08\u5982 terminfo \u540d\u79f0\u3001C \u53d8\u91cf\u540d\u6216 termcap \u540d\u79f0\uff09\uff0c\u652f\u6301\u6bd4\u8f83\u591a\u4e2a\u7ec8\u7aef\u7684\u5171\u901a\u80fd\u529b\u6216\u5dee\u5f02\u5b57\u6bb5\u3002\u4f7f\u7528\u65f6\u9700\u786e\u4fdd\u7ec8\u7aef\u540d\u79f0\u5b58\u5728\uff08\u5982 xterm-256color\uff09\uff0c\u53ef\u901a\u8fc7\u73af\u5883\u53d8\u91cf TERMINFO \u6307\u5b9a\u6570\u636e\u5e93\u8def\u5f84\u3002\u5e38\u89c1\u7528\u9014\u5305\u62ec\u7ec8\u7aef\u517c\u5bb9\u6027\u68c0\u67e5\u3001termcap \u683c\u5f0f\u8f6c\u6362\u4ee5\u53ca\u5d4c\u5165 C \u4ee3\u7801\u7b49\uff0c\u662f\u7ec8\u7aef\u5f00\u53d1\u548c<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6022,58,43,44],"topic":[],"class_list":["post-57569","post","type-post","status-publish","format-standard","hentry","category-server","tag-infocmp","tag-linux","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/57569.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb848\u6b21\uff0c\u70b9\u8d5e19\u6b21\uff0c\u6536\u85cf13\u6b21\u3002infocmp \u662f\u4e00\u4e2a\u7528\u4e8e\u6bd4\u8f83\u548c\u8f93\u51fa\u7ec8\u7aef\u63cf\u8ff0(terminfo)\u7684\u5de5\u5177\uff0c\u4e3b\u8981\u529f\u80fd\u5305\u62ec\u6bd4\u8f83\u7ec8\u7aef\u5dee\u5f02\u3001\u751f\u6210 terminfo \u6e90\u7801\u3001\u8f6c\u6362\u4e3a termcap \u683c\u5f0f\u4ee5\u53ca\u5206\u6790 use= \u5b57\u6bb5\u3002\u901a\u8fc7\u4e0d\u540c\u9009\u9879\u53ef\u63a7\u5236\u8f93\u51fa\u683c\u5f0f\uff08\u5982 terminfo \u540d\u79f0\u3001C \u53d8\u91cf\u540d\u6216 termcap \u540d\u79f0\uff09\uff0c\u652f\u6301\u6bd4\u8f83\u591a\u4e2a\u7ec8\u7aef\u7684\u5171\u901a\u80fd\u529b\u6216\u5dee\u5f02\u5b57\u6bb5\u3002\u4f7f\u7528\u65f6\u9700\u786e\u4fdd\u7ec8\u7aef\u540d\u79f0\u5b58\u5728\uff08\u5982 xterm-256color\uff09\uff0c\u53ef\u901a\u8fc7\u73af\u5883\u53d8\u91cf TERMINFO \u6307\u5b9a\u6570\u636e\u5e93\u8def\u5f84\u3002\u5e38\u89c1\u7528\u9014\u5305\u62ec\u7ec8\u7aef\u517c\u5bb9\u6027\u68c0\u67e5\u3001termcap \u683c\u5f0f\u8f6c\u6362\u4ee5\u53ca\u5d4c\u5165 C \u4ee3\u7801\u7b49\uff0c\u662f\u7ec8\u7aef\u5f00\u53d1\u548c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/57569.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-15T07:29:57+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57569.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/57569.html\",\"name\":\"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-15T07:29:57+00:00\",\"dateModified\":\"2025-08-15T07:29:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/57569.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/57569.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57569.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/57569.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb848\u6b21\uff0c\u70b9\u8d5e19\u6b21\uff0c\u6536\u85cf13\u6b21\u3002infocmp \u662f\u4e00\u4e2a\u7528\u4e8e\u6bd4\u8f83\u548c\u8f93\u51fa\u7ec8\u7aef\u63cf\u8ff0(terminfo)\u7684\u5de5\u5177\uff0c\u4e3b\u8981\u529f\u80fd\u5305\u62ec\u6bd4\u8f83\u7ec8\u7aef\u5dee\u5f02\u3001\u751f\u6210 terminfo \u6e90\u7801\u3001\u8f6c\u6362\u4e3a termcap \u683c\u5f0f\u4ee5\u53ca\u5206\u6790 use= \u5b57\u6bb5\u3002\u901a\u8fc7\u4e0d\u540c\u9009\u9879\u53ef\u63a7\u5236\u8f93\u51fa\u683c\u5f0f\uff08\u5982 terminfo \u540d\u79f0\u3001C \u53d8\u91cf\u540d\u6216 termcap \u540d\u79f0\uff09\uff0c\u652f\u6301\u6bd4\u8f83\u591a\u4e2a\u7ec8\u7aef\u7684\u5171\u901a\u80fd\u529b\u6216\u5dee\u5f02\u5b57\u6bb5\u3002\u4f7f\u7528\u65f6\u9700\u786e\u4fdd\u7ec8\u7aef\u540d\u79f0\u5b58\u5728\uff08\u5982 xterm-256color\uff09\uff0c\u53ef\u901a\u8fc7\u73af\u5883\u53d8\u91cf TERMINFO \u6307\u5b9a\u6570\u636e\u5e93\u8def\u5f84\u3002\u5e38\u89c1\u7528\u9014\u5305\u62ec\u7ec8\u7aef\u517c\u5bb9\u6027\u68c0\u67e5\u3001termcap \u683c\u5f0f\u8f6c\u6362\u4ee5\u53ca\u5d4c\u5165 C \u4ee3\u7801\u7b49\uff0c\u662f\u7ec8\u7aef\u5f00\u53d1\u548c","og_url":"https:\/\/www.wsisp.com\/helps\/57569.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-15T07:29:57+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/57569.html","url":"https:\/\/www.wsisp.com\/helps\/57569.html","name":"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-15T07:29:57+00:00","dateModified":"2025-08-15T07:29:57+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/57569.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/57569.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/57569.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u7cfb\u7edf\u4e4binfocmp \u547d\u4ee4\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=57569"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57569\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=57569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=57569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=57569"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=57569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}