{"id":54082,"date":"2025-08-12T22:09:36","date_gmt":"2025-08-12T14:09:36","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/54082.html"},"modified":"2025-08-12T22:09:36","modified_gmt":"2025-08-12T14:09:36","slug":"linux%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8b%e6%a0%87%e5%87%86io%e5%87%bd%e6%95%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/54082.html","title":{"rendered":"linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570"},"content":{"rendered":"<h2>1.\u6807\u51c6IO\u51fd\u6570\u89e3\u6790<\/h2>\n<ul>\n<li>IO\u662f\u64cd\u4f5c\u7cfb\u7edf\u7684\u57fa\u7840<\/li>\n<\/ul>\n<p>\u5982\u679c\u6ca1\u6709IO\u64cd\u4f5c&#xff0c;\u6240\u6709\u7684\u7cfb\u7edf\u6587\u4ef6\u5c06\u65e0\u6cd5\u5b58\u50a8&#xff0c;\u66f4\u8c08\u4e0d\u4e0a\u5904\u7406\u4e0e\u5206\u6790&#xff0c;\u7cfb\u7edf\u8fd0\u884c\u7684\u7ed3\u679c\u4e5f\u4e0d\u4e3a\u7528\u6237\u6240\u89c1\u3002<\/p>\n<ul>\n<li>\u7cfb\u7edfIO\u4e0e\u4e0e\u6807\u51c6IO\u7684\u533a\u522b<\/li>\n<\/ul>\n<p>\u6807\u51c6IO\u79f0\u4e3astdio&#xff0c;\u7cfb\u7edfIO\u79f0\u4e3a\u6587\u4ef6IO\u3002\u7cfb\u7edfIO\u662f\u5185\u6838\u63d0\u4f9b\u7ed9\u7528\u6237\u5904\u7406IO\u64cd\u4f5c\u7684\u63a5\u53e3&#xff0c;\u6807\u51c6C\u662f\u4e0d\u80fd\u5904\u7406\u8f93\u5165\u8f93\u51fa\u95ee\u9898\u7684&#xff0c;\u5fc5\u987b\u501f\u52a9\u5185\u6838\u63d0\u4f9b\u7684\u63a5\u53e3\u5b9e\u73b0\u5bf9program\u7684\u8f93\u5165\u8f93\u51fa\u5904\u7406\u3002\u6807\u51c6IO\u662f\u5728\u7cfb\u7edfIO\u7684\u57fa\u7840\u4e0a\u7684\u4e8c\u6b21\u5c01\u88c5&#xff0c;\u4ee5\u5c4f\u853d\u4e0d\u540c\u7cfb\u7edf\u7ed3\u6784\u4e4b\u95f4\u7684\u5dee\u5f02&#xff0c;\u589e\u52a0\u7a0b\u5e8f\u7684\u53ef\u79fb\u690d\u6027\u3002<\/p>\n<h2 style=\"background-color:transparent\">2.\u6587\u4ef6\u6307\u9488FILE * \u6982\u8ff0<\/h2>\n<p>FILE\u662f\u4e00\u4e2a\u7ed3\u6784\u4f53&#xff0c;\u4e3b\u4f53\u6709\u4e09\u90e8\u5206&#xff1a;\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff08;\u7d22\u5f15\u5230\u5bf9\u5e94\u7684\u78c1\u76d8\u6587\u4ef6&#xff09;&#xff0c;\u6587\u4ef6\u8bfb\u5199\u6307\u9488&#xff0c;I\/O\u7f13\u51b2\u533a&#xff08;\u5185\u5b58\u5730\u5740&#xff09;\u3002<\/p>\n<ul>\n<li>\u6587\u4ef6\u63cf\u8ff0\u7b26<\/li>\n<\/ul>\n<p>\u6bcf\u4e2a\u4f4d\u7f6e\u4ee3\u8868\u80fd\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6&#xff0c;\u6bcf\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6&#xff0c;\u5219\u5360\u7528\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff0c;\u800c\u4e14\u4f7f\u7528\u7684\u662f\u7a7a\u95f2\u7684\u6700\u5c0f\u7684\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff08;3~1023&#xff09;\u3002<\/p>\n<p>\u9ed8\u8ba4\u524d\u4e09\u4e2a\u662f\u6253\u5f00\u7684&#xff0c;\u5206\u522b\u662f\u6807\u51c6\u8f93\u5165&#xff08;STDIN_FILENO&#xff09;\u3001\u6807\u51c6\u8f93\u51fa(STDOUT_FILENO)\u3001\u6807\u51c6\u9519\u8bef(STDERR_FILENO)\u3002\u4e09\u8005\u6587\u4ef6\u63cf\u8ff0\u7b26\u5206\u522b\u4e3a0\u30011\u30012\u3002<\/p>\n<ul>\n<li>\u4e3a\u4ec0\u4e48\u9700\u8981I\/O\u7f13\u51b2\u533a&#xff1f;<\/li>\n<\/ul>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u7b54&#xff1a;\u51cf\u5c11\u5bf9\u78c1\u76d8\u7684\u8bbf\u95ee\u6b21\u6570&#xff0c;\u63d0\u9ad8\u7a0b\u5e8f\u64cd\u4f5c\u6587\u4ef6\u7684\u6548\u7387\u3002\u5185\u5b58\u548c\u786c\u76d8\u7684\u8bbf\u95ee\u901f\u5ea6\u4e0d\u5339\u914d&#xff0c;\u76f8\u5dee\u592a\u5927&#xff0c;\u5047\u5982\u6ca1\u6709\u7f13\u51b2\u533a&#xff0c;\u6bcf\u6b21\u76f4\u63a5\u4ece\u786c\u76d8\u5b58\u53d6\u6570\u636e&#xff0c;\u5219\u51cf\u6162\u4e86\u901f\u5ea6\u3002<\/p>\n<ul>\n<li>\u6ce8\u610f<\/li>\n<\/ul>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 linux\u7cfb\u7edf\u51fd\u6570\u6ca1\u6709\u7f13\u5b58&#xff0c;\u8981\u64cd\u4f5c\u5b83&#xff08;\u7f13\u5b58&#xff09;&#xff0c;\u9700\u8981\u7531\u7528\u6237\u63d0\u4f9b\u3002<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u4e3a\u4e86\u63d0\u9ad8\u7a0b\u5e8f\u6548\u7387&#xff0c;C\u5e93\u51fd\u6570\u5185\u90e8\u5c01\u88c5\u4e86\u4e00\u5757\u7f13\u5b58\u3002<\/p>\n<h2>3.\u6807\u51c6IO\u51fd\u6570<\/h2>\n<h3>3.1 fopen\u51fd\u6570<\/h3>\n<h5>3.1.1\u51fd\u6570\u539f\u578b\u00a0<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">FLIE *fopen(const char *path,const char *mode)<\/span><\/li>\n<\/ul>\n<h5>3.1.2 \u5934\u6587\u4ef6<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">#include&lt;stdio.h&gt;<\/span><\/li>\n<\/ul>\n<h5>3.1.3\u53c2\u6570<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">const char *path &#xff1a;\u6253\u5f00\u6307\u5b9a\u8def\u5f84\u4e0b\u7684\u6587\u4ef6<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">const char *mode&#xff1a;\u8868\u793a\u6587\u4ef6\u7684\u6253\u5f00\u65b9\u5f0f<\/span><\/li>\n<\/ul>\n<h5>3.1.4mode<\/h5>\n<\/p>\n<table align=\"center\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" style=\"width:500px\">\n<tbody>\n<tr>\n<td style=\"text-align:center\">r<\/td>\n<td>\u53ea\u8bfb\u65b9\u5f0f\u6253\u5f00&#xff0c;\u6587\u4ef6\u4f4d\u7f6e\u4f4d\u4e8e\u6587\u4ef6\u7684\u8d77\u59cb\u5904&#xff08;\u6587\u4ef6\u5fc5\u987b\u5b58\u5728&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>r&#043;<\/td>\n<td>\u4ee5\u8bfb\u5199\u65b9\u5f0f\u6253\u5f00&#xff0c;\u6587\u4ef6\u4f4d\u7f6e\u4f4d\u4e8e\u6587\u4ef6\u7684\u8d77\u59cb\u5904&#xff08;\u6587\u4ef6\u5fc5\u987b\u5b58\u5728&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>w<\/td>\n<td>\u53ea\u5199\u65b9\u5f0f\u6253\u5f00&#xff0c;\u82e5\u6587\u4ef6\u4e0d\u5b58\u5728\u5219\u65b0\u5efa\u6587\u4ef6&#xff0c;\u82e5\u5b58\u5728&#xff0c;\u5219\u6e05\u7a7a\u539f\u6709\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>w&#043;<\/td>\n<td>\u4ee5\u8bfb\u5199\u65b9\u5f0f\u6253\u5f00&#xff0c;\u82e5\u6587\u4ef6\u4e0d\u5b58\u5728\u5219\u65b0\u5efa\u6587\u4ef6&#xff0c;\u82e5\u5b58\u5728&#xff0c;\u5219\u6e05\u7a7a\u539f\u6709\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>a<\/td>\n<td>\u53ea\u5199\u65b9\u5f0f\u6253\u5f00&#xff0c;\u82e5\u6587\u4ef6\u4e0d\u5b58\u5728\u5219\u521b\u5efa\u6587\u4ef6&#xff0c;\u6587\u4ef6\u504f\u79fb\u91cf\u81ea\u52a8\u5b9a\u4f4d\u5230\u6587\u4ef6\u672b\u5c3e&#xff08;\u4ee5\u8ffd\u52a0\u7684\u65b9\u5f0f\u5199\u6570\u636e&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>a&#043;<\/td>\n<td>\u4ee5\u8bfb\u5199\u65b9\u5f0f\u6253\u5f00&#xff0c;\u82e5\u6587\u4ef6\u4e0d\u5b58\u5728\u5219\u521b\u5efa\u6587\u4ef6&#xff0c;\u6587\u4ef6\u504f\u79fb\u91cf\u81ea\u52a8\u5b9a\u4f4d\u5230\u6587\u4ef6\u672b\u5c3e&#xff08;\u4ee5\u8ffd\u52a0\u7684\u65b9\u5f0f\u5199\u6570\u636e&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>3.1.5\u8fd4\u56de\u503c<\/h5>\n<p>\u6253\u5f00\u6210\u529f\u5219\u8fd4\u56deFILE\u7c7b\u578b\u7684\u6307\u9488&#xff0c;\u5931\u8d25\u5219\u8fd4\u56de\u7a7a\u6307\u9488&#xff0c;\u5e76\u5199\u5165errno\u503c\u3002<\/p>\n<p>\u7b80\u5355\u793a\u4f8b&#xff1a;<\/p>\n<p>#include &lt;stdio.h&gt;<\/p>\n<p>int main(void)<br \/>\n{<br \/>\n    FILE *fp &#061; fopen(&#034;.\/a.txt&#034;, &#034;r&#043;&#034;);<br \/>\n    if (fp &#061;&#061; NULL)<br \/>\n    {<br \/>\n        perror(&#034;use fopen to open file fopen wrong&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n        printf(&#034;use fopen to open file right\\\\n&#034;);<br \/>\n    }<\/p>\n<p>    int flag &#061; fclose(fp);<\/p>\n<p>    return 0;<br \/>\n}<\/p>\n<h3>3.2 fclose\u51fd\u6570<\/h3>\n<h5>3.2.1\u51fd\u6570\u539f\u578b<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">int fclose(FILE *fp)<\/span><\/li>\n<\/ul>\n<h5>3.2.2\u53c2\u6570<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">FILE *fp \u6253\u5f00\u7684\u6587\u4ef6\u6307\u9488<\/span><\/li>\n<\/ul>\n<h5>3.2.3\u8fd4\u56de\u503c<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">\u6210\u529f\u8fd4\u56de 0&#xff0c;\u5982\u679c\u5931\u8d25&#xff0c;\u8fd4\u56deEOF&#xff0c;\u5e76\u4e14\u8bbe\u7f6eerrno\u3002<\/span><\/li>\n<\/ul>\n<p>\u7b80\u5355\u793a\u4f8b&#xff1a;<\/p>\n<p>#include &lt;stdio.h&gt;<\/p>\n<p>int main(void)<br \/>\n{<br \/>\n    FILE *fp &#061; fopen(&#034;.\/a.txt&#034;, &#034;r&#043;&#034;);<br \/>\n    if (fp &#061;&#061; NULL)<br \/>\n    {<br \/>\n        perror(&#034;use fopen to open file fopen wrong&#034;);<br \/>\n        return -1;<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n        printf(&#034;use fopen to open file right\\\\n&#034;);<br \/>\n    }<\/p>\n<p>    int flag &#061; fclose(fp);<br \/>\n    if (!flag)<br \/>\n    {<br \/>\n        printf(&#034;\u5173\u95ed\u6210\u529f\\\\n&#034;);<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n        printf(&#034;\u5173\u95ed\u5931\u8d25\\\\n&#034;);<br \/>\n    }<\/p>\n<p>    return 0;<br \/>\n}<\/p>\n<h3>3.3 fread\u51fd\u6570<\/h3>\n<h5>3.3.1 \u51fd\u6570\u539f\u578b<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">size_t fread(void *ptr,sizet_t size,size_t nmemb,FILE *stream);<\/span><\/li>\n<\/ul>\n<h5>3.3.2 \u53c2\u6570<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">ptr : \u81ea\u5b9a\u4e49\u7f13\u51b2\u533a\u6307\u9488<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">size &#xff1a;\u6570\u636e\u5757\u5927\u5c0f&#xff08;\u6570\u636e\u5355\u5143\u5927\u5c0f&#xff0c;\u5982&#xff1a;1\u4e2a\u5355\u51435\u5b57\u8282&#xff09;<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">nmemb&#xff1a;\u6570\u636e\u5757\u4e2a\u6570 &#xff08;\u8bfb\u53d62\u4e2a\u5355\u5143&#xff0c;\u5373\u4e24\u4e2a\u5355\u5143&#xff0c;10\u4e2a\u5b57\u8282&#xff0c;\u5b9e\u5219\u8fd4\u56de\u6570\u636e\u5355\u5143\u6570\u91cf&#xff09;<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">stream &#xff1a;\u5373\u5c06\u88ab\u8bfb\u53d6\u6570\u636e\u7684\u6587\u4ef6\u6307\u9488<\/span><\/li>\n<\/ul>\n<h5>3.3.3\u00a0 \u8fd4\u56de\u503c<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">\u6210\u529f&#xff1a;\u6210\u529f\u8bfb\u53d6\u7684 \u201c\u6570\u636e\u5355\u5143\u6570\u91cf\u201d&#xff0c;\u5b9e\u9645\u6210\u529f\u8bfb\u53d6\u7684\u5b57\u8282\u6570\u3002<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u5931\u8d25&#xff1a;\u8bfb\u53d6\u7684\u6570\u636e\u5757\u7684\u5927\u5c0f&#xff0c;\u5c0f\u4e8enmemb\u6216\u7b49\u4e8e0\u3002<\/span><\/li>\n<\/ul>\n<h5>3.3.4 \u4e3e\u4f8b<\/h5>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"552\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812140935-689b4b1f0af48.png\" width=\"805\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"134\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812140935-689b4b1f38486.png\" width=\"974\" \/><\/p>\n<p>\u5f53\u4f7f\u7528 size_t ret &#061; fread(buf, 1, 11, f_fd); \u65f6&#xff0c;\u5176\u4e2d\u7684 11 \u8868\u793a\u8bf7\u6c42\u6b64\u6b21\u8bfb\u53d6\u6700\u591a\u5c1d\u8bd5\u8bfb\u53d6 11 \u4e2a\u5b57\u8282&#xff08;1024\u5b57\u8282\u4e5f\u5982\u6b64&#xff09;&#xff08;\u56e0\u4e3a size&#061;1&#xff0c;\u6bcf\u4e2a\u5355\u5143\u662f 1 \u5b57\u8282&#xff09;&#xff0c;\u5982\u679c\u6587\u4ef6\u4e2d\u5b9e\u9645\u6709\u6548\u6570\u636e\u53ea\u6709 10 \u5b57\u8282&#xff08;\u5373 \u201c\u8d85\u51fa 10\u201d \u7684\u60c5\u51b5&#xff09;&#xff0c;fread\u4f1a\u6309\u4ee5\u4e0b\u903b\u8f91\u5904\u7406&#xff1a;<\/p>\n<p>1.\u5b9e\u9645\u8bfb\u53d6\u5b57\u8282\u6570&#xff1a;<br \/>\nfread \u4f1a\u8bfb\u53d6\u6587\u4ef6\u4e2d\u5168\u90e8\u7684 10 \u5b57\u8282\u6570\u636e&#xff08;\u80fd\u8bfb\u5230\u591a\u5c11\u5c31\u8bfb\u591a\u5c11&#xff09;&#xff0c;\u4e0d\u4f1a\u56e0\u4e3a\u8bf7\u6c42 11 \u5b57\u8282\u800c\u7b49\u5f85\u6216\u62a5\u9519\u3002<br \/>\n2.\u8fd4\u56de\u503c ret&#xff1a;<br \/>\n\u8fd4\u56de\u5b9e\u9645\u6210\u529f\u8bfb\u53d6\u7684\u5b57\u8282\u6570 10&#xff08;\u56e0\u4e3a\u6bcf\u4e2a\u5355\u5143\u662f 1 \u5b57\u8282&#xff0c;\u8fd4\u56de\u503c\u7b49\u4e8e\u6210\u529f\u8bfb\u53d6\u7684\u5b57\u8282\u6570&#xff09;\u3002<br \/>\n3.\u7f13\u51b2\u533a\u6570\u636e&#xff1a;<br \/>\n\u7f13\u51b2\u533a buf \u4e2d\u524d 10 \u5b57\u8282\u4f1a\u88ab\u6587\u4ef6\u5185\u5bb9\u586b\u5145&#xff0c;\u7b2c 11 \u5b57\u8282\u53ca\u4e4b\u540e\u7684\u5185\u5bb9\u4e0d\u4f1a\u88ab\u4fee\u6539&#xff08;\u5982\u679c\u662f\u5168\u5c40 \/ \u9759\u6001\u7f13\u51b2\u533a\u53ef\u80fd\u4e3a 0&#xff0c;\u6808\u4e0a\u7684\u7f13\u51b2\u533a\u53ef\u80fd\u662f\u968f\u673a\u503c&#xff0c;\u4f46\u8fd9\u4e9b\u90fd\u4e0d\u662f\u6587\u4ef6\u4e2d\u7684\u6570\u636e&#xff09;\u3002<\/p>\n<p>\u5173\u952e\u7ed3\u8bba&#xff1a;<br \/>\nfread \u7684\u7b2c\u4e09\u4e2a\u53c2\u6570&#xff08;\u6b64\u5904\u4e3a 11&#xff09;\u662f \u201c\u6700\u5927\u5c1d\u8bd5\u8bfb\u53d6\u7684\u5355\u5143\u6570\u201d&#xff0c;\u800c\u975e \u201c\u5fc5\u987b\u8bfb\u53d6\u7684\u6570\u91cf\u201d\u3002<br \/>\n\u5f53\u6587\u4ef6\u5269\u4f59\u6570\u636e\u4e0d\u8db3\u65f6&#xff0c;\u51fd\u6570\u4f1a\u8bfb\u53d6\u6240\u6709\u53ef\u7528\u6570\u636e \u5e76\u8fd4\u56de\u5b9e\u9645\u8bfb\u53d6\u7684\u6570\u91cf&#xff08;\u4e0d\u4f1a\u62a5\u9519&#xff09;&#xff0c;\u8fd9\u662f\u4e00\u79cd\u5b89\u5168\u7684\u8bbe\u8ba1 \u2014\u2014 \u65e2\u4e0d\u4f1a\u56e0\u6570\u636e\u4e0d\u8db3\u800c\u5931\u8d25&#xff0c;\u4e5f\u4e0d\u4f1a\u8bfb\u53d6\u5230\u65e0\u6548\u6570\u636e\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u4f7f\u7528 fread \u65f6\u5fc5\u987b\u901a\u8fc7\u8fd4\u56de\u503c\u5224\u65ad\u5b9e\u9645\u8bfb\u53d6\u7684\u5b57\u8282\u6570&#xff0c;\u800c\u4e0d\u80fd\u5047\u8bbe\u4e00\u5b9a\u80fd\u8bfb\u5230\u8bf7\u6c42\u7684\u6570\u91cf\u3002<\/p>\n<h3>3.4\u00a0fwrite\u51fd\u6570<\/h3>\n<h5>3.4.1 \u51fd\u6570\u539f\u578b<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">size_t fwrite(const void *ptr,size_t size,size_t nmemb,FILE *strem);<\/span><\/li>\n<\/ul>\n<h5>3.4.2 \u53c2\u6570<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">ptr : \u81ea\u5b9a\u4e49\u7f13\u51b2\u533a\u6307\u9488<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">size &#xff1a;\u6570\u636e\u5757\u5927\u5c0f&#xff08;\u6570\u636e\u5355\u5143\u5927\u5c0f&#xff0c;\u5982\u6bcf\u5355\u51435\u4e2a\u5b57\u8282 \u4e00\u517110\u5b57\u8282&#xff0c;\u90a3\u4e48\u5c31\u662f2\u5355\u5143&#xff09;<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">nmemb&#xff1a;\u6570\u636e\u5757\u4e2a\u6570 &#xff08;\u5b9e\u5219\u5199\u5165\u7684\u5b57\u8282\u6570&#xff0c;\u603b\u5355\u5143\u6570\u91cf&#xff09;<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">stream &#xff1a;\u5373\u5c06\u88ab\u5199\u5165\u6570\u636e\u7684\u6587\u4ef6\u6307\u9488<\/span><\/li>\n<\/ul>\n<h5>3.4.3 \u8fd4\u56de\u503c<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">\u6210\u529f&#xff1a;\u5b9e\u9645\u6210\u529f\u5199\u5165\u7684\u5355\u5143\u6570\u91cf&#xff08;\u770b\u81ea\u5df1\u5982\u4f55\u5b9a\u4e49 \u82e51\u4e2a\u5b57\u82821\u5355\u5143&#xff0c;\u5219\u4e3a10\u5355\u5143&#xff0c;\u8fd4\u56de10&#xff09;<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u5931\u8d25&#xff1a;\u8bfb\u53d6\u7684\u6570\u636e\u5757\u7684\u5927\u5c0f&#xff0c;\u5c0f\u4e8enmemb\u6216\u7b49\u4e8e0\u3002<\/span><\/li>\n<\/ul>\n<p>\u4e3e\u4f8b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"449\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812140935-689b4b1f4a2b6.png\" width=\"761\" \/><\/p>\n<h3>3.5 fseek\u51fd\u6570<\/h3>\n<h5>3.5.1 \u51fd\u6570\u539f\u578b<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">int fseek(FILE *strem,long offset,int whence);<\/span><\/li>\n<\/ul>\n<h5>3.5.2 \u53c2\u6570<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">stream &#xff1a;\u9700\u8981\u8bbe\u7f6e\u4f4d\u7f6e\u4fbf\u5b9c\u7684\u6587\u4ef6\u6307\u9488<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">offset &#xff1a;\u65b0\u4f4d\u7f6e\u504f\u79fb\u91cf\u76f8\u5bf9\u57fa\u51c6\u70b9\u7684\u504f\u79fb<\/span><\/li>\n<\/ul>\n<h5>3.5.3 whence<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">SEEK_SET \u6587\u4ef6\u5f00\u5934<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">SEEK_CUR \u6587\u4ef6\u5f53\u524d\u4f4d\u7f6e<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">SEEK_END \u6587\u4ef6\u672b\u5c3e<\/span><\/li>\n<\/ul>\n<h5>3.5.4 \u8fd4\u56de\u503c<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">\u6210\u529f&#xff1a;\u8fd4\u56de 0<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u5931\u8d25&#xff1a;\u8fd4\u56de-1<\/span><\/li>\n<\/ul>\n<p>\u4e3e\u4f8b&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"585\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812140935-689b4b1f6053d.png\" width=\"758\" \/><\/p>\n<h3>3.6 \u83b7\u53d6\/\u8bbe\u7f6e\u5f53\u524d\u4f4d\u7f6e\u504f\u79fb\u91cf<\/h3>\n<h5>3.6.1. \u83b7\u53d6\u6307\u5b9a\u6587\u4ef6\u7684\u5f53\u524d\u4f4d\u7f6e\u504f\u79fb\u91cf<\/h5>\n<ul>\n<li><span style=\"background-color:#dad5e9\">\u5934\u6587\u4ef6 #include&lt;sys\/ioctl.h&gt;<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u51fd\u6570\u539f\u578b long ftell(FILE *stream);<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u53c2\u6570 stream:\u9700\u8981\u8fd4\u56de\u5f53\u524d\u6587\u4ef6\u4f4d\u7f6e\u504f\u79fb\u91cf\u7684\u6587\u4ef6\u6307\u9488\u3002<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u8fd4\u56de\u503c&#xff1a;\u6210\u529f&#xff1a;\u5f53\u524d\u6587\u4ef6\u4f4d\u7f6e\u7684\u504f\u79fb\u91cf\u00a0 \u00a0 \u00a0\u5931\u8d25&#xff1a;-1<\/span><\/li>\n<\/ul>\n<h5><span style=\"background-color:null\">3.6.2 \u5c06\u6307\u5b9a\u6587\u4ef6\u7684\u5f53\u524d\u4f4d\u7f6e\u4fbf\u5b9c\u91cf\u8bbe\u7f6e\u5230\u6587\u4ef6\u5f00\u5934\u5904<\/span><\/h5>\n<\/p>\n<ul>\n<li><span style=\"background-color:#dad5e9\">\u5934\u6587\u4ef6 #include&lt;sys\/ioctl.h&gt;<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u51fd\u6570\u539f\u578b void rewind(FILE *stream);<\/span><\/li>\n<li><span style=\"background-color:#dad5e9\">\u53c2\u6570 stream&#xff1a;\u9700\u8981\u8bbe\u7f6e\u504f\u79fb\u91cf\u7684\u6587\u4ef6\u6307\u9488<\/span><\/li>\n<\/ul>\n<h2>\u603b\u7ed3\u00a0<\/h2>\n<p>\u4e0a\u8ff0\u5bf9\u6807\u51c6IO\u7684\u57fa\u672c\u51fd\u6570\u8fdb\u884c\u4e86\u5c55\u5f00\u7684\u89e3\u6790\u4ee5\u53ca\u51fd\u6570\u7528\u4f8b\u7684\u7b80\u5355\u4f8b\u5b50\u7684\u8fdb\u884c\u4e3e\u4f8b\u7406\u89e3&#xff0c;\u4e3e\u4f8b\u5206\u6790\u4e3a\u4e2a\u4eba\u89c2\u70b9&#xff0c;\u5982\u6709\u9519\u8bef\u4e4b\u5904&#xff0c;\u53ef\u4ee5\u6307\u51fa~\u5b8c\u7ed3\u273f\u273f\u30fd(\u00b0\u25bd\u00b0)\u30ce\u273f\u6492\u82b1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb150\u6b21\u3002FILE\u662f\u4e00\u4e2a\u7ed3\u6784\u4f53\uff0c\u4e3b\u4f53\u6709\u4e09\u90e8\u5206\uff1a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff08\u7d22\u5f15\u5230\u5bf9\u5e94\u7684\u78c1\u76d8\u6587\u4ef6\uff09\uff0c\u6587\u4ef6\u8bfb\u5199\u6307\u9488\uff0cI\/O\u7f13\u51b2\u533a\uff08\u5185\u5b58\u5730\u5740\uff09\u3002\u6587\u4ef6\u63cf\u8ff0\u7b26\u6bcf\u4e2a\u4f4d\u7f6e\u4ee3\u8868\u80fd\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u6bcf\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\uff0c\u5219\u5360\u7528\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u800c\u4e14\u4f7f\u7528\u7684\u662f\u7a7a\u95f2\u7684\u6700\u5c0f\u7684\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff083~1023\uff09\u3002\u9ed8\u8ba4\u524d\u4e09\u4e2a\u662f\u6253\u5f00\u7684\uff0c\u5206\u522b\u662f\u6807\u51c6\u8f93\u5165\uff08STDIN_FILENO\uff09\u6807\u51c6\u8f93\u51fa(STDOUT_FILENO)\u6807\u51c6\u9519\u8bef(STDERR_FILENO)\u3002\u4e09\u8005\u6587\u4ef6\u63cf\u8ff0\u7b26\u5206\u522b\u4e3a0\u30011\u30012\u3002\u4e3a\u4ec0\u4e48\u9700\u8981I\/O\u7f13\u51b2\u533a\uff1f\u7b54\uff1a\u51cf\u5c11\u5bf9\u78c1\u76d8\u7684\u8bbf\u95ee\u6b21\u6570\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u64cd\u4f5c\u6587\u4ef6\u7684\u6548\u7387\u3002<\/p>\n","protected":false},"author":2,"featured_media":54078,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[371,305],"topic":[],"class_list":["post-54082","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-371","tag-305"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570 - \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\/54082.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb150\u6b21\u3002FILE\u662f\u4e00\u4e2a\u7ed3\u6784\u4f53\uff0c\u4e3b\u4f53\u6709\u4e09\u90e8\u5206\uff1a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff08\u7d22\u5f15\u5230\u5bf9\u5e94\u7684\u78c1\u76d8\u6587\u4ef6\uff09\uff0c\u6587\u4ef6\u8bfb\u5199\u6307\u9488\uff0cI\/O\u7f13\u51b2\u533a\uff08\u5185\u5b58\u5730\u5740\uff09\u3002\u6587\u4ef6\u63cf\u8ff0\u7b26\u6bcf\u4e2a\u4f4d\u7f6e\u4ee3\u8868\u80fd\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u6bcf\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\uff0c\u5219\u5360\u7528\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u800c\u4e14\u4f7f\u7528\u7684\u662f\u7a7a\u95f2\u7684\u6700\u5c0f\u7684\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff083~1023\uff09\u3002\u9ed8\u8ba4\u524d\u4e09\u4e2a\u662f\u6253\u5f00\u7684\uff0c\u5206\u522b\u662f\u6807\u51c6\u8f93\u5165\uff08STDIN_FILENO\uff09\u6807\u51c6\u8f93\u51fa(STDOUT_FILENO)\u6807\u51c6\u9519\u8bef(STDERR_FILENO)\u3002\u4e09\u8005\u6587\u4ef6\u63cf\u8ff0\u7b26\u5206\u522b\u4e3a0\u30011\u30012\u3002\u4e3a\u4ec0\u4e48\u9700\u8981I\/O\u7f13\u51b2\u533a\uff1f\u7b54\uff1a\u51cf\u5c11\u5bf9\u78c1\u76d8\u7684\u8bbf\u95ee\u6b21\u6570\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u64cd\u4f5c\u6587\u4ef6\u7684\u6548\u7387\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/54082.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-12T14:09:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812140935-689b4b1f0af48.png\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/54082.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/54082.html\",\"name\":\"linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-12T14:09:36+00:00\",\"dateModified\":\"2025-08-12T14:09:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/54082.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/54082.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/54082.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570\"}]},{\"@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\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570 - \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\/54082.html","og_locale":"zh_CN","og_type":"article","og_title":"linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb150\u6b21\u3002FILE\u662f\u4e00\u4e2a\u7ed3\u6784\u4f53\uff0c\u4e3b\u4f53\u6709\u4e09\u90e8\u5206\uff1a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff08\u7d22\u5f15\u5230\u5bf9\u5e94\u7684\u78c1\u76d8\u6587\u4ef6\uff09\uff0c\u6587\u4ef6\u8bfb\u5199\u6307\u9488\uff0cI\/O\u7f13\u51b2\u533a\uff08\u5185\u5b58\u5730\u5740\uff09\u3002\u6587\u4ef6\u63cf\u8ff0\u7b26\u6bcf\u4e2a\u4f4d\u7f6e\u4ee3\u8868\u80fd\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u6bcf\u6253\u5f00\u4e00\u4e2a\u65b0\u6587\u4ef6\uff0c\u5219\u5360\u7528\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff0c\u800c\u4e14\u4f7f\u7528\u7684\u662f\u7a7a\u95f2\u7684\u6700\u5c0f\u7684\u4e00\u4e2a\u6587\u4ef6\u63cf\u8ff0\u7b26\uff083~1023\uff09\u3002\u9ed8\u8ba4\u524d\u4e09\u4e2a\u662f\u6253\u5f00\u7684\uff0c\u5206\u522b\u662f\u6807\u51c6\u8f93\u5165\uff08STDIN_FILENO\uff09\u6807\u51c6\u8f93\u51fa(STDOUT_FILENO)\u6807\u51c6\u9519\u8bef(STDERR_FILENO)\u3002\u4e09\u8005\u6587\u4ef6\u63cf\u8ff0\u7b26\u5206\u522b\u4e3a0\u30011\u30012\u3002\u4e3a\u4ec0\u4e48\u9700\u8981I\/O\u7f13\u51b2\u533a\uff1f\u7b54\uff1a\u51cf\u5c11\u5bf9\u78c1\u76d8\u7684\u8bbf\u95ee\u6b21\u6570\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u64cd\u4f5c\u6587\u4ef6\u7684\u6548\u7387\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/54082.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-12T14:09:36+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250812140935-689b4b1f0af48.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/54082.html","url":"https:\/\/www.wsisp.com\/helps\/54082.html","name":"linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-12T14:09:36+00:00","dateModified":"2025-08-12T14:09:36+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/54082.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/54082.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/54082.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"linux\u5b66\u4e60\u7b14\u8bb0\u4e4b\u6807\u51c6IO\u51fd\u6570"}]},{"@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\/54082","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=54082"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/54082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/54078"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=54082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=54082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=54082"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=54082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}