{"id":518347,"date":"2021-07-20T01:34:03","date_gmt":"2021-07-19T17:34:03","guid":{"rendered":"http:\/\/4563.org\/?p=518347"},"modified":"2021-07-20T01:34:03","modified_gmt":"2021-07-19T17:34:03","slug":"sed-%e8%a1%8c%e9%a6%96%e5%8a%a0-%e7%84%b6%e5%90%8e%e5%9c%a8%e4%b8%8b%e9%9d%a2%e4%b8%80%e8%a1%8c%e6%b7%bb%e5%8a%a0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=518347","title":{"rendered":"sed \u884c\u9996\u52a0# \u7136\u540e\u5728\u4e0b\u9762\u4e00\u884c\u6dfb\u52a0&#8230;."},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>KDE<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>sed \u884c\u9996\u52a0# \u7136\u540e\u5728\u4e0b\u9762\u4e00\u884c\u6dfb\u52a0&#8230;.<\/h3>\n<p>  cat \/usr\/lib\/systemd\/system\/shadowsocks-libev.service<br \/>  ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<\/p>\n<p>  \u53d8\u6210<br \/>  cat \/usr\/lib\/systemd\/system\/shadowsocks-libev.service<br \/>  #ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<br \/>  ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;<\/p>\n<p>  \u8bd5\u8fc7 \u7ed3\u679c\u4e0d\u5bf9\u5c31\u4e0a\u6765\u53d1\u5e16\u4e86 \u8bf7\u5927\u4f6c\u4eec\u8d50\u6559&#8230;<br \/>  sed -i &#8216;s\/ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS&quot;\/\/ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;\/g&#8217;\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>G.K.D<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 G.K.D \u4e8e 2021-7-19 22:24 \u7f16\u8f91 <\/p>\n<p> KDE \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-7-19 21:21<br \/>  sed -i &#8216;s\/^ExecStart*\/#ExecStart*\/g&#8217; test<br \/>  sed -i &#8216;\/^#ExecStart*\/a ExecStart=\/usr\/local\/bin\/ss- &#8230;<\/p>\n<p>  \u770b\u9519\u9700\u6c42\u4e86\uff0c\u697c\u4e0b\u6211\u53c8\u5199\u4e86\u6bb5\u65b0\u7684\u3002\u3002\u3002<\/p>\n<p>  \u6211\u521a\u624d\u6d4b\u8bd5\u4e86\u4e0b\uff0c\u7ed9\u4f60\u5199\u4e86\u6761\u547d\u4ee4\uff0c\u5176\u5b9e\u4e5f\u53ef\u4ee5\u5408\u8d77\u6765~<\/p>\n<p>  \u7528\u6765\u6d4b\u8bd5\u7684\u6587\u4ef6\u5185\u5bb9\uff1acat 1.txt<\/p>\n<p>  ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<br \/>  2<br \/>  3<br \/>  \u5148\u628a\u7b2c\u4e00\u884c\u884c\u9996\u63d2\u5165 # \u6587\u672c\uff0c\u7136\u540e\u518d\u5411\u7b2c\u4e00\u884c\u540e\u9762\u63d2\u5165\u65b0\u6587\u672c\uff0c\u7ed3\u679c\u662f\uff1ased -i &#8216;1 s\/^\/#\/;1 aExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;&#8217; 1.txt<\/p>\n<p>  #ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<br \/>  ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;<br \/>  2<br \/>  3<br \/>  \u4f60\u628a\u4e0a\u9762\u4ee3\u7801\u91cc\u7684 1.txt \u6539\u6210\u4f60\u81ea\u5df1\u7684\u6587\u4ef6\u540d\u5373\u53ef\u3002<\/p>\n<p>  \u987a\u4fbf\u5e2e\u4f60\u8bb2\u89e3\u4e00\u4e0b\u547d\u4ee4\u5427\uff1ased \uff1a\u4e0d\u7528\u89e3\u91ca\u4e86\u5427<br \/>  -i \uff1a\u4fee\u6539\u6a21\u5f0f\uff0c\u4e0d\u52a0\u8fd9\u4e2a\u5c31\u53ea\u662f\u8f93\u51fa\u9884\u89c8\u7ed3\u679c\uff0c\u4e0d\u4f1a\u5199\u5165\u4fee\u6539\u6587\u4ef6<br \/>  &#8216;1 \uff1a\u4ee3\u8868\u7b2c\u4e00\u884c<br \/>  s\/^\/#\/ \uff1a\u628a\u884c\u9996 ^ \u66ff\u6362\u4e3a #\uff08\u5982\u679c\u662f\u884c\u5c3e\u90a3\u5c31\u662f $ \u7b26\u53f7\uff0c\u56e0\u4e3a\u5c31\u4e00\u4e2a\u6240\u4ee5\u6ca1\u5fc5\u8981\u591a\u6b64\u4e00\u4e3e\u52a0\u4e0a g\uff09<br \/>  ; \uff1a\u5206\u5f00\u4e24\u4e2a sed \u547d\u4ee4<br \/>  1 \uff1a\u4ee3\u8868\u7b2c\u4e00\u884c<br \/>  aExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;&#8217; \uff1a a \u4ee3\u8868\u5411\u8be5\u884c\u540e\u9762\u63d2\u5165\uff08i \u5219\u4ee3\u8868\u5411\u8be5\u884c\u524d\u9762\u63d2\u5165\uff09\uff0c \u540e\u9762\u7684\u5c31\u662f\u63d2\u5165\u5185\u5bb9<br \/>  1.txt \uff1a\u8fd9\u4e2a\u662f\u8bfb\u5165\u7684\u6587\u4ef6<\/p>\n<p>  \u300c\u81ea\u9009 IP\/\u4f18\u9009 IP\u300d\u6d4b\u8bd5 Cloudflare \u5ef6\u8fdf\u548c\u901f\u5ea6\uff0c\u83b7\u53d6\u6700\u5feb IPv4\/IPv6~<br \/>  https:\/\/github.com\/XIU2\/CloudflareSpeedTest\uff08\u2b502k\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>G.K.D<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 G.K.D \u4e8e 2021-7-19 22:04 \u7f16\u8f91 <\/p>\n<p> KDE \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-7-19 21:39<br \/>  \u5927\u4f6c\u725b\u903c&#8230;.<\/p>\n<p>  \u53e6\u5916\u5927\u4f6c\u8bf7\u95ee\u4e0b,\u6709\u4ec0\u4e48\u529e\u6cd5\u53ef\u4ee5\u641e\u81ea\u52a8\u5316\u5417?\u6015\u540e\u671f\u884c\u6570\u4f1a\u6539\u53d8&#8230;<\/p>\n<p>  \u6bd4\u8f83\u5c34\u5c2c\uff0c\u770b\u9519\u4e86~<\/p>\n<p>  \u539f\u6587\u4ef6\uff1acat 1.txt<\/p>\n<p>  1<br \/>  2<br \/>  ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<br \/>  3<br \/>  4\u52a0\u4e0a # \u53f7\uff1a<br \/>  sed -i &#8216;s\/^ExecStart=\/#ExecStart=\/g&#8217; 1.txt<\/p>\n<p>  1<br \/>  2<br \/>  #ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<br \/>  3<br \/>  4\u5728\u4e0b\u4e00\u884c\u63d2\u5165\u65b0\u6587\u672c\uff1a<br \/>  sed -i &#8216;\/^#ExecStart=\/a ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;&#8217; 1.txt<\/p>\n<p>  1<br \/>  2<br \/>  #ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<br \/>  ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;<br \/>  3<br \/>  4\u5f53\u7136\u4ed6\u4eec\u4f9d\u7136\u53ef\u4ee5\u7ec4\u5408\u6210\u4e00\u6761\u547d\u4ee4~<br \/>  sed -i &#8216;s\/^ExecStart=\/#ExecStart=\/g;\/^#ExecStart=\/a ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;&#8217; 1.txt<\/p>\n<p>  1<br \/>  2<br \/>  #ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot; $DAEMON_ARGS<br \/>  ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;<br \/>  3<br \/>  4\u8bb0\u5f97\u66ff\u6362\u793a\u4f8b\u4ee3\u7801\u547d\u4ee4\u4e2d\u7684 1.txt<\/p>\n<p>  \u300c\u81ea\u9009 IP\/\u4f18\u9009 IP\u300d\u6d4b\u8bd5 Cloudflare \u5ef6\u8fdf\u548c\u901f\u5ea6\uff0c\u83b7\u53d6\u6700\u5feb IPv4\/IPv6~<br \/>  https:\/\/github.com\/XIU2\/CloudflareSpeedTest\uff08\u2b502k\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h20<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tmjj\u7684\u601d\u7ef4\u90fd\u83ab\u540d\u5176\u5999\u7684\uff0c\u80fd\u6267\u884c\u4e24\u6b21\u65b9\u4fbf\u641e\u5b9a\u7684\u4e8b\u975e\u5f97\u8981\u4e00\u6b21\u641e\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>G.K.D<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 G.K.D \u4e8e 2021-7-19 21:35 \u7f16\u8f91 <\/p>\n<p> \u5982\u679c\u662f\u65b0\u624b\u7684\u8bdd\uff0c\u6ca1\u5fc5\u8981\u8ffd\u6c42\u5199\u6210\u4e00\u884c\u547d\u4ee4\u3002<br \/>  \u53ef\u4ee5\u5206\u5f00\u4e3a\u4e24\u4e2a\u547d\u4ee4\uff08\u4e00\u4e2a\u662f\u5728\u9996\u884c\u524d\u9762\u52a0\u4e0a # \uff0c\u4e00\u4e2a\u662f\u65b0\u6587\u672c\u63d2\u5165\u7b2c\u4e8c\u884c~\uff09\uff0c\u8fd9\u6837\u66f4\u65b9\u4fbf\u7406\u89e3\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>KDE<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tG.K.D \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-7-19 21:17<br \/>  \u4f60\u6ca1\u5fc5\u8981\u5199\u6210\u4e00\u884c\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u5206\u5f00\u4e3a\u4e24\u4e2a\u547d\u4ee4\uff0c\u4e00\u4e2a\u662f\u5728\u9996\u884c\u524d\u9762\u52a0\u4e0a # \uff0c\u4e00\u4e2a\u662f\u65b0\u6587\u672c\u63d2\u5165\u7b2c\u4e8c\u884c~ &#8230;<\/p>\n<p> sed -i &#8216;s\/^ExecStart*\/#ExecStart*\/g&#8217; test<br \/>  sed -i &#8216;\/^#ExecStart*\/a ExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;&#8217; test<\/p>\n<p>  \u8bd5\u4e86\u4e0a\u9762\u4e24\u4e2a,\u53ef\u4ee5\u4e86,\u4f46\u662f\u60f3\u77e5\u9053\u8fd8\u6709\u6ca1\u4f18\u5316\u7a7a\u95f4\u554a???\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>llyang<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u770b\u8d77\u6765\u8fd9\u884c\u6709\u95ee\u9898<br \/>  sed -i &#8216;s\/^ExecStart*\/#ExecStart*\/g&#8217; test<\/p>\n<p>  \u9700\u8981\u5199\u5168\uff0c\u9700\u8981 \/c<br \/>  \u53e6\u5916\u3002\/g\u6ca1\u6709\u5fc5\u8981<\/p>\n<p>  \u6ca1\u6709\u6d4b\u8bd5\uff0c\u6211\u662f\u5f20\u5634\u5c31\u6765;P\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>KDE<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 KDE \u4e8e 2021-7-19 21:48 \u7f16\u8f91 <\/p>\n<p> G.K.D \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-7-19 21:25<br \/>  \u6211\u521a\u624d\u6d4b\u8bd5\u4e86\u4e0b\uff0c\u7ed9\u4f60\u5199\u4e86\u6761\u547d\u4ee4\uff0c\u5176\u5b9e\u4e5f\u53ef\u4ee5\u5408\u8d77\u6765~<\/p>\n<p>  \u7528\u6765\u6d4b\u8bd5\u7684\u6587\u4ef6\u5185\u5bb9\uff1a<\/p>\n<p>  \u5927\u4f6c\u725b\u903c&#8230;.<\/p>\n<p>  \u53e6\u5916\u5927\u4f6c\u8bf7\u95ee\u4e0b,\u6709\u4ec0\u4e48\u529e\u6cd5\u53ef\u4ee5\u641e\u81ea\u52a8\u5316\u5417?\u6015\u540e\u671f\u884c\u6570\u4f1a\u6539\u53d8&#8230;<\/p>\n<p>  wget &#8211;no-check-certificate -O \/usr\/lib\/systemd\/system\/shadowsocks-libev.service https:\/\/raw.githubusercontent.com\/shadowsocks\/shadowsocks-libev\/master\/rpm\/SOURCES\/systemd\/shadowsocks-libev.service<br \/>  sed -i &#8217;22 s\/^\/#\/;22 aExecStart=\/usr\/local\/bin\/ss-server -c &quot;$CONFFILE&quot;&#8217; \/usr\/lib\/systemd\/system\/shadowsocks-libev.service<\/p>\n<p>  \t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>KDE \u5927\u4f6c\u6709\u8bdd\u8bf4 : sed \u884c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/518347"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=518347"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/518347\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=518347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=518347"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=518347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}