[v1.11.0] docs: Update `expr.md` 更正文本 (#406) 6acbdf644d

This commit is contained in:
github-actions[bot] 2022-08-25 09:40:24 +00:00
parent b7fe9b5530
commit b966f8d45e
586 changed files with 10786 additions and 10786 deletions

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,7z,拥有极高压缩比的开源压缩软件。用 7-Zip 解压过zip、iso、7z压缩文件。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,7z,拥有极高压缩比的开源压缩软件。用 7-Zip 解压过zip、iso、7z压缩文件。">
<title>7z 命令Linux 7z 命令详解:拥有极高压缩比的开源压缩软件。用 7-Zip 解压过zip、iso、7z压缩文件。 - Linux 命令搜索引擎</title> <title>7z 命令Linux 7z 命令详解:拥有极高压缩比的开源压缩软件。用 7-Zip 解压过zip、iso、7z压缩文件。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727424"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401314">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -120,7 +120,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>在 Linux 中输入以下命令安装 7-Zip。</p> <p>在 Linux 中输入以下命令安装 7-Zip。</p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># Ubuntu 系统</span> <pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># Ubuntu 系统</span>
</span><span class="code-line line-number" line="2"><span class="token function">apt-get</span> update </span><span class="code-line line-number" line="2"><span class="token function">apt-get</span> update
</span><span class="code-line line-number" line="3"><span class="token function">apt-get</span> <span class="token function">install</span> p7zip-full -y </span><span class="code-line line-number" line="3"><span class="token function">apt-get</span> <span class="token function">install</span> p7zip-full <span class="token parameter variable">-y</span>
</span></code><div onclick="copied(this)" data-code="# Ubuntu 系统 </span></code><div onclick="copied(this)" data-code="# Ubuntu 系统
apt-get update apt-get update
apt-get install p7zip-full -y apt-get install p7zip-full -y
@ -133,12 +133,12 @@ apt-get install p7zip-full -y
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>2、将压缩文件 text.7z 在指定目录(/home/text)下解压缩。</p> <p>2、将压缩文件 text.7z 在指定目录(/home/text)下解压缩。</p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 注意 -o 用来指定解压缩文件存放目录,-o 后是没有空格的,直接接目录</span> <pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 注意 -o 用来指定解压缩文件存放目录,-o 后是没有空格的,直接接目录</span>
</span><span class="code-line line-number" line="2">7z x text.7z -r -o/home/text </span><span class="code-line line-number" line="2">7z x text.7z <span class="token parameter variable">-r</span> -o/home/text
</span></code><div onclick="copied(this)" data-code="# 注意 -o 用来指定解压缩文件存放目录-o 后是没有空格的,直接接目录 </span></code><div onclick="copied(this)" data-code="# 注意 -o 用来指定解压缩文件存放目录-o 后是没有空格的,直接接目录
7z x text.7z -r -o/home/text 7z x text.7z -r -o/home/text
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>3、将文件 /home/text 压缩成 text.7z。</p> <p>3、将文件 /home/text 压缩成 text.7z。</p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">7z a text.7z -r /home/text <pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">7z a text.7z <span class="token parameter variable">-r</span> /home/text
</span></code><div onclick="copied(this)" data-code="7z a text.7z -r /home/text </span></code><div onclick="copied(this)" data-code="7z a text.7z -r /home/text
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>4、查看压缩包 text.7z 内容,但不解压。</p> <p>4、查看压缩包 text.7z 内容,但不解压。</p>
@ -147,7 +147,7 @@ apt-get install p7zip-full -y
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h2 id="官网"><a class="anchor" aria-hidden="true" tabindex="-1" href="#官网"><span class="octicon octicon-link"></span></a>官网</h2> <h2 id="官网"><a class="anchor" aria-hidden="true" tabindex="-1" href="#官网"><span class="octicon octicon-link"></span></a>官网</h2>
<p>更多安装使用方法可以访问官网学习:<a href="https://www.7-zip.org/">https://www.7-zip.org/</a></p> <p>更多安装使用方法可以访问官网学习:<a href="https://www.7-zip.org/">https://www.7-zip.org/</a></p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -160,31 +160,31 @@ apt-get install p7zip-full -y
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -218,7 +218,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727425"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401315"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727425"></script> <script type="text/javascript" src="../js/index.js?v=1661420401315"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,ab,Apache服务器的性能测试工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,ab,Apache服务器的性能测试工具">
<title>ab 命令Linux ab 命令详解Apache服务器的性能测试工具 - Linux 命令搜索引擎</title> <title>ab 命令Linux ab 命令详解Apache服务器的性能测试工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727399"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401293">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -118,12 +118,12 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h2 id="补充说明"><a class="anchor" aria-hidden="true" tabindex="-1" href="#补充说明"><span class="octicon octicon-link"></span></a>补充说明</h2> <h2 id="补充说明"><a class="anchor" aria-hidden="true" tabindex="-1" href="#补充说明"><span class="octicon octicon-link"></span></a>补充说明</h2>
<p><strong>ab命令</strong> 是一个测试你 Apache http 服务器的工具,你可以通过这个工具,指定一个单位时间内向 apache 发出的请求数量来看看你的 Apache 和机器配合的性能如何。</p> <p><strong>ab命令</strong> 是一个测试你 Apache http 服务器的工具,你可以通过这个工具,指定一个单位时间内向 apache 发出的请求数量来看看你的 Apache 和机器配合的性能如何。</p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ab <span class="token punctuation">[</span> -A auth-username:password <span class="token punctuation">]</span> <span class="token punctuation">[</span> -c concurrency <span class="token punctuation">]</span> <span class="token punctuation">[</span> -C cookie-name<span class="token operator">=</span>value <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ab <span class="token punctuation">[</span> <span class="token parameter variable">-A</span> auth-username:password <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-c</span> concurrency <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-C</span> cookie-name<span class="token operator">=</span>value
</span><span class="code-line line-number" line="2"><span class="token punctuation">]</span> <span class="token punctuation">[</span> -d <span class="token punctuation">]</span> <span class="token punctuation">[</span> -e csv-file <span class="token punctuation">]</span> <span class="token punctuation">[</span> -g gnuplot-file <span class="token punctuation">]</span> <span class="token punctuation">[</span> -h <span class="token punctuation">]</span> <span class="token punctuation">[</span> -H custom-header <span class="token punctuation">]</span> <span class="token punctuation">[</span> </span><span class="code-line line-number" line="2"><span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-d</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-e</span> csv-file <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-g</span> gnuplot-file <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-h</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-H</span> custom-header <span class="token punctuation">]</span> <span class="token punctuation">[</span>
</span><span class="code-line line-number" line="3">-i <span class="token punctuation">]</span> <span class="token punctuation">[</span> -k <span class="token punctuation">]</span> <span class="token punctuation">[</span> -n requests <span class="token punctuation">]</span> <span class="token punctuation">[</span> -p POST-file <span class="token punctuation">]</span> <span class="token punctuation">[</span> -P proxy-auth-user </span><span class="code-line line-number" line="3"><span class="token parameter variable">-i</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-k</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-n</span> requests <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-p</span> POST-file <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-P</span> proxy-auth-user
</span><span class="code-line line-number" line="4">name:password <span class="token punctuation">]</span> <span class="token punctuation">[</span> -q <span class="token punctuation">]</span> <span class="token punctuation">[</span> -s <span class="token punctuation">]</span> <span class="token punctuation">[</span> -S <span class="token punctuation">]</span> <span class="token punctuation">[</span> -t timelimit <span class="token punctuation">]</span> <span class="token punctuation">[</span> -T content-type <span class="token punctuation">]</span> </span><span class="code-line line-number" line="4">name:password <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-q</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-s</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-S</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-t</span> timelimit <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-T</span> content-type <span class="token punctuation">]</span>
</span><span class="code-line line-number" line="5"><span class="token punctuation">[</span> -v verbosity<span class="token punctuation">]</span> <span class="token punctuation">[</span> -V <span class="token punctuation">]</span> <span class="token punctuation">[</span> -w <span class="token punctuation">]</span> <span class="token punctuation">[</span> -x <span class="token operator">&#x3C;</span>table<span class="token operator">></span>-attributes <span class="token punctuation">]</span> <span class="token punctuation">[</span> -X proxy<span class="token punctuation">[</span>:port<span class="token punctuation">]</span> </span><span class="code-line line-number" line="5"><span class="token punctuation">[</span> <span class="token parameter variable">-v</span> verbosity<span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-V</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-w</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-x</span> <span class="token operator">&#x3C;</span>table<span class="token operator">></span>-attributes <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-X</span> proxy<span class="token punctuation">[</span>:port<span class="token punctuation">]</span>
</span><span class="code-line line-number" line="6"><span class="token punctuation">]</span> <span class="token punctuation">[</span> -y <span class="token operator">&#x3C;</span>tr<span class="token operator">></span>-attributes <span class="token punctuation">]</span> <span class="token punctuation">[</span> -z <span class="token operator">&#x3C;</span>td<span class="token operator">></span>-attributes <span class="token punctuation">]</span> <span class="token punctuation">[</span>http://<span class="token punctuation">]</span>host </span><span class="code-line line-number" line="6"><span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-y</span> <span class="token operator">&#x3C;</span>tr<span class="token operator">></span>-attributes <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token parameter variable">-z</span> <span class="token operator">&#x3C;</span>td<span class="token operator">></span>-attributes <span class="token punctuation">]</span> <span class="token punctuation">[</span>http://<span class="token punctuation">]</span>host
</span><span class="code-line line-number" line="7">name<span class="token punctuation">[</span>:port<span class="token punctuation">]</span>/path </span><span class="code-line line-number" line="7">name<span class="token punctuation">[</span>:port<span class="token punctuation">]</span>/path
</span></code><div onclick="copied(this)" data-code="ab [ -A auth-username:password ] [ -c concurrency ] [ -C cookie-name=value </span></code><div onclick="copied(this)" data-code="ab [ -A auth-username:password ] [ -c concurrency ] [ -C cookie-name=value
] [ -d ] [ -e csv-file ] [ -g gnuplot-file ] [ -h ] [ -H custom-header ] [ ] [ -d ] [ -e csv-file ] [ -g gnuplot-file ] [ -h ] [ -H custom-header ] [
@ -134,95 +134,95 @@ name:password ] [ -q ] [ -s ] [ -S ] [ -t timelimit ] [ -T content-type ]
name[:port]/path name[:port]/path
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-A auth-username:password <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-A</span> auth-username:password
</span><span class="code-line line-number" line="2"> <span class="token comment"># 支持基本的验证证书,用户名和密码之间使用"冒号" :</span> </span><span class="code-line line-number" line="2"> <span class="token comment"># 支持基本的验证证书,用户名和密码之间使用"冒号" :</span>
</span><span class="code-line line-number" line="3"> <span class="token comment"># 分隔开,ab将以明文方式传送过去.不管服务器是不是需要</span> </span><span class="code-line line-number" line="3"> <span class="token comment"># 分隔开,ab将以明文方式传送过去.不管服务器是不是需要</span>
</span><span class="code-line line-number" line="4"> <span class="token comment"># ,也就是说你的服务器需要支持401认证.</span> </span><span class="code-line line-number" line="4"> <span class="token comment"># ,也就是说你的服务器需要支持401认证.</span>
</span><span class="code-line line-number" line="5"> </span><span class="code-line line-number" line="5">
</span><span class="code-line line-number" line="6">-c concurrency </span><span class="code-line line-number" line="6"><span class="token parameter variable">-c</span> concurrency
</span><span class="code-line line-number" line="7"> <span class="token comment"># 同时向服务器端发送的请求数目,默认状态下是一次 只执行一个http请求.</span> </span><span class="code-line line-number" line="7"> <span class="token comment"># 同时向服务器端发送的请求数目,默认状态下是一次 只执行一个http请求.</span>
</span><span class="code-line line-number" line="8"> </span><span class="code-line line-number" line="8">
</span><span class="code-line line-number" line="9">-C cookie-name<span class="token operator">=</span>value </span><span class="code-line line-number" line="9"><span class="token parameter variable">-C</span> cookie-name<span class="token operator">=</span>value
</span><span class="code-line line-number" line="10"> <span class="token comment"># Add a Cookie: line to the request. The argument is typically in the</span> </span><span class="code-line line-number" line="10"> <span class="token comment"># Add a Cookie: line to the request. The argument is typically in the</span>
</span><span class="code-line line-number" line="11"> <span class="token comment"># form of a name=value pair. This field is repeatable.</span> </span><span class="code-line line-number" line="11"> <span class="token comment"># form of a name=value pair. This field is repeatable.</span>
</span><span class="code-line line-number" line="12"> </span><span class="code-line line-number" line="12">
</span><span class="code-line line-number" line="13">-d <span class="token comment"># Do not display the "percentage served within XX [ms] table".</span> </span><span class="code-line line-number" line="13"><span class="token parameter variable">-d</span> <span class="token comment"># Do not display the "percentage served within XX [ms] table".</span>
</span><span class="code-line line-number" line="14"> <span class="token comment"># (legacy support).</span> </span><span class="code-line line-number" line="14"> <span class="token comment"># (legacy support).</span>
</span><span class="code-line line-number" line="15"> </span><span class="code-line line-number" line="15">
</span><span class="code-line line-number" line="16">-e csv-file </span><span class="code-line line-number" line="16"><span class="token parameter variable">-e</span> csv-file
</span><span class="code-line line-number" line="17"> <span class="token comment"># Write a Comma separated value (CSV) file which contains for each</span> </span><span class="code-line line-number" line="17"> <span class="token comment"># Write a Comma separated value (CSV) file which contains for each</span>
</span><span class="code-line line-number" line="18"> <span class="token comment"># percentage (from 1% to 100%) the time (in milli seconds) it took to</span> </span><span class="code-line line-number" line="18"> <span class="token comment"># percentage (from 1% to 100%) the time (in milli seconds) it took to</span>
</span><span class="code-line line-number" line="19"> <span class="token comment"># serve that percentage of the requests. This is usually more useful</span> </span><span class="code-line line-number" line="19"> <span class="token comment"># serve that percentage of the requests. This is usually more useful</span>
</span><span class="code-line line-number" line="20"> <span class="token comment"># than the 'gnuplot' file; as the results are already 'binned'.</span> </span><span class="code-line line-number" line="20"> <span class="token comment"># than the 'gnuplot' file; as the results are already 'binned'.</span>
</span><span class="code-line line-number" line="21"> </span><span class="code-line line-number" line="21">
</span><span class="code-line line-number" line="22">-g gnuplot-file </span><span class="code-line line-number" line="22"><span class="token parameter variable">-g</span> gnuplot-file
</span><span class="code-line line-number" line="23"> <span class="token comment"># Write all measured values out as a 'gnuplot' or TSV (Tab separate</span> </span><span class="code-line line-number" line="23"> <span class="token comment"># Write all measured values out as a 'gnuplot' or TSV (Tab separate</span>
</span><span class="code-line line-number" line="24"> <span class="token comment"># values) file. This file can easily be imported into packages like</span> </span><span class="code-line line-number" line="24"> <span class="token comment"># values) file. This file can easily be imported into packages like</span>
</span><span class="code-line line-number" line="25"> <span class="token comment"># Gnuplot, IDL, Mathematica, Igor or even Excell. The labels are on</span> </span><span class="code-line line-number" line="25"> <span class="token comment"># Gnuplot, IDL, Mathematica, Igor or even Excell. The labels are on</span>
</span><span class="code-line line-number" line="26"> <span class="token comment"># the first line of the file.</span> </span><span class="code-line line-number" line="26"> <span class="token comment"># the first line of the file.</span>
</span><span class="code-line line-number" line="27">-h <span class="token comment"># 显示使用说明</span> </span><span class="code-line line-number" line="27"><span class="token parameter variable">-h</span> <span class="token comment"># 显示使用说明</span>
</span><span class="code-line line-number" line="28">-H custom-header </span><span class="code-line line-number" line="28"><span class="token parameter variable">-H</span> custom-header
</span><span class="code-line line-number" line="29"> <span class="token comment"># 向请求包追加附加的标题字串.此参数应该是有效的标题 行(header</span> </span><span class="code-line line-number" line="29"> <span class="token comment"># 向请求包追加附加的标题字串.此参数应该是有效的标题 行(header</span>
</span><span class="code-line line-number" line="30"> <span class="token comment"># line)形式,通常使用冒号":"来分隔有效配对 (valid pair)例如 'Accept-</span> </span><span class="code-line line-number" line="30"> <span class="token comment"># line)形式,通常使用冒号":"来分隔有效配对 (valid pair)例如 'Accept-</span>
</span><span class="code-line line-number" line="31"> <span class="token comment"># Encoding: zip/zop;8 bit';</span> </span><span class="code-line line-number" line="31"> <span class="token comment"># Encoding: zip/zop;8 bit';</span>
</span><span class="code-line line-number" line="32"> </span><span class="code-line line-number" line="32">
</span><span class="code-line line-number" line="33">-i <span class="token comment"># 使用一个 http 头(HEAD) 来替换 GET方法.不可以掺入POST 方法</span> </span><span class="code-line line-number" line="33"><span class="token parameter variable">-i</span> <span class="token comment"># 使用一个 http 头(HEAD) 来替换 GET方法.不可以掺入POST 方法</span>
</span><span class="code-line line-number" line="34"> </span><span class="code-line line-number" line="34">
</span><span class="code-line line-number" line="35">-k <span class="token comment"># 允许http KeepAlive ;也就是说执行多个请求在一个 http</span> </span><span class="code-line line-number" line="35"><span class="token parameter variable">-k</span> <span class="token comment"># 允许http KeepAlive ;也就是说执行多个请求在一个 http</span>
</span><span class="code-line line-number" line="36"> <span class="token comment"># 会话当中默认是不允许的也就是no KeepAlive啦;)</span> </span><span class="code-line line-number" line="36"> <span class="token comment"># 会话当中默认是不允许的也就是no KeepAlive啦;)</span>
</span><span class="code-line line-number" line="37"> </span><span class="code-line line-number" line="37">
</span><span class="code-line line-number" line="38">-n requests </span><span class="code-line line-number" line="38"><span class="token parameter variable">-n</span> requests
</span><span class="code-line line-number" line="39"> <span class="token comment"># 执行一次测试会话的时候所发出的请求数目,默认是执行一个单一的请求</span> </span><span class="code-line line-number" line="39"> <span class="token comment"># 执行一次测试会话的时候所发出的请求数目,默认是执行一个单一的请求</span>
</span><span class="code-line line-number" line="40"> <span class="token comment"># 当然了这样的测试结果也就没什么意义了</span> </span><span class="code-line line-number" line="40"> <span class="token comment"># 当然了这样的测试结果也就没什么意义了</span>
</span><span class="code-line line-number" line="41"> </span><span class="code-line line-number" line="41">
</span><span class="code-line line-number" line="42">-p POST-file </span><span class="code-line line-number" line="42"><span class="token parameter variable">-p</span> POST-file
</span><span class="code-line line-number" line="43"> <span class="token comment"># 测试程序也就是ab,将向Apache server发送带有HTTP POST 的请求.</span> </span><span class="code-line line-number" line="43"> <span class="token comment"># 测试程序也就是ab,将向Apache server发送带有HTTP POST 的请求.</span>
</span><span class="code-line line-number" line="44"> </span><span class="code-line line-number" line="44">
</span><span class="code-line line-number" line="45">-P proxy-auth-username:password </span><span class="code-line line-number" line="45"><span class="token parameter variable">-P</span> proxy-auth-username:password
</span><span class="code-line line-number" line="46"> <span class="token comment"># 当需要通过代理测试一台 HTTP 服务器的时候而你的代理</span> </span><span class="code-line line-number" line="46"> <span class="token comment"># 当需要通过代理测试一台 HTTP 服务器的时候而你的代理</span>
</span><span class="code-line line-number" line="47"> <span class="token comment"># 又需要用户名密码验证,这时你可以使用这个选项,同样</span> </span><span class="code-line line-number" line="47"> <span class="token comment"># 又需要用户名密码验证,这时你可以使用这个选项,同样</span>
</span><span class="code-line line-number" line="48"> <span class="token comment"># 用户名与密码之间使用冒号":"分隔开,ab将之以明文的方式</span> </span><span class="code-line line-number" line="48"> <span class="token comment"># 用户名与密码之间使用冒号":"分隔开,ab将之以明文的方式</span>
</span><span class="code-line line-number" line="49"> <span class="token comment"># 发送出去,当然,前提是你的代理是处于407认证状态的</span> </span><span class="code-line line-number" line="49"> <span class="token comment"># 发送出去,当然,前提是你的代理是处于407认证状态的</span>
</span><span class="code-line line-number" line="50"> </span><span class="code-line line-number" line="50">
</span><span class="code-line line-number" line="51">-q <span class="token comment"># When processing more than 150 requests, ab outputs a progress count</span> </span><span class="code-line line-number" line="51"><span class="token parameter variable">-q</span> <span class="token comment"># When processing more than 150 requests, ab outputs a progress count</span>
</span><span class="code-line line-number" line="52"> <span class="token comment"># on stderr every 10% or 100 requests or so. The -q flag will sup</span> </span><span class="code-line line-number" line="52"> <span class="token comment"># on stderr every 10% or 100 requests or so. The -q flag will sup</span>
</span><span class="code-line line-number" line="53"> <span class="token comment"># press these messages.</span> </span><span class="code-line line-number" line="53"> <span class="token comment"># press these messages.</span>
</span><span class="code-line line-number" line="54"> </span><span class="code-line line-number" line="54">
</span><span class="code-line line-number" line="55">-s <span class="token comment"># When compiled in (ab -h will show you) use the SSL protected https</span> </span><span class="code-line line-number" line="55"><span class="token parameter variable">-s</span> <span class="token comment"># When compiled in (ab -h will show you) use the SSL protected https</span>
</span><span class="code-line line-number" line="56"> <span class="token comment"># rather than the http protocol. This feature is experimental and</span> </span><span class="code-line line-number" line="56"> <span class="token comment"># rather than the http protocol. This feature is experimental and</span>
</span><span class="code-line line-number" line="57"> <span class="token comment"># very rudimentary. You probably do not want to use it.</span> </span><span class="code-line line-number" line="57"> <span class="token comment"># very rudimentary. You probably do not want to use it.</span>
</span><span class="code-line line-number" line="58"> </span><span class="code-line line-number" line="58">
</span><span class="code-line line-number" line="59">-S <span class="token comment"># Do not display the median and standard deviation values, nor dis</span> </span><span class="code-line line-number" line="59"><span class="token parameter variable">-S</span> <span class="token comment"># Do not display the median and standard deviation values, nor dis</span>
</span><span class="code-line line-number" line="60"> <span class="token comment"># play the warning/error messages when the average and median are</span> </span><span class="code-line line-number" line="60"> <span class="token comment"># play the warning/error messages when the average and median are</span>
</span><span class="code-line line-number" line="61"> <span class="token comment"># more than one or two times the standard deviation apart. And de</span> </span><span class="code-line line-number" line="61"> <span class="token comment"># more than one or two times the standard deviation apart. And de</span>
</span><span class="code-line line-number" line="62"> <span class="token comment"># fault to the min/avg/max values. (legacy support).</span> </span><span class="code-line line-number" line="62"> <span class="token comment"># fault to the min/avg/max values. (legacy support).</span>
</span><span class="code-line line-number" line="63"> </span><span class="code-line line-number" line="63">
</span><span class="code-line line-number" line="64">-t timelimit </span><span class="code-line line-number" line="64"><span class="token parameter variable">-t</span> timelimit
</span><span class="code-line line-number" line="65"> <span class="token comment"># 设置测试的时间的长短使用这个选项ab将自动设置</span> </span><span class="code-line line-number" line="65"> <span class="token comment"># 设置测试的时间的长短使用这个选项ab将自动设置</span>
</span><span class="code-line line-number" line="66"> <span class="token comment"># 测试请求会话数目为50000然后以你设置的时间为</span> </span><span class="code-line line-number" line="66"> <span class="token comment"># 测试请求会话数目为50000然后以你设置的时间为</span>
</span><span class="code-line line-number" line="67"> <span class="token comment"># 固定周期.默认状态下是没有时限的,也就是直到完成</span> </span><span class="code-line line-number" line="67"> <span class="token comment"># 固定周期.默认状态下是没有时限的,也就是直到完成</span>
</span><span class="code-line line-number" line="68"> <span class="token comment"># 你所设置的请求数目为止.</span> </span><span class="code-line line-number" line="68"> <span class="token comment"># 你所设置的请求数目为止.</span>
</span><span class="code-line line-number" line="69"> </span><span class="code-line line-number" line="69">
</span><span class="code-line line-number" line="70">-T content-type </span><span class="code-line line-number" line="70"><span class="token parameter variable">-T</span> content-type
</span><span class="code-line line-number" line="71"> <span class="token comment"># 内容类型标头,使用在POST数据的时候.</span> </span><span class="code-line line-number" line="71"> <span class="token comment"># 内容类型标头,使用在POST数据的时候.</span>
</span><span class="code-line line-number" line="72"> </span><span class="code-line line-number" line="72">
</span><span class="code-line line-number" line="73">-v verbosity </span><span class="code-line line-number" line="73"><span class="token parameter variable">-v</span> verbosity
</span><span class="code-line line-number" line="74"> <span class="token comment"># 设置冗余级别,4级打印出每个请求标头的详细信息,</span> </span><span class="code-line line-number" line="74"> <span class="token comment"># 设置冗余级别,4级打印出每个请求标头的详细信息,</span>
</span><span class="code-line line-number" line="75"> <span class="token comment"># 3级打印出回应代码(例如,404,200),2级打印出警告 信息和指示消息</span> </span><span class="code-line line-number" line="75"> <span class="token comment"># 3级打印出回应代码(例如,404,200),2级打印出警告 信息和指示消息</span>
</span><span class="code-line line-number" line="76"> </span><span class="code-line line-number" line="76">
</span><span class="code-line line-number" line="77">-V <span class="token comment"># 显示版本号并且退出</span> </span><span class="code-line line-number" line="77"><span class="token parameter variable">-V</span> <span class="token comment"># 显示版本号并且退出</span>
</span><span class="code-line line-number" line="78">-w <span class="token comment"># 打印输出结果到HTML表中. 默认的表是两列n行白底黑框</span> </span><span class="code-line line-number" line="78"><span class="token parameter variable">-w</span> <span class="token comment"># 打印输出结果到HTML表中. 默认的表是两列n行白底黑框</span>
</span><span class="code-line line-number" line="79"> </span><span class="code-line line-number" line="79">
</span><span class="code-line line-number" line="80">-x <span class="token operator">&#x3C;</span>table<span class="token operator">></span>-attributes </span><span class="code-line line-number" line="80"><span class="token parameter variable">-x</span> <span class="token operator">&#x3C;</span>table<span class="token operator">></span>-attributes
</span><span class="code-line line-number" line="81"> <span class="token comment"># 使用字串来描述表的属性,该属性字串应该插入到&#x3C;table 这里 ></span> </span><span class="code-line line-number" line="81"> <span class="token comment"># 使用字串来描述表的属性,该属性字串应该插入到&#x3C;table 这里 ></span>
</span><span class="code-line line-number" line="82"> </span><span class="code-line line-number" line="82">
</span><span class="code-line line-number" line="83">-X proxy<span class="token punctuation">[</span>:port<span class="token punctuation">]</span> </span><span class="code-line line-number" line="83"><span class="token parameter variable">-X</span> proxy<span class="token punctuation">[</span>:port<span class="token punctuation">]</span>
</span><span class="code-line line-number" line="84"> <span class="token comment"># Use a proxy server for the requests.</span> </span><span class="code-line line-number" line="84"> <span class="token comment"># Use a proxy server for the requests.</span>
</span><span class="code-line line-number" line="85"> </span><span class="code-line line-number" line="85">
</span><span class="code-line line-number" line="86">-y <span class="token operator">&#x3C;</span>tr<span class="token operator">></span>-attributes </span><span class="code-line line-number" line="86"><span class="token parameter variable">-y</span> <span class="token operator">&#x3C;</span>tr<span class="token operator">></span>-attributes
</span><span class="code-line line-number" line="87"> <span class="token comment"># 用于生成html表格每行的属性名 (&#x3C;tr>)</span> </span><span class="code-line line-number" line="87"> <span class="token comment"># 用于生成html表格每行的属性名 (&#x3C;tr>)</span>
</span><span class="code-line line-number" line="88"> </span><span class="code-line line-number" line="88">
</span><span class="code-line line-number" line="89">-z <span class="token operator">&#x3C;</span>td<span class="token operator">></span>-attributes </span><span class="code-line line-number" line="89"><span class="token parameter variable">-z</span> <span class="token operator">&#x3C;</span>td<span class="token operator">></span>-attributes
</span><span class="code-line line-number" line="90"> <span class="token comment"># 用于生成html表格每列的属性名 (&#x3C;td>)</span> </span><span class="code-line line-number" line="90"> <span class="token comment"># 用于生成html表格每列的属性名 (&#x3C;td>)</span>
</span></code><div onclick="copied(this)" data-code="-A auth-username:password </span></code><div onclick="copied(this)" data-code="-A auth-username:password
# 支持基本的验证证书,用户名和密码之间使用&#x22;冒号&#x22; : # 支持基本的验证证书,用户名和密码之间使用&#x22;冒号&#x22; :
@ -317,7 +317,7 @@ name[:port]/path
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>主机:被测试主机。</p> <p>主机:被测试主机。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -330,31 +330,31 @@ name[:port]/path
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -388,7 +388,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727400"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401294"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727400"></script> <script type="text/javascript" src="../js/index.js?v=1661420401294"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,accept,指示打印系统接受发往指定目标打印机的打印任务"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,accept,指示打印系统接受发往指定目标打印机的打印任务">
<title>accept 命令Linux accept 命令详解:指示打印系统接受发往指定目标打印机的打印任务 - Linux 命令搜索引擎</title> <title>accept 命令Linux accept 命令详解:指示打印系统接受发往指定目标打印机的打印任务 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727437"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401324">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -131,7 +131,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>目标:指定目标打印机。</p> <p>目标:指定目标打印机。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -144,31 +144,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -202,7 +202,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727437"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401324"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727437"></script> <script type="text/javascript" src="../js/index.js?v=1661420401324"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,ack,比grep好用的文本搜索工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,ack,比grep好用的文本搜索工具">
<title>ack 命令Linux ack 命令详解比grep好用的文本搜索工具 - Linux 命令搜索引擎</title> <title>ack 命令Linux ack 命令详解比grep好用的文本搜索工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727475"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401414">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -147,9 +147,9 @@ apk install ack
<p>Searching 代码搜索<br>Search output 搜索结果处理<br>File presentation 文件展示<br>File finding 文件查找<br>File inclusion/exclusion 文件过滤</p> <p>Searching 代码搜索<br>Search output 搜索结果处理<br>File presentation 文件展示<br>File finding 文件查找<br>File inclusion/exclusion 文件过滤</p>
</blockquote> </blockquote>
<p>grep常用操作</p> <p>grep常用操作</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">grep</span> -r <span class="token string">'hello_world'</span> <span class="token comment"># 简单用法</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">grep</span> <span class="token parameter variable">-r</span> <span class="token string">'hello_world'</span> <span class="token comment"># 简单用法</span>
</span><span class="code-line line-number" line="2"><span class="token function">grep</span> <span class="token string">'^hello_world'</span> <span class="token builtin class-name">.</span> <span class="token comment"># 简单正则</span> </span><span class="code-line line-number" line="2"><span class="token function">grep</span> <span class="token string">'^hello_world'</span> <span class="token builtin class-name">.</span> <span class="token comment"># 简单正则</span>
</span><span class="code-line line-number" line="3"><span class="token function">ls</span> -l <span class="token operator">|</span> <span class="token function">grep</span> .py <span class="token comment"># 管道用法</span> </span><span class="code-line line-number" line="3"><span class="token function">ls</span> <span class="token parameter variable">-l</span> <span class="token operator">|</span> <span class="token function">grep</span> .py <span class="token comment"># 管道用法</span>
</span></code><div onclick="copied(this)" data-code="grep -r &#x27;hello_world&#x27; # 简单用法 </span></code><div onclick="copied(this)" data-code="grep -r &#x27;hello_world&#x27; # 简单用法
grep &#x27;^hello_world&#x27; . # 简单正则 grep &#x27;^hello_world&#x27; . # 简单正则
ls -l | grep .py # 管道用法 ls -l | grep .py # 管道用法
@ -169,35 +169,35 @@ ack-grep -Q &#x27;hello*&#x27;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="search-file"><a class="anchor" aria-hidden="true" tabindex="-1" href="#search-file"><span class="octicon octicon-link"></span></a>Search File</h3> <h3 id="search-file"><a class="anchor" aria-hidden="true" tabindex="-1" href="#search-file"><span class="octicon octicon-link"></span></a>Search File</h3>
<p>对搜索结果进行处理比如只显示一个文件的一个匹配项或者xxx</p> <p>对搜索结果进行处理比如只显示一个文件的一个匹配项或者xxx</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep --line<span class="token operator">=</span><span class="token number">1</span> <span class="token comment"># 输出所有文件第二行</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep <span class="token parameter variable">--line</span><span class="token operator">=</span><span class="token number">1</span> <span class="token comment"># 输出所有文件第二行</span>
</span><span class="code-line line-number" line="2">ack-grep -l <span class="token string">'hello'</span> <span class="token comment"># 包含的文件名</span> </span><span class="code-line line-number" line="2">ack-grep <span class="token parameter variable">-l</span> <span class="token string">'hello'</span> <span class="token comment"># 包含的文件名</span>
</span><span class="code-line line-number" line="3">ack-grep -L <span class="token string">'print'</span> <span class="token comment"># 非包含文件名</span> </span><span class="code-line line-number" line="3">ack-grep <span class="token parameter variable">-L</span> <span class="token string">'print'</span> <span class="token comment"># 非包含文件名</span>
</span></code><div onclick="copied(this)" data-code="ack-grep --line=1 # 输出所有文件第二行 </span></code><div onclick="copied(this)" data-code="ack-grep --line=1 # 输出所有文件第二行
ack-grep -l &#x27;hello&#x27; # 包含的文件名 ack-grep -l &#x27;hello&#x27; # 包含的文件名
ack-grep -L &#x27;print&#x27; # 非包含文件名 ack-grep -L &#x27;print&#x27; # 非包含文件名
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="file-presentation"><a class="anchor" aria-hidden="true" tabindex="-1" href="#file-presentation"><span class="octicon octicon-link"></span></a>File presentation</h3> <h3 id="file-presentation"><a class="anchor" aria-hidden="true" tabindex="-1" href="#file-presentation"><span class="octicon octicon-link"></span></a>File presentation</h3>
<p>输出的结果是以什么方式展示呢,这个部分有几个参数可以练习下</p> <p>输出的结果是以什么方式展示呢,这个部分有几个参数可以练习下</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep hello --pager<span class="token operator">=</span><span class="token string">'less -R'</span> <span class="token comment"># 以less形式展示</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep hello <span class="token parameter variable">--pager</span><span class="token operator">=</span><span class="token string">'less -R'</span> <span class="token comment"># 以less形式展示</span>
</span><span class="code-line line-number" line="2">ack-grep hello --noheading <span class="token comment"># 不在头上显示文件</span> </span><span class="code-line line-number" line="2">ack-grep hello <span class="token parameter variable">--noheading</span> <span class="token comment"># 不在头上显示文件</span>
</span><span class="code-line line-number" line="3">ack-grep hello --nocolor <span class="token comment"># 不对匹配字符着色</span> </span><span class="code-line line-number" line="3">ack-grep hello <span class="token parameter variable">--nocolor</span> <span class="token comment"># 不对匹配字符着色</span>
</span></code><div onclick="copied(this)" data-code="ack-grep hello --pager=&#x27;less -R&#x27; # 以less形式展示 </span></code><div onclick="copied(this)" data-code="ack-grep hello --pager=&#x27;less -R&#x27; # 以less形式展示
ack-grep hello --noheading # 不在头上显示文件 ack-grep hello --noheading # 不在头上显示文件
ack-grep hello --nocolor # 不对匹配字符着色 ack-grep hello --nocolor # 不对匹配字符着色
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="file-finding"><a class="anchor" aria-hidden="true" tabindex="-1" href="#file-finding"><span class="octicon octicon-link"></span></a>File finding</h3> <h3 id="file-finding"><a class="anchor" aria-hidden="true" tabindex="-1" href="#file-finding"><span class="octicon octicon-link"></span></a>File finding</h3>
<p>没错它可以查找文件以省去你要不断的结合find和grep的麻烦虽然在linux的思想是一个工具做好一件事。</p> <p>没错它可以查找文件以省去你要不断的结合find和grep的麻烦虽然在linux的思想是一个工具做好一件事。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep -f hello.py <span class="token comment"># 查找全匹配文件</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep <span class="token parameter variable">-f</span> hello.py <span class="token comment"># 查找全匹配文件</span>
</span><span class="code-line line-number" line="2">ack-grep -g hello.py$ <span class="token comment"># 查找正则匹配文件</span> </span><span class="code-line line-number" line="2">ack-grep <span class="token parameter variable">-g</span> hello.py$ <span class="token comment"># 查找正则匹配文件</span>
</span><span class="code-line line-number" line="3">ack-grep -g hello --sort-files <span class="token comment"># 查找然后排序</span> </span><span class="code-line line-number" line="3">ack-grep <span class="token parameter variable">-g</span> hello --sort-files <span class="token comment"># 查找然后排序</span>
</span></code><div onclick="copied(this)" data-code="ack-grep -f hello.py # 查找全匹配文件 </span></code><div onclick="copied(this)" data-code="ack-grep -f hello.py # 查找全匹配文件
ack-grep -g hello.py$ # 查找正则匹配文件 ack-grep -g hello.py$ # 查找正则匹配文件
ack-grep -g hello --sort-files # 查找然后排序 ack-grep -g hello --sort-files # 查找然后排序
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="file-inclusionexclusion"><a class="anchor" aria-hidden="true" tabindex="-1" href="#file-inclusionexclusion"><span class="octicon octicon-link"></span></a>File Inclusion/Exclusion</h3> <h3 id="file-inclusionexclusion"><a class="anchor" aria-hidden="true" tabindex="-1" href="#file-inclusionexclusion"><span class="octicon octicon-link"></span></a>File Inclusion/Exclusion</h3>
<p>文件过滤,个人觉得这是一个很不错的功能。如果你曾经在搜索项目源码是不小心命中日志中的某个关键字的话,你会觉得这个有用。</p> <p>文件过滤,个人觉得这是一个很不错的功能。如果你曾经在搜索项目源码是不小心命中日志中的某个关键字的话,你会觉得这个有用。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep --python hello <span class="token comment"># 查找所有python文件</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ack-grep <span class="token parameter variable">--python</span> hello <span class="token comment"># 查找所有python文件</span>
</span><span class="code-line line-number" line="2">ack-grep -G hello.py$ hello <span class="token comment"># 查找匹配正则的文件</span> </span><span class="code-line line-number" line="2">ack-grep <span class="token parameter variable">-G</span> hello.py$ hello <span class="token comment"># 查找匹配正则的文件</span>
</span></code><div onclick="copied(this)" data-code="ack-grep --python hello # 查找所有python文件 </span></code><div onclick="copied(this)" data-code="ack-grep --python hello # 查找所有python文件
ack-grep -G hello.py$ hello # 查找匹配正则的文件 ack-grep -G hello.py$ hello # 查找匹配正则的文件
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
@ -205,7 +205,7 @@ ack-grep -G hello.py$ hello # 查找匹配正则的文件
<ul> <ul>
<li><a href="https://beyondgrep.com/">ack官网</a></li> <li><a href="https://beyondgrep.com/">ack官网</a></li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -218,31 +218,31 @@ ack-grep -G hello.py$ hello # 查找匹配正则的文件
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -276,7 +276,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727476"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401415"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727476"></script> <script type="text/javascript" src="../js/index.js?v=1661420401415"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,alias,定义或显示别名。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,alias,定义或显示别名。">
<title>alias 命令Linux alias 命令详解:定义或显示别名。 - Linux 命令搜索引擎</title> <title>alias 命令Linux alias 命令详解:定义或显示别名。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727532"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401375">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -140,7 +140,7 @@ value可选别名的值。
<h2 id="例子"><a class="anchor" aria-hidden="true" tabindex="-1" href="#例子"><span class="octicon octicon-link"></span></a>例子</h2> <h2 id="例子"><a class="anchor" aria-hidden="true" tabindex="-1" href="#例子"><span class="octicon octicon-link"></span></a>例子</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 显示全部已定义的别名</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 显示全部已定义的别名</span>
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">alias</span> </span><span class="code-line line-number" line="2"><span class="token builtin class-name">alias</span>
</span><span class="code-line line-number" line="3"><span class="token builtin class-name">alias</span> -p </span><span class="code-line line-number" line="3"><span class="token builtin class-name">alias</span> <span class="token parameter variable">-p</span>
</span><span class="code-line line-number" line="4"> </span><span class="code-line line-number" line="4">
</span><span class="code-line line-number" line="5"><span class="token comment"># 显示已定义的别名(假设当前环境存在以下别名)</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 显示已定义的别名(假设当前环境存在以下别名)</span>
</span><span class="code-line line-number" line="6"><span class="token builtin class-name">alias</span> <span class="token function">ls</span> </span><span class="code-line line-number" line="6"><span class="token builtin class-name">alias</span> <span class="token function">ls</span>
@ -168,7 +168,7 @@ alias ls=&#x27;ls --color=never&#x27; grep=&#x27;grep --color=never&#x27;
<blockquote> <blockquote>
<p>请注意,以下内容可能与您实际使用的系统有出入:</p> <p>请注意,以下内容可能与您实际使用的系统有出入:</p>
<p>在CentOS7下这个文件是<code>/etc/bash.bashrc</code>。此外在CentOS7下细看<code>~/.bashrc</code>文件,会发现有这样一段代码:</p> <p>在CentOS7下这个文件是<code>/etc/bash.bashrc</code>。此外在CentOS7下细看<code>~/.bashrc</code>文件,会发现有这样一段代码:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token keyword">if</span> <span class="token punctuation">[</span> -f ~/.bash_aliases <span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token parameter variable">-f</span> ~/.bash_aliases <span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
</span><span class="code-line line-number" line="2"> <span class="token builtin class-name">.</span> ~/.bash_aliases </span><span class="code-line line-number" line="2"> <span class="token builtin class-name">.</span> ~/.bash_aliases
</span><span class="code-line line-number" line="3"><span class="token keyword">fi</span> </span><span class="code-line line-number" line="3"><span class="token keyword">fi</span>
</span></code><div onclick="copied(this)" data-code="if [ -f ~/.bash_aliases ]; then </span></code><div onclick="copied(this)" data-code="if [ -f ~/.bash_aliases ]; then
@ -183,9 +183,9 @@ fi
<li>当您定义(修改)别名的值的时候,由于值的字符串有空格但您没有用<strong>单引号扩起</strong>,那么会导致严重的问题:</li> <li>当您定义(修改)别名的值的时候,由于值的字符串有空格但您没有用<strong>单引号扩起</strong>,那么会导致严重的问题:</li>
</ul> </ul>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 为方便演示,删除全部别名</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 为方便演示,删除全部别名</span>
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">unalias</span> -a </span><span class="code-line line-number" line="2"><span class="token builtin class-name">unalias</span> <span class="token parameter variable">-a</span>
</span><span class="code-line line-number" line="3"><span class="token comment"># 没有用单引号扩起</span> </span><span class="code-line line-number" line="3"><span class="token comment"># 没有用单引号扩起</span>
</span><span class="code-line line-number" line="4"><span class="token builtin class-name">alias</span> <span class="token assign-left variable">rm</span><span class="token operator">=</span>rm -rf </span><span class="code-line line-number" line="4"><span class="token builtin class-name">alias</span> <span class="token assign-left variable">rm</span><span class="token operator">=</span>rm <span class="token parameter variable">-rf</span>
</span><span class="code-line line-number" line="5"><span class="token comment"># 执行命令后报错 bash: alias: -rf: not found</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 执行命令后报错 bash: alias: -rf: not found</span>
</span><span class="code-line line-number" line="6"><span class="token comment"># 这时使用alias查看rm的别名时返回 alias rm='rm'</span> </span><span class="code-line line-number" line="6"><span class="token comment"># 这时使用alias查看rm的别名时返回 alias rm='rm'</span>
</span></code><div onclick="copied(this)" data-code="# 为方便演示删除全部别名 </span></code><div onclick="copied(this)" data-code="# 为方便演示删除全部别名
@ -197,9 +197,9 @@ alias rm=rm -rf
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 更具有迷惑性的例子</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 更具有迷惑性的例子</span>
</span><span class="code-line line-number" line="2"><span class="token comment"># 为方便演示,删除全部别名</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 为方便演示,删除全部别名</span>
</span><span class="code-line line-number" line="3"><span class="token builtin class-name">unalias</span> -a </span><span class="code-line line-number" line="3"><span class="token builtin class-name">unalias</span> <span class="token parameter variable">-a</span>
</span><span class="code-line line-number" line="4"><span class="token comment"># 仍然没有用单引号括起</span> </span><span class="code-line line-number" line="4"><span class="token comment"># 仍然没有用单引号括起</span>
</span><span class="code-line line-number" line="5"><span class="token builtin class-name">alias</span> <span class="token assign-left variable">ls</span><span class="token operator">=</span>ls --color<span class="token operator">=</span>never </span><span class="code-line line-number" line="5"><span class="token builtin class-name">alias</span> <span class="token assign-left variable">ls</span><span class="token operator">=</span>ls <span class="token parameter variable">--color</span><span class="token operator">=</span>never
</span><span class="code-line line-number" line="6"><span class="token comment"># 执行命令后看起来没有报错</span> </span><span class="code-line line-number" line="6"><span class="token comment"># 执行命令后看起来没有报错</span>
</span><span class="code-line line-number" line="7"> </span><span class="code-line line-number" line="7">
</span><span class="code-line line-number" line="8"><span class="token comment"># 使用alias查看全部别名会发现运行结果如下</span> </span><span class="code-line line-number" line="8"><span class="token comment"># 使用alias查看全部别名会发现运行结果如下</span>
@ -238,7 +238,7 @@ alias ls=ls --color=never
</ol> </ol>
<h3 id="其他参考链接"><a class="anchor" aria-hidden="true" tabindex="-1" href="#其他参考链接"><span class="octicon octicon-link"></span></a>其他参考链接</h3> <h3 id="其他参考链接"><a class="anchor" aria-hidden="true" tabindex="-1" href="#其他参考链接"><span class="octicon octicon-link"></span></a>其他参考链接</h3>
<p><a href="https://jingyan.baidu.com/article/ac6a9a5e6738422b653eac01.html">Linux命令详解[8]alias创建自己的命令</a></p> <p><a href="https://jingyan.baidu.com/article/ac6a9a5e6738422b653eac01.html">Linux命令详解[8]alias创建自己的命令</a></p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -251,31 +251,31 @@ alias ls=ls --color=never
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -309,7 +309,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727533"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401376"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727533"></script> <script type="text/javascript" src="../js/index.js?v=1661420401376"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apachectl,Apache服务器前端控制工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apachectl,Apache服务器前端控制工具">
<title>apachectl 命令Linux apachectl 命令详解Apache服务器前端控制工具 - Linux 命令搜索引擎</title> <title>apachectl 命令Linux apachectl 命令详解Apache服务器前端控制工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727542"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401383">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -132,7 +132,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>status显示服务器摘要的状态信息</li> <li>status显示服务器摘要的状态信息</li>
<li>stop停止Apache服务器。</li> <li>stop停止Apache服务器。</li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -145,31 +145,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -203,7 +203,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727543"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401384"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727543"></script> <script type="text/javascript" src="../js/index.js?v=1661420401384"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apk,Alpine Linux 下的包管理工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apk,Alpine Linux 下的包管理工具">
<title>apk 命令Linux apk 命令详解Alpine Linux 下的包管理工具 - Linux 命令搜索引擎</title> <title>apk 命令Linux apk 命令详解Alpine Linux 下的包管理工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727581"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401450">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -133,16 +133,16 @@ apk del openssh openntp vim
<p>upgrade命令升级系统已安装的所以软件包一般包括内核当然也可指定仅升级部分软件包通过-u或upgrade选择指定</p> <p>upgrade命令升级系统已安装的所以软件包一般包括内核当然也可指定仅升级部分软件包通过-u或upgrade选择指定</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk update <span class="token comment"># 更新最新本地镜像源</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk update <span class="token comment"># 更新最新本地镜像源</span>
</span><span class="code-line line-number" line="2">apk upgrade <span class="token comment"># 升级软件</span> </span><span class="code-line line-number" line="2">apk upgrade <span class="token comment"># 升级软件</span>
</span><span class="code-line line-number" line="3">apk <span class="token function">add</span> --upgrade busybox <span class="token comment"># 指定升级部分软件包</span> </span><span class="code-line line-number" line="3">apk <span class="token function">add</span> <span class="token parameter variable">--upgrade</span> busybox <span class="token comment"># 指定升级部分软件包</span>
</span></code><div onclick="copied(this)" data-code="apk update # 更新最新本地镜像源 </span></code><div onclick="copied(this)" data-code="apk update # 更新最新本地镜像源
apk upgrade # 升级软件 apk upgrade # 升级软件
apk add --upgrade busybox # 指定升级部分软件包 apk add --upgrade busybox # 指定升级部分软件包
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="搜索"><a class="anchor" aria-hidden="true" tabindex="-1" href="#搜索"><span class="octicon octicon-link"></span></a>搜索</h3> <h3 id="搜索"><a class="anchor" aria-hidden="true" tabindex="-1" href="#搜索"><span class="octicon octicon-link"></span></a>搜索</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk search <span class="token comment"># 查找所以可用软件包</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk search <span class="token comment"># 查找所以可用软件包</span>
</span><span class="code-line line-number" line="2">apk search -v <span class="token comment"># 查找所以可用软件包及其描述内容</span> </span><span class="code-line line-number" line="2">apk search <span class="token parameter variable">-v</span> <span class="token comment"># 查找所以可用软件包及其描述内容</span>
</span><span class="code-line line-number" line="3">apk search -v <span class="token string">'acf*'</span> <span class="token comment"># 通过软件包名称查找软件包</span> </span><span class="code-line line-number" line="3">apk search <span class="token parameter variable">-v</span> <span class="token string">'acf*'</span> <span class="token comment"># 通过软件包名称查找软件包</span>
</span><span class="code-line line-number" line="4">apk search -v -d <span class="token string">'docker'</span> <span class="token comment"># 通过描述文件查找特定的软件包</span> </span><span class="code-line line-number" line="4">apk search <span class="token parameter variable">-v</span> <span class="token parameter variable">-d</span> <span class="token string">'docker'</span> <span class="token comment"># 通过描述文件查找特定的软件包</span>
</span></code><div onclick="copied(this)" data-code="apk search # 查找所以可用软件包 </span></code><div onclick="copied(this)" data-code="apk search # 查找所以可用软件包
apk search -v # 查找所以可用软件包及其描述内容 apk search -v # 查找所以可用软件包及其描述内容
apk search -v &#x27;acf*&#x27; # 通过软件包名称查找软件包 apk search -v &#x27;acf*&#x27; # 通过软件包名称查找软件包
@ -151,7 +151,7 @@ apk search -v -d &#x27;docker&#x27; # 通过描述文件查找特定的软件包
<h3 id="查看包信息"><a class="anchor" aria-hidden="true" tabindex="-1" href="#查看包信息"><span class="octicon octicon-link"></span></a>查看包信息</h3> <h3 id="查看包信息"><a class="anchor" aria-hidden="true" tabindex="-1" href="#查看包信息"><span class="octicon octicon-link"></span></a>查看包信息</h3>
<p>info命令用于显示软件包的信息。</p> <p>info命令用于显示软件包的信息。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk info <span class="token comment"># 列出所有已安装的软件包</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk info <span class="token comment"># 列出所有已安装的软件包</span>
</span><span class="code-line line-number" line="2">apk info -a zlib <span class="token comment"># 显示完整的软件包信息</span> </span><span class="code-line line-number" line="2">apk info <span class="token parameter variable">-a</span> zlib <span class="token comment"># 显示完整的软件包信息</span>
</span><span class="code-line line-number" line="3">apk info --who-owns /sbin/lbu <span class="token comment"># 显示指定文件属于的包</span> </span><span class="code-line line-number" line="3">apk info --who-owns /sbin/lbu <span class="token comment"># 显示指定文件属于的包</span>
</span></code><div onclick="copied(this)" data-code="apk info # 列出所有已安装的软件包 </span></code><div onclick="copied(this)" data-code="apk info # 列出所有已安装的软件包
apk info -a zlib # 显示完整的软件包信息 apk info -a zlib # 显示完整的软件包信息
@ -160,17 +160,17 @@ apk info --who-owns /sbin/lbu # 显示指定文件属于的包
<h2 id="笔记"><a class="anchor" aria-hidden="true" tabindex="-1" href="#笔记"><span class="octicon octicon-link"></span></a>笔记</h2> <h2 id="笔记"><a class="anchor" aria-hidden="true" tabindex="-1" href="#笔记"><span class="octicon octicon-link"></span></a>笔记</h2>
<p>还是蛮喜欢 alpine 的,简单纯粹</p> <p>还是蛮喜欢 alpine 的,简单纯粹</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk <span class="token function">add</span> iproute2 <span class="token comment"># ss vs netstat</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">apk <span class="token function">add</span> iproute2 <span class="token comment"># ss vs netstat</span>
</span><span class="code-line line-number" line="2">ss -ptl </span><span class="code-line line-number" line="2">ss <span class="token parameter variable">-ptl</span>
</span><span class="code-line line-number" line="3">apk <span class="token function">add</span> drill <span class="token comment"># drill vs nslookup&#x26;dig</span> </span><span class="code-line line-number" line="3">apk <span class="token function">add</span> drill <span class="token comment"># drill vs nslookup&#x26;dig</span>
</span><span class="code-line line-number" line="4"> </span><span class="code-line line-number" line="4">
</span><span class="code-line line-number" line="5">crond <span class="token comment"># 开启 cron 服务</span> </span><span class="code-line line-number" line="5">crond <span class="token comment"># 开启 cron 服务</span>
</span><span class="code-line line-number" line="6"><span class="token function">crontab</span> -l -e </span><span class="code-line line-number" line="6"><span class="token function">crontab</span> <span class="token parameter variable">-l</span> <span class="token parameter variable">-e</span>
</span><span class="code-line line-number" line="7"> </span><span class="code-line line-number" line="7">
</span><span class="code-line line-number" line="8">apk <span class="token function">add</span> xxx </span><span class="code-line line-number" line="8">apk <span class="token function">add</span> xxx
</span><span class="code-line line-number" line="9">apk search -v xxx </span><span class="code-line line-number" line="9">apk search <span class="token parameter variable">-v</span> xxx
</span><span class="code-line line-number" line="10">apk info -a xxx </span><span class="code-line line-number" line="10">apk info <span class="token parameter variable">-a</span> xxx
</span><span class="code-line line-number" line="11">apk info </span><span class="code-line line-number" line="11">apk info
</span><span class="code-line line-number" line="12"><span class="token builtin class-name">echo</span> -e <span class="token string">"http://mirrors.aliyun.com/alpine/v3.6/main<span class="token entity" title="\n">\n</span>http://mirrors.aliyun.com/alpine/v3.6/community"</span> <span class="token operator">></span> /etc/apk/repositories </span><span class="code-line line-number" line="12"><span class="token builtin class-name">echo</span> <span class="token parameter variable">-e</span> <span class="token string">"http://mirrors.aliyun.com/alpine/v3.6/main<span class="token entity" title="\n">\n</span>http://mirrors.aliyun.com/alpine/v3.6/community"</span> <span class="token operator">></span> /etc/apk/repositories
</span><span class="code-line line-number" line="13">apk update </span><span class="code-line line-number" line="13">apk update
</span><span class="code-line line-number" line="14"> </span><span class="code-line line-number" line="14">
</span><span class="code-line line-number" line="15"><span class="token comment"># storage</span> </span><span class="code-line line-number" line="15"><span class="token comment"># storage</span>
@ -178,7 +178,7 @@ apk info --who-owns /sbin/lbu # 显示指定文件属于的包
</span><span class="code-line line-number" line="17"> </span><span class="code-line line-number" line="17">
</span><span class="code-line line-number" line="18"><span class="token comment"># network</span> </span><span class="code-line line-number" line="18"><span class="token comment"># network</span>
</span><span class="code-line line-number" line="19"><span class="token builtin class-name">echo</span> <span class="token string">"shortname"</span> <span class="token operator">></span> /etc/hostname </span><span class="code-line line-number" line="19"><span class="token builtin class-name">echo</span> <span class="token string">"shortname"</span> <span class="token operator">></span> /etc/hostname
</span><span class="code-line line-number" line="20"><span class="token function">hostname</span> -F /etc/hostname </span><span class="code-line line-number" line="20"><span class="token function">hostname</span> <span class="token parameter variable">-F</span> /etc/hostname
</span><span class="code-line line-number" line="21">/etc/hosts </span><span class="code-line line-number" line="21">/etc/hosts
</span><span class="code-line line-number" line="22">/etc/resolv.conf <span class="token comment"># conig DNS</span> </span><span class="code-line line-number" line="22">/etc/resolv.conf <span class="token comment"># conig DNS</span>
</span><span class="code-line line-number" line="23">modprobe ipv6 <span class="token comment"># enable ipv6</span> </span><span class="code-line line-number" line="23">modprobe ipv6 <span class="token comment"># enable ipv6</span>
@ -193,14 +193,14 @@ apk info --who-owns /sbin/lbu # 显示指定文件属于的包
</span><span class="code-line line-number" line="32"> </span><span class="code-line line-number" line="32">
</span><span class="code-line line-number" line="33"><span class="token comment"># post-install</span> </span><span class="code-line line-number" line="33"><span class="token comment"># post-install</span>
</span><span class="code-line line-number" line="34">/etc/apk/repositories </span><span class="code-line line-number" line="34">/etc/apk/repositories
</span><span class="code-line line-number" line="35">apk <span class="token function">add</span> cherokee --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted </span><span class="code-line line-number" line="35">apk <span class="token function">add</span> cherokee --update-cache <span class="token parameter variable">--repository</span> http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
</span><span class="code-line line-number" line="36">apk search -v --description <span class="token string">'NTP'</span> <span class="token comment"># show description and search from description</span> </span><span class="code-line line-number" line="36">apk search <span class="token parameter variable">-v</span> <span class="token parameter variable">--description</span> <span class="token string">'NTP'</span> <span class="token comment"># show description and search from description</span>
</span><span class="code-line line-number" line="37">apk info -a zlib </span><span class="code-line line-number" line="37">apk info <span class="token parameter variable">-a</span> zlib
</span><span class="code-line line-number" line="38">apk info -vv<span class="token operator">|</span><span class="token function">sort</span> </span><span class="code-line line-number" line="38">apk info -vv<span class="token operator">|</span><span class="token function">sort</span>
</span><span class="code-line line-number" line="39">apk info -r -R <span class="token comment"># require / depency</span> </span><span class="code-line line-number" line="39">apk info <span class="token parameter variable">-r</span> <span class="token parameter variable">-R</span> <span class="token comment"># require / depency</span>
</span><span class="code-line line-number" line="40">apk version -v -l <span class="token string">'&#x3C;'</span> <span class="token comment"># show available updates</span> </span><span class="code-line line-number" line="40">apk version <span class="token parameter variable">-v</span> <span class="token parameter variable">-l</span> <span class="token string">'&#x3C;'</span> <span class="token comment"># show available updates</span>
</span><span class="code-line line-number" line="41">apk upgrade -U -a </span><span class="code-line line-number" line="41">apk upgrade <span class="token parameter variable">-U</span> <span class="token parameter variable">-a</span>
</span><span class="code-line line-number" line="42">apk <span class="token function">add</span> -u xxx <span class="token comment"># update xxx</span> </span><span class="code-line line-number" line="42">apk <span class="token function">add</span> <span class="token parameter variable">-u</span> xxx <span class="token comment"># update xxx</span>
</span><span class="code-line line-number" line="43"> </span><span class="code-line line-number" line="43">
</span><span class="code-line line-number" line="44">/etc/runlevels <span class="token comment"># runlevel</span> </span><span class="code-line line-number" line="44">/etc/runlevels <span class="token comment"># runlevel</span>
</span><span class="code-line line-number" line="45">apk <span class="token function">add</span> openrc <span class="token comment"># use openrc for init system</span> </span><span class="code-line line-number" line="45">apk <span class="token function">add</span> openrc <span class="token comment"># use openrc for init system</span>
@ -231,7 +231,7 @@ apk info --who-owns /sbin/lbu # 显示指定文件属于的包
</span><span class="code-line line-number" line="70">rc-service <span class="token function">docker</span> start </span><span class="code-line line-number" line="70">rc-service <span class="token function">docker</span> start
</span><span class="code-line line-number" line="71">apk <span class="token function">add</span> py-pip </span><span class="code-line line-number" line="71">apk <span class="token function">add</span> py-pip
</span><span class="code-line line-number" line="72">pip <span class="token function">install</span> <span class="token function">docker-compose</span> </span><span class="code-line line-number" line="72">pip <span class="token function">install</span> <span class="token function">docker-compose</span>
</span><span class="code-line line-number" line="73"><span class="token function">ln</span> -s /usr/bin/docker-compose /usr/bin/doc </span><span class="code-line line-number" line="73"><span class="token function">ln</span> <span class="token parameter variable">-s</span> /usr/bin/docker-compose /usr/bin/doc
</span><span class="code-line line-number" line="74"> </span><span class="code-line line-number" line="74">
</span><span class="code-line line-number" line="75"><span class="token comment"># application</span> </span><span class="code-line line-number" line="75"><span class="token comment"># application</span>
</span><span class="code-line line-number" line="76">apk <span class="token function">add</span> openssh <span class="token comment"># ssh</span> </span><span class="code-line line-number" line="76">apk <span class="token function">add</span> openssh <span class="token comment"># ssh</span>
@ -320,7 +320,7 @@ rc-update add sshd
/etc/sshd_config /etc/sshd_config
apk add dropbear # another openssh implementation apk add dropbear # another openssh implementation
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -333,31 +333,31 @@ apk add dropbear # another openssh implementation
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -391,7 +391,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727582"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401450"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727582"></script> <script type="text/javascript" src="../js/index.js?v=1661420401450"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apropos,在 whatis 数据库中查找字符串"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apropos,在 whatis 数据库中查找字符串">
<title>apropos 命令Linux apropos 命令详解:在 whatis 数据库中查找字符串 - Linux 命令搜索引擎</title> <title>apropos 命令Linux apropos 命令详解:在 whatis 数据库中查找字符串 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727623"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401486">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -119,7 +119,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p><strong>apropos命令</strong> 在一些特定的包含系统命令的简短描述的数据库文件里查找关键字,然后把结果送到标准输出。 </p> <p><strong>apropos命令</strong> 在一些特定的包含系统命令的简短描述的数据库文件里查找关键字,然后把结果送到标准输出。 </p>
<p>如果你不知道完成某个特定任务所需要命令的名称可以使用一个关键字通过Linux apropos实用程序来搜索它。该实用程序可以搜索关键字并且显示所有包含匹配项的man页面的简短描述。另外使用man实用程序和-k关键字选项可以得到和用Linux apropos实用程序相同的结果实际上是相同的命令</p> <p>如果你不知道完成某个特定任务所需要命令的名称可以使用一个关键字通过Linux apropos实用程序来搜索它。该实用程序可以搜索关键字并且显示所有包含匹配项的man页面的简短描述。另外使用man实用程序和-k关键字选项可以得到和用Linux apropos实用程序相同的结果实际上是相同的命令</p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">apropos</span> <span class="token punctuation">[</span>-dalhvV<span class="token punctuation">]</span> -e<span class="token operator">|</span>-<span class="token punctuation">[</span>w<span class="token operator">|</span>-r<span class="token punctuation">]</span> <span class="token punctuation">[</span>-s section<span class="token punctuation">]</span> <span class="token punctuation">[</span>-m system<span class="token punctuation">[</span>,<span class="token punctuation">..</span>.<span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token punctuation">[</span>-M path<span class="token punctuation">]</span> <span class="token punctuation">[</span>-L locale<span class="token punctuation">]</span> -C <span class="token punctuation">[</span>file<span class="token punctuation">]</span> keyword <span class="token punctuation">..</span>. <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">apropos</span> <span class="token punctuation">[</span>-dalhvV<span class="token punctuation">]</span> -e<span class="token operator">|</span>-<span class="token punctuation">[</span>w<span class="token operator">|</span>-r<span class="token punctuation">]</span> <span class="token punctuation">[</span>-s section<span class="token punctuation">]</span> <span class="token punctuation">[</span>-m system<span class="token punctuation">[</span>,<span class="token punctuation">..</span>.<span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token punctuation">[</span>-M path<span class="token punctuation">]</span> <span class="token punctuation">[</span>-L locale<span class="token punctuation">]</span> <span class="token parameter variable">-C</span> <span class="token punctuation">[</span>file<span class="token punctuation">]</span> keyword <span class="token punctuation">..</span>.
</span></code><div onclick="copied(this)" data-code="apropos [-dalhvV] -e|-[w|-r] [-s section] [-m system[,...]] [-M path] [-L locale] -C [file] keyword ... </span></code><div onclick="copied(this)" data-code="apropos [-dalhvV] -e|-[w|-r] [-s section] [-m system[,...]] [-M path] [-L locale] -C [file] keyword ...
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
@ -130,11 +130,11 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="5">-e, --exact每个keyword将精确匹配手册页名字和描述。 </span><span class="code-line line-number" line="5">-e, --exact每个keyword将精确匹配手册页名字和描述。
</span><span class="code-line line-number" line="6">-a, --and只显示匹配所有keyword的手册页和描述。默认显示匹配任何keyword的项。 </span><span class="code-line line-number" line="6">-a, --and只显示匹配所有keyword的手册页和描述。默认显示匹配任何keyword的项。
</span><span class="code-line line-number" line="7">-l, --long不根据终端宽度缩减输出。 </span><span class="code-line line-number" line="7">-l, --long不根据终端宽度缩减输出。
</span><span class="code-line line-number" line="8">-s section, --section section只查找指定的手册section。 </span><span class="code-line line-number" line="8"><span class="token parameter variable">-s</span> section, <span class="token parameter variable">--section</span> section只查找指定的手册section。
</span><span class="code-line line-number" line="9">-m system<span class="token punctuation">[</span>,<span class="token punctuation">..</span>.<span class="token punctuation">]</span>, --systems<span class="token operator">=</span>system<span class="token punctuation">[</span>,<span class="token punctuation">..</span>.<span class="token punctuation">]</span>:用于查找其它操作系统的手册页。 </span><span class="code-line line-number" line="9"><span class="token parameter variable">-m</span> system<span class="token punctuation">[</span>,<span class="token punctuation">..</span>.<span class="token punctuation">]</span>, <span class="token parameter variable">--systems</span><span class="token operator">=</span>system<span class="token punctuation">[</span>,<span class="token punctuation">..</span>.<span class="token punctuation">]</span>:用于查找其它操作系统的手册页。
</span><span class="code-line line-number" line="10">-M path, --manpath<span class="token operator">=</span>path指定从其它以冒号分隔的手册页层次查找。默认使用<span class="token variable">$MANPATH</span>环境变量。这个选项覆盖<span class="token variable">$MANPATH</span>的内容。 </span><span class="code-line line-number" line="10"><span class="token parameter variable">-M</span> path, <span class="token parameter variable">--manpath</span><span class="token operator">=</span>path指定从其它以冒号分隔的手册页层次查找。默认使用<span class="token variable">$MANPATH</span>环境变量。这个选项覆盖<span class="token variable">$MANPATH</span>的内容。
</span><span class="code-line line-number" line="11">-L locale, --locale<span class="token operator">=</span>localeapropos调用C函数setlocale来得到当前本地化信息包括<span class="token variable">$LC_MESSAGE</span><span class="token environment constant">$LANG</span>。使用该选项提供一个locale字符串来临时更改本地化信息。 </span><span class="code-line line-number" line="11"><span class="token parameter variable">-L</span> locale, <span class="token parameter variable">--locale</span><span class="token operator">=</span>localeapropos调用C函数setlocale来得到当前本地化信息包括<span class="token variable">$LC_MESSAGE</span><span class="token environment constant">$LANG</span>。使用该选项提供一个locale字符串来临时更改本地化信息。
</span><span class="code-line line-number" line="12">-C file, --config-file<span class="token operator">=</span>file使用这个用户配置文件而不是默认的~/.manpath。 </span><span class="code-line line-number" line="12"><span class="token parameter variable">-C</span> file, --config-file<span class="token operator">=</span>file使用这个用户配置文件而不是默认的~/.manpath。
</span><span class="code-line line-number" line="13">-h, --help打印帮助信息并退出。 </span><span class="code-line line-number" line="13">-h, --help打印帮助信息并退出。
</span><span class="code-line line-number" line="14">-V, --version打印版本信息并退出。 </span><span class="code-line line-number" line="14">-V, --version打印版本信息并退出。
</span></code><div onclick="copied(this)" data-code="-d, --debug输出调试信息 </span></code><div onclick="copied(this)" data-code="-d, --debug输出调试信息
@ -199,10 +199,10 @@ who (1) - show who is logged on
whoami (1) - print effective userid whoami (1) - print effective userid
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>查找手册页名字和描述中包含emacs和vi的手册页</p> <p>查找手册页名字和描述中包含emacs和vi的手册页</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">apropos</span> -a emacs <span class="token function">vi</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">apropos</span> <span class="token parameter variable">-a</span> emacs <span class="token function">vi</span>
</span></code><div onclick="copied(this)" data-code="apropos -a emacs vi </span></code><div onclick="copied(this)" data-code="apropos -a emacs vi
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -215,31 +215,31 @@ whoami (1) - print effective userid
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -273,7 +273,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727624"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401487"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727624"></script> <script type="text/javascript" src="../js/index.js?v=1661420401487"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apt-get,Debian Linux发行版中的APT软件包管理工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apt-get,Debian Linux发行版中的APT软件包管理工具">
<title>apt-get 命令Linux apt-get 命令详解Debian Linux发行版中的APT软件包管理工具 - Linux 命令搜索引擎</title> <title>apt-get 命令Linux apt-get 命令详解Debian Linux发行版中的APT软件包管理工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727657"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401512">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -192,7 +192,7 @@ apt-get clean # 删除软件包的安装包
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">apt-get</span> autoclean <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">apt-get</span> autoclean
</span></code><div onclick="copied(this)" data-code="apt-get autoclean </span></code><div onclick="copied(this)" data-code="apt-get autoclean
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -205,31 +205,31 @@ apt-get clean # 删除软件包的安装包
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -263,7 +263,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727658"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401513"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727658"></script> <script type="text/javascript" src="../js/index.js?v=1661420401513"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apt-key,管理Debian Linux系统中的软件包密钥"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apt-key,管理Debian Linux系统中的软件包密钥">
<title>apt-key 命令Linux apt-key 命令详解管理Debian Linux系统中的软件包密钥 - Linux 命令搜索引擎</title> <title>apt-key 命令Linux apt-key 命令详解管理Debian Linux系统中的软件包密钥 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727666"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401520">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -133,7 +133,7 @@ apt-key add keyname # 把下载的key添加到本地trusted数据库中。
apt-key del keyname # 从本地trusted数据库删除key。 apt-key del keyname # 从本地trusted数据库删除key。
apt-key update # 更新本地trusted数据库删除过期没用的key。 apt-key update # 更新本地trusted数据库删除过期没用的key。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -146,31 +146,31 @@ apt-key update # 更新本地trusted数据库删除过期没用的key
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -204,7 +204,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727667"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401521"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727667"></script> <script type="text/javascript" src="../js/index.js?v=1661420401521"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apt-sortpkgs,Debian Linux下对软件包索引文件进行排序的工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,apt-sortpkgs,Debian Linux下对软件包索引文件进行排序的工具">
<title>apt-sortpkgs 命令Linux apt-sortpkgs 命令详解Debian Linux下对软件包索引文件进行排序的工具 - Linux 命令搜索引擎</title> <title>apt-sortpkgs 命令Linux apt-sortpkgs 命令详解Debian Linux下对软件包索引文件进行排序的工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727676"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401527">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -129,7 +129,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>文件指定要排序的包含debian包信息的索引文件。</p> <p>文件指定要排序的包含debian包信息的索引文件。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -142,31 +142,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -200,7 +200,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727676"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401528"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727676"></script> <script type="text/javascript" src="../js/index.js?v=1661420401528"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,aptitude,Debian Linux系统中软件包管理工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,aptitude,Debian Linux系统中软件包管理工具">
<title>aptitude 命令Linux aptitude 命令详解Debian Linux系统中软件包管理工具 - Linux 命令搜索引擎</title> <title>aptitude 命令Linux aptitude 命令详解Debian Linux系统中软件包管理工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727688"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401540">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -161,7 +161,7 @@ aptitude clean # 删除下载的包文件
aptitude autoclean # 仅删除过期的包文件 aptitude autoclean # 仅删除过期的包文件
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>当然,你也可以在文本界面模式中使用 aptitude。</p> <p>当然,你也可以在文本界面模式中使用 aptitude。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -174,31 +174,31 @@ aptitude autoclean # 仅删除过期的包文件
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -232,7 +232,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727688"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401540"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727688"></script> <script type="text/javascript" src="../js/index.js?v=1661420401540"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,ar,建立或修改备存文件,或是从备存文件中抽取文件"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,ar,建立或修改备存文件,或是从备存文件中抽取文件">
<title>ar 命令Linux ar 命令详解:建立或修改备存文件,或是从备存文件中抽取文件 - Linux 命令搜索引擎</title> <title>ar 命令Linux ar 命令详解:建立或修改备存文件,或是从备存文件中抽取文件 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727740"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401586">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -120,7 +120,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ar <span class="token punctuation">[</span>-<span class="token punctuation">]</span><span class="token punctuation">{</span>dmpqrtx<span class="token punctuation">}</span><span class="token punctuation">[</span>abcfilNoPsSuvV<span class="token punctuation">]</span> <span class="token punctuation">[</span>membername<span class="token punctuation">]</span> <span class="token punctuation">[</span>count<span class="token punctuation">]</span> archive files<span class="token punctuation">..</span>. <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">ar <span class="token punctuation">[</span>-<span class="token punctuation">]</span><span class="token punctuation">{</span>dmpqrtx<span class="token punctuation">}</span><span class="token punctuation">[</span>abcfilNoPsSuvV<span class="token punctuation">]</span> <span class="token punctuation">[</span>membername<span class="token punctuation">]</span> <span class="token punctuation">[</span>count<span class="token punctuation">]</span> archive files<span class="token punctuation">..</span>.
</span><span class="code-line line-number" line="2">Usage: ar <span class="token punctuation">[</span>emulation options<span class="token punctuation">]</span> <span class="token punctuation">[</span>-<span class="token punctuation">]</span><span class="token punctuation">{</span>dmpqrstx<span class="token punctuation">}</span><span class="token punctuation">[</span>abcDfilMNoPsSTuvV<span class="token punctuation">]</span> <span class="token punctuation">[</span>--plugin <span class="token operator">&#x3C;</span>name<span class="token operator">></span><span class="token punctuation">]</span> <span class="token punctuation">[</span>member-name<span class="token punctuation">]</span> <span class="token punctuation">[</span>count<span class="token punctuation">]</span> archive-file file<span class="token punctuation">..</span>. </span><span class="code-line line-number" line="2">Usage: ar <span class="token punctuation">[</span>emulation options<span class="token punctuation">]</span> <span class="token punctuation">[</span>-<span class="token punctuation">]</span><span class="token punctuation">{</span>dmpqrstx<span class="token punctuation">}</span><span class="token punctuation">[</span>abcDfilMNoPsSTuvV<span class="token punctuation">]</span> <span class="token punctuation">[</span>--plugin <span class="token operator">&#x3C;</span>name<span class="token operator">></span><span class="token punctuation">]</span> <span class="token punctuation">[</span>member-name<span class="token punctuation">]</span> <span class="token punctuation">[</span>count<span class="token punctuation">]</span> archive-file file<span class="token punctuation">..</span>.
</span><span class="code-line line-number" line="3"> ar -M <span class="token punctuation">[</span><span class="token operator">&#x3C;</span>mri-脚本<span class="token punctuation">]</span> </span><span class="code-line line-number" line="3"> ar <span class="token parameter variable">-M</span> <span class="token punctuation">[</span><span class="token operator">&#x3C;</span>mri-脚本<span class="token punctuation">]</span>
</span></code><div onclick="copied(this)" data-code="ar [-]{dmpqrtx}[abcfilNoPsSuvV] [membername] [count] archive files... </span></code><div onclick="copied(this)" data-code="ar [-]{dmpqrtx}[abcfilNoPsSuvV] [membername] [count] archive files...
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file... Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
ar -M [<mri-脚本] ar -M [<mri-脚本]
@ -296,7 +296,7 @@ v 使用本修饰符可以进行 冗余的 操作。附加了此修饰符
V 显示 ar 的版本号。 V 显示 ar 的版本号。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>选项参数</p> <p>选项参数</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">--plugin <span class="token operator">&#x3C;</span>p<span class="token operator">></span> - load the specified plugin <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">--plugin</span> <span class="token operator">&#x3C;</span>p<span class="token operator">></span> - load the specified plugin
</span></code><div onclick="copied(this)" data-code="--plugin <p> - load the specified plugin </span></code><div onclick="copied(this)" data-code="--plugin <p> - load the specified plugin
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>ar支持的目标 elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex</p> <p>ar支持的目标 elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex</p>
@ -353,7 +353,7 @@ d.c
[root@localhost ~]# ar t two.bak [root@localhost ~]# ar t two.bak
d.c d.c
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -366,31 +366,31 @@ d.c
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -424,7 +424,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727741"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401587"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727741"></script> <script type="text/javascript" src="../js/index.js?v=1661420401587"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arch,显示当前主机的硬件架构类型"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arch,显示当前主机的硬件架构类型">
<title>arch 命令Linux arch 命令详解:显示当前主机的硬件架构类型 - Linux 命令搜索引擎</title> <title>arch 命令Linux arch 命令详解:显示当前主机的硬件架构类型 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727752"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401602">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -124,8 +124,8 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>打印机器架构信息;<code>arch</code> 命令输出结果有i386、i486、i586、alpha、sparc、arm、m68k、mips、ppc、i686等。</li> <li>打印机器架构信息;<code>arch</code> 命令输出结果有i386、i486、i586、alpha、sparc、arm、m68k、mips、ppc、i686等。</li>
</ul> </ul>
<h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2> <h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">--help 显示帮助信息并退出。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">--help</span> 显示帮助信息并退出。
</span><span class="code-line line-number" line="2">--version 显示版本信息并退出。 </span><span class="code-line line-number" line="2"><span class="token parameter variable">--version</span> 显示版本信息并退出。
</span></code><div onclick="copied(this)" data-code="--help 显示帮助信息并退出 </span></code><div onclick="copied(this)" data-code="--help 显示帮助信息并退出
--version 显示版本信息并退出。 --version 显示版本信息并退出。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
@ -144,7 +144,7 @@ x86_64
<p>该命令是<code>GNU coreutils</code>包中的命令,相关的帮助信息请查看<code>man -s 1 arch</code><code>info coreutils 'arch invocation'</code></p> <p>该命令是<code>GNU coreutils</code>包中的命令,相关的帮助信息请查看<code>man -s 1 arch</code><code>info coreutils 'arch invocation'</code></p>
</li> </li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -157,31 +157,31 @@ x86_64
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -215,7 +215,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727753"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401602"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727753"></script> <script type="text/javascript" src="../js/index.js?v=1661420401602"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arj,用于创建和管理.arj压缩包"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arj,用于创建和管理.arj压缩包">
<title>arj 命令Linux arj 命令详解:用于创建和管理.arj压缩包 - Linux 命令搜索引擎</title> <title>arj 命令Linux arj 命令详解:用于创建和管理.arj压缩包 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727759"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401592">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -126,7 +126,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>操作指令:对 <code>.arj</code> 压缩包执行的操作指令;</li> <li>操作指令:对 <code>.arj</code> 压缩包执行的操作指令;</li>
<li>压缩包名称指定要操作的arj压缩包名称。</li> <li>压缩包名称指定要操作的arj压缩包名称。</li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -139,31 +139,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -197,7 +197,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727760"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401593"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727760"></script> <script type="text/javascript" src="../js/index.js?v=1661420401593"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arp,arp 命令用于显示和修改 IP 到 MAC 转换表"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arp,arp 命令用于显示和修改 IP 到 MAC 转换表">
<title>arp 命令Linux arp 命令详解arp 命令用于显示和修改 IP 到 MAC 转换表 - Linux 命令搜索引擎</title> <title>arp 命令Linux arp 命令详解arp 命令用于显示和修改 IP 到 MAC 转换表 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727780"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401622">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -128,16 +128,16 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="arp选项参数 </span></code><div onclick="copied(this)" data-code="arp选项参数
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-a <span class="token comment"># 主机 :显示 arp 缓冲区的所有条目;</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-a</span> <span class="token comment"># 主机 :显示 arp 缓冲区的所有条目;</span>
</span><span class="code-line line-number" line="2">-H <span class="token comment"># 地址类型 :指定 arp 指令使用的地址类型;</span> </span><span class="code-line line-number" line="2"><span class="token parameter variable">-H</span> <span class="token comment"># 地址类型 :指定 arp 指令使用的地址类型;</span>
</span><span class="code-line line-number" line="3">-d <span class="token comment"># 主机 :从 arp 缓冲区中删除指定主机的 arp 条目;</span> </span><span class="code-line line-number" line="3"><span class="token parameter variable">-d</span> <span class="token comment"># 主机 :从 arp 缓冲区中删除指定主机的 arp 条目;</span>
</span><span class="code-line line-number" line="4">-D <span class="token comment"># 使用指定接口的硬件地址;</span> </span><span class="code-line line-number" line="4"><span class="token parameter variable">-D</span> <span class="token comment"># 使用指定接口的硬件地址;</span>
</span><span class="code-line line-number" line="5">-e <span class="token comment"># 以 Linux 的显示风格显示 arp 缓冲区中的条目;</span> </span><span class="code-line line-number" line="5"><span class="token parameter variable">-e</span> <span class="token comment"># 以 Linux 的显示风格显示 arp 缓冲区中的条目;</span>
</span><span class="code-line line-number" line="6">-i <span class="token comment"># 接口 :指定要操作 arp 缓冲区的网络接口;</span> </span><span class="code-line line-number" line="6"><span class="token parameter variable">-i</span> <span class="token comment"># 接口 :指定要操作 arp 缓冲区的网络接口;</span>
</span><span class="code-line line-number" line="7">-s <span class="token comment"># 主机 MAC 地址 :设置指定的主机的 IP 地址与 MAC 地址的静态映射;</span> </span><span class="code-line line-number" line="7"><span class="token parameter variable">-s</span> <span class="token comment"># 主机 MAC 地址 :设置指定的主机的 IP 地址与 MAC 地址的静态映射;</span>
</span><span class="code-line line-number" line="8">-n <span class="token comment"># 以数字方式显示 arp 缓冲区中的条目;</span> </span><span class="code-line line-number" line="8"><span class="token parameter variable">-n</span> <span class="token comment"># 以数字方式显示 arp 缓冲区中的条目;</span>
</span><span class="code-line line-number" line="9">-v <span class="token comment"># 显示详细的 arp 缓冲区条目,包括缓冲区条目的统计信息;</span> </span><span class="code-line line-number" line="9"><span class="token parameter variable">-v</span> <span class="token comment"># 显示详细的 arp 缓冲区条目,包括缓冲区条目的统计信息;</span>
</span><span class="code-line line-number" line="10">-f <span class="token comment"># 文件 :设置主机的 IP 地址与 MAC 地址的静态映射。</span> </span><span class="code-line line-number" line="10"><span class="token parameter variable">-f</span> <span class="token comment"># 文件 :设置主机的 IP 地址与 MAC 地址的静态映射。</span>
</span></code><div onclick="copied(this)" data-code="-a # 主机 显示 arp 缓冲区的所有条目 </span></code><div onclick="copied(this)" data-code="-a # 主机 显示 arp 缓冲区的所有条目
-H # 地址类型 :指定 arp 指令使用的地址类型; -H # 地址类型 :指定 arp 指令使用的地址类型;
-d # 主机 :从 arp 缓冲区中删除指定主机的 arp 条目; -d # 主机 :从 arp 缓冲区中删除指定主机的 arp 条目;
@ -165,16 +165,16 @@ Address HWtype HWaddress Flags Mask Iface
Entries: 2 Skipped: 0 Found: 2 Entries: 2 Skipped: 0 Found: 2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>添加静态 arp 映射</p> <p>添加静态 arp 映射</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arp -s IP MAC-ADDRESS <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arp <span class="token parameter variable">-s</span> IP MAC-ADDRESS
</span><span class="code-line line-number" line="2">arp -s <span class="token number">192.168</span>.1.1 00:b1:b2:b3:b4:b5 </span><span class="code-line line-number" line="2">arp <span class="token parameter variable">-s</span> <span class="token number">192.168</span>.1.1 00:b1:b2:b3:b4:b5
</span></code><div onclick="copied(this)" data-code="arp -s IP MAC-ADDRESS </span></code><div onclick="copied(this)" data-code="arp -s IP MAC-ADDRESS
arp -s 192.168.1.1 00:b1:b2:b3:b4:b5 arp -s 192.168.1.1 00:b1:b2:b3:b4:b5
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>删除 arp 缓存条目</p> <p>删除 arp 缓存条目</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arp -d <span class="token number">192.168</span>.1.1 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arp <span class="token parameter variable">-d</span> <span class="token number">192.168</span>.1.1
</span></code><div onclick="copied(this)" data-code="arp -d 192.168.1.1 </span></code><div onclick="copied(this)" data-code="arp -d 192.168.1.1
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre><!-- Linux 命令行搜索引擎https://jaywcjlove.github.io/linux-command/ --> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre><!-- Linux 命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -187,31 +187,31 @@ arp -s 192.168.1.1 00:b1:b2:b3:b4:b5
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -245,7 +245,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727781"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401623"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727781"></script> <script type="text/javascript" src="../js/index.js?v=1661420401623"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arpd,收集免费ARP信息"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arpd,收集免费ARP信息">
<title>arpd 命令Linux arpd 命令详解收集免费ARP信息 - Linux 命令搜索引擎</title> <title>arpd 命令Linux arpd 命令详解收集免费ARP信息 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727792"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401630">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -139,14 +139,14 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>网络接口:指定网络接口。</p> <p>网络接口:指定网络接口。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>启动arpd进程</p> <p>启动arpd进程</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arpd -b /var/tmp/arpd.db <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arpd <span class="token parameter variable">-b</span> /var/tmp/arpd.db
</span></code><div onclick="copied(this)" data-code="arpd -b /var/tmp/arpd.db </span></code><div onclick="copied(this)" data-code="arpd -b /var/tmp/arpd.db
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>运行一段时间后,查看结果:</p> <p>运行一段时间后,查看结果:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arpd -l -b /var/tmp/arpd.db <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">arpd <span class="token parameter variable">-l</span> <span class="token parameter variable">-b</span> /var/tmp/arpd.db
</span></code><div onclick="copied(this)" data-code="arpd -l -b /var/tmp/arpd.db </span></code><div onclick="copied(this)" data-code="arpd -l -b /var/tmp/arpd.db
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -159,31 +159,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -217,7 +217,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727793"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401631"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727793"></script> <script type="text/javascript" src="../js/index.js?v=1661420401631"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arping,通过发送ARP协议报文测试网络"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arping,通过发送ARP协议报文测试网络">
<title>arping 命令Linux arping 命令详解通过发送ARP协议报文测试网络 - Linux 命令搜索引擎</title> <title>arping 命令Linux arping 命令详解通过发送ARP协议报文测试网络 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727807"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401644">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -125,10 +125,10 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-b用于发送以太网广播帧FFFFFFFFFFFF。arping一开始使用广播地址在收到响应后就使用unicast地址。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-b用于发送以太网广播帧FFFFFFFFFFFF。arping一开始使用广播地址在收到响应后就使用unicast地址。
</span><span class="code-line line-number" line="2">-qquiet output不显示任何信息 </span><span class="code-line line-number" line="2">-qquiet output不显示任何信息
</span><span class="code-line line-number" line="3">-f表示在收到第一个响应报文后就退出 </span><span class="code-line line-number" line="3">-f表示在收到第一个响应报文后就退出
</span><span class="code-line line-number" line="4">-w timeout设定一个超时时间单位是秒。如果到了指定时间arping还没到完全收到响应则退出 </span><span class="code-line line-number" line="4"><span class="token parameter variable">-w</span> timeout设定一个超时时间单位是秒。如果到了指定时间arping还没到完全收到响应则退出
</span><span class="code-line line-number" line="5">-c count表示发送指定数量的ARP请求数据包后就停止。如果指定了deadline选项则arping会等待相同数量的arp响应包直到超时为止 </span><span class="code-line line-number" line="5"><span class="token parameter variable">-c</span> count表示发送指定数量的ARP请求数据包后就停止。如果指定了deadline选项则arping会等待相同数量的arp响应包直到超时为止
</span><span class="code-line line-number" line="6">-s source设定arping发送的arp数据包中的SPA字段的值。如果为空则按下面处理如果是DAD模式冲突地址探测则设置为0.0.0.0如果是Unsolicited ARP模式Gratutious ARP则设置为目标地址否则从路由表得出 </span><span class="code-line line-number" line="6"><span class="token parameter variable">-s</span> source设定arping发送的arp数据包中的SPA字段的值。如果为空则按下面处理如果是DAD模式冲突地址探测则设置为0.0.0.0如果是Unsolicited ARP模式Gratutious ARP则设置为目标地址否则从路由表得出
</span><span class="code-line line-number" line="7">-I interface设置ping使用的网络接口。 </span><span class="code-line line-number" line="7"><span class="token parameter variable">-I</span> interface设置ping使用的网络接口。
</span></code><div onclick="copied(this)" data-code="-b用于发送以太网广播帧FFFFFFFFFFFF。arping一开始使用广播地址在收到响应后就使用unicast地址。 </span></code><div onclick="copied(this)" data-code="-b用于发送以太网广播帧FFFFFFFFFFFF。arping一开始使用广播地址在收到响应后就使用unicast地址。
-qquiet output不显示任何信息 -qquiet output不显示任何信息
-f表示在收到第一个响应报文后就退出 -f表示在收到第一个响应报文后就退出
@ -165,7 +165,7 @@ Unicast reply from 220.181.111.147 [00:D0:03:BC:48:00] 2.042ms
Sent 8 probes (1 broadcast(s)) Sent 8 probes (1 broadcast(s))
Received 8 response(s) Received 8 response(s)
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -178,31 +178,31 @@ Received 8 response(s)
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -236,7 +236,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727807"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401645"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727807"></script> <script type="text/javascript" src="../js/index.js?v=1661420401645"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arptables,管理ARP包过滤规则表"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arptables,管理ARP包过滤规则表">
<title>arptables 命令Linux arptables 命令详解管理ARP包过滤规则表 - Linux 命令搜索引擎</title> <title>arptables 命令Linux arptables 命令详解管理ARP包过滤规则表 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727814"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401666">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -149,7 +149,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
-s指定要匹配ARP包的源ip地址 -s指定要匹配ARP包的源ip地址
-d指定要匹配ARP包的目的IP地址。 -d指定要匹配ARP包的目的IP地址。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -162,31 +162,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -220,7 +220,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727815"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401667"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727815"></script> <script type="text/javascript" src="../js/index.js?v=1661420401667"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arpwatch,监听网络上ARP的记录"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,arpwatch,监听网络上ARP的记录">
<title>arpwatch 命令Linux arpwatch 命令详解监听网络上ARP的记录 - Linux 命令搜索引擎</title> <title>arpwatch 命令Linux arpwatch 命令详解监听网络上ARP的记录 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727822"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401649">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -131,7 +131,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
-i<接口>指定监听ARP的接口预设的接口为eth0 -i<接口>指定监听ARP的接口预设的接口为eth0
-r<记录文件>从指定的文件中读取ARP记录而不是从网络上监听。 -r<记录文件>从指定的文件中读取ARP记录而不是从网络上监听。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -144,31 +144,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -202,7 +202,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727823"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401650"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727823"></script> <script type="text/javascript" src="../js/index.js?v=1661420401650"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,as,汇编语言编译器"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,as,汇编语言编译器">
<title>as 命令Linux as 命令详解:汇编语言编译器 - Linux 命令搜索引擎</title> <title>as 命令Linux as 命令详解:汇编语言编译器 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727831"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401679">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -155,7 +155,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>汇编文件:指定要汇编的源文件。</p> <p>汇编文件:指定要汇编的源文件。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -168,31 +168,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -226,7 +226,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727831"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401680"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727831"></script> <script type="text/javascript" src="../js/index.js?v=1661420401680"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,at,在指定时间执行一个任务"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,at,在指定时间执行一个任务">
<title>at 命令Linux at 命令详解:在指定时间执行一个任务 - Linux 命令搜索引擎</title> <title>at 命令Linux at 命令详解:在指定时间执行一个任务 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727888"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401702">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -119,7 +119,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p><strong>at命令</strong> 用于在指定时间执行命令。at允许使用一套相当复杂的指定时间的方法。它能够接受在当天的hh:mm小时:分钟式的时间指定。假如该时间已过去那么就放在第二天执行。当然也能够使用midnight深夜noon中午teatime饮茶时间一般是下午4点等比较模糊的 词语来指定时间。用户还能够采用12小时计时制即在时间后面加上AM上午或PM下午来说明是上午还是下午。 也能够指定命令执行的具体日期指定格式为month day 或mm/dd/yy月/日/年或dd.mm.yy日.月.年)。指定的日期必须跟在指定时间的后面。</p> <p><strong>at命令</strong> 用于在指定时间执行命令。at允许使用一套相当复杂的指定时间的方法。它能够接受在当天的hh:mm小时:分钟式的时间指定。假如该时间已过去那么就放在第二天执行。当然也能够使用midnight深夜noon中午teatime饮茶时间一般是下午4点等比较模糊的 词语来指定时间。用户还能够采用12小时计时制即在时间后面加上AM上午或PM下午来说明是上午还是下午。 也能够指定命令执行的具体日期指定格式为month day 或mm/dd/yy月/日/年或dd.mm.yy日.月.年)。指定的日期必须跟在指定时间的后面。</p>
<p>上面介绍的都是绝对计时法,其实还能够使用相对计时法,这对于安排不久就要执行的命令是很有好处的。指定格式为:<code>now + count time-units</code>now就是当前时间time-units是时间单位这里能够是minutes分钟、hours小时、days、weeks星期。count是时间的数量究竟是几天还是几小时等等。 更有一种计时方法就是直接使用today今天、tomorrow明天来指定完成命令的时间。</p> <p>上面介绍的都是绝对计时法,其实还能够使用相对计时法,这对于安排不久就要执行的命令是很有好处的。指定格式为:<code>now + count time-units</code>now就是当前时间time-units是时间单位这里能够是minutes分钟、hours小时、days、weeks星期。count是时间的数量究竟是几天还是几小时等等。 更有一种计时方法就是直接使用today今天、tomorrow明天来指定完成命令的时间。</p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">at <span class="token punctuation">[</span>-V<span class="token punctuation">]</span> <span class="token punctuation">[</span>-q 队列<span class="token punctuation">]</span> <span class="token punctuation">[</span>-f 文件<span class="token punctuation">]</span> <span class="token punctuation">[</span>-mldbv<span class="token punctuation">]</span> 时间 at -c 作业 <span class="token punctuation">[</span>作业<span class="token punctuation">..</span>.<span class="token punctuation">]</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">at <span class="token punctuation">[</span>-V<span class="token punctuation">]</span> <span class="token punctuation">[</span>-q 队列<span class="token punctuation">]</span> <span class="token punctuation">[</span>-f 文件<span class="token punctuation">]</span> <span class="token punctuation">[</span>-mldbv<span class="token punctuation">]</span> 时间 at <span class="token parameter variable">-c</span> 作业 <span class="token punctuation">[</span>作业<span class="token punctuation">..</span>.<span class="token punctuation">]</span>
</span></code><div onclick="copied(this)" data-code="at [-V] [-q 队列] [-f 文件] [-mldbv] 时间 at -c 作业 [作业...] </span></code><div onclick="copied(this)" data-code="at [-V] [-q 队列] [-f 文件] [-mldbv] 时间 at -c 作业 [作业...]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
@ -195,7 +195,7 @@ job 8 at 2013-01-06 17:20
umask 22此处省略n个字符 umask 22此处省略n个字符
date >/root/2013.log date >/root/2013.log
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -208,31 +208,31 @@ date >/root/2013.log
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -266,7 +266,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727888"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401703"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727888"></script> <script type="text/javascript" src="../js/index.js?v=1661420401703"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,atop,监控Linux系统资源与进程的工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,atop,监控Linux系统资源与进程的工具">
<title>atop 命令Linux atop 命令详解监控Linux系统资源与进程的工具 - Linux 命令搜索引擎</title> <title>atop 命令Linux atop 命令详解监控Linux系统资源与进程的工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727916"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401729">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -180,7 +180,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>设定日志失效期限,自动删除一段时间前的日志文件</li> <li>设定日志失效期限,自动删除一段时间前的日志文件</li>
</ul> </ul>
<p>其实atop开发者已经提供了以上日志保存方式相应的atop.daily脚本可以在源码目录下找到。在atop.daily脚本中我们可以通过修改INTERVAL变量改变atop信息采样周期(默认为10分钟);通过修改以下命令中的数值改变日志保存天数(默认为28天)</p> <p>其实atop开发者已经提供了以上日志保存方式相应的atop.daily脚本可以在源码目录下找到。在atop.daily脚本中我们可以通过修改INTERVAL变量改变atop信息采样周期(默认为10分钟);通过修改以下命令中的数值改变日志保存天数(默认为28天)</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">(</span>sleep <span class="token number">3</span><span class="token punctuation">;</span> <span class="token function">find</span> <span class="token variable">$LOGPATH</span> -name <span class="token string">'atop_*'</span> -mtime +28 -exec <span class="token function">rm</span> <span class="token punctuation">{</span><span class="token punctuation">}</span> <span class="token punctuation">\</span><span class="token punctuation">;</span> <span class="token punctuation">)</span><span class="token operator">&#x26;</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">(</span>sleep <span class="token number">3</span><span class="token punctuation">;</span> <span class="token function">find</span> <span class="token variable">$LOGPATH</span> <span class="token parameter variable">-name</span> <span class="token string">'atop_*'</span> <span class="token parameter variable">-mtime</span> +28 <span class="token parameter variable">-exec</span> <span class="token function">rm</span> <span class="token punctuation">{</span><span class="token punctuation">}</span> <span class="token punctuation">\</span><span class="token punctuation">;</span> <span class="token punctuation">)</span><span class="token operator">&#x26;</span>
</span></code><div onclick="copied(this)" data-code="(sleep 3; find $LOGPATH -name &#x27;atop_*&#x27; -mtime +28 -exec rm {} \; )&#x26; </span></code><div onclick="copied(this)" data-code="(sleep 3; find $LOGPATH -name &#x27;atop_*&#x27; -mtime +28 -exec rm {} \; )&#x26;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>最后我们修改cron文件每天凌晨执行atop.daily脚本</p> <p>最后我们修改cron文件每天凌晨执行atop.daily脚本</p>
@ -191,7 +191,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<ul> <ul>
<li><a href="http://www.atoptool.nl/download/man_atop-1.pdf">官方手册</a></li> <li><a href="http://www.atoptool.nl/download/man_atop-1.pdf">官方手册</a></li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -204,31 +204,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -262,7 +262,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727917"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401729"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727917"></script> <script type="text/javascript" src="../js/index.js?v=1661420401729"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,atq,列出当前用户的at任务列表"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,atq,列出当前用户的at任务列表">
<title>atq 命令Linux atq 命令详解列出当前用户的at任务列表 - Linux 命令搜索引擎</title> <title>atq 命令Linux atq 命令详解列出当前用户的at任务列表 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727928"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401737">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -143,7 +143,7 @@ job 3 at Fri Apr 26 12:56:00 2013
atq atq
3 Fri Apr 26 12:56:00 2013 a root 3 Fri Apr 26 12:56:00 2013 a root
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -156,31 +156,31 @@ atq
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -214,7 +214,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727929"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401738"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727929"></script> <script type="text/javascript" src="../js/index.js?v=1661420401738"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,atrm,删除待执行任务队列中的指定任务"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,atrm,删除待执行任务队列中的指定任务">
<title>atrm 命令Linux atrm 命令详解:删除待执行任务队列中的指定任务 - Linux 命令搜索引擎</title> <title>atrm 命令Linux atrm 命令详解:删除待执行任务队列中的指定任务 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181727942"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401747">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -140,7 +140,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
atrm 2 # 删除任务2 atrm 2 # 删除任务2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -153,31 +153,31 @@ atrm 2 # 删除任务2
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -211,7 +211,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181727943"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401748"></script>
<script type="text/javascript" src="../js/index.js?v=1661181727943"></script> <script type="text/javascript" src="../js/index.js?v=1661420401748"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,awk,文本和数据进行处理的编程语言"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,awk,文本和数据进行处理的编程语言">
<title>awk 命令Linux awk 命令详解:文本和数据进行处理的编程语言 - Linux 命令搜索引擎</title> <title>awk 命令Linux awk 命令详解:文本和数据进行处理的编程语言 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728272"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402040">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -120,7 +120,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h2 id="awk命令格式和选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#awk命令格式和选项"><span class="octicon octicon-link"></span></a>awk命令格式和选项</h2> <h2 id="awk命令格式和选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#awk命令格式和选项"><span class="octicon octicon-link"></span></a>awk命令格式和选项</h2>
<p><strong>语法形式</strong></p> <p><strong>语法形式</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">awk</span> <span class="token punctuation">[</span>options<span class="token punctuation">]</span> <span class="token string">'script'</span> <span class="token assign-left variable">var</span><span class="token operator">=</span>value file<span class="token punctuation">(</span>s<span class="token punctuation">)</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">awk</span> <span class="token punctuation">[</span>options<span class="token punctuation">]</span> <span class="token string">'script'</span> <span class="token assign-left variable">var</span><span class="token operator">=</span>value file<span class="token punctuation">(</span>s<span class="token punctuation">)</span>
</span><span class="code-line line-number" line="2"><span class="token function">awk</span> <span class="token punctuation">[</span>options<span class="token punctuation">]</span> -f scriptfile <span class="token assign-left variable">var</span><span class="token operator">=</span>value file<span class="token punctuation">(</span>s<span class="token punctuation">)</span> </span><span class="code-line line-number" line="2"><span class="token function">awk</span> <span class="token punctuation">[</span>options<span class="token punctuation">]</span> <span class="token parameter variable">-f</span> scriptfile <span class="token assign-left variable">var</span><span class="token operator">=</span>value file<span class="token punctuation">(</span>s<span class="token punctuation">)</span>
</span></code><div onclick="copied(this)" data-code="awk [options] &#x27;script&#x27; var=value file(s) </span></code><div onclick="copied(this)" data-code="awk [options] &#x27;script&#x27; var=value file(s)
awk [options] -f scriptfile var=value file(s) awk [options] -f scriptfile var=value file(s)
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
@ -170,7 +170,7 @@ awk [options] -f scriptfile var=value file(s)
<p><strong>END语句块</strong> 在awk从输入流中读取完所有的行 <strong>之后</strong> 即被执行比如打印所有行的分析结果这类信息汇总都是在END语句块中完成它也是一个可选语句块。</p> <p><strong>END语句块</strong> 在awk从输入流中读取完所有的行 <strong>之后</strong> 即被执行比如打印所有行的分析结果这类信息汇总都是在END语句块中完成它也是一个可选语句块。</p>
<p><strong>pattern语句块</strong> 中的通用命令是最重要的部分它也是可选的。如果没有提供pattern语句块则默认执行<code>{ print }</code>即打印每一个读取到的行awk读取的每一行都会执行该语句块。</p> <p><strong>pattern语句块</strong> 中的通用命令是最重要的部分它也是可选的。如果没有提供pattern语句块则默认执行<code>{ print }</code>即打印每一个读取到的行awk读取的每一行都会执行该语句块。</p>
<p><strong>示例</strong></p> <p><strong>示例</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> -e <span class="token string">"A line 1<span class="token entity" title="\n">\n</span>A line 2"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'BEGIN{ print "Start" } { print } END{ print "End" }'</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> <span class="token parameter variable">-e</span> <span class="token string">"A line 1<span class="token entity" title="\n">\n</span>A line 2"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'BEGIN{ print "Start" } { print } END{ print "End" }'</span>
</span><span class="code-line line-number" line="2">Start </span><span class="code-line line-number" line="2">Start
</span><span class="code-line line-number" line="3">A line <span class="token number">1</span> </span><span class="code-line line-number" line="3">A line <span class="token number">1</span>
</span><span class="code-line line-number" line="4">A line <span class="token number">2</span> </span><span class="code-line line-number" line="4">A line <span class="token number">2</span>
@ -258,7 +258,7 @@ v1=v2=v3
\c 取消换行 \c 取消换行
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>示例</strong></p> <p><strong>示例</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> -e <span class="token string">"line1 f2 f3<span class="token entity" title="\n">\n</span>line2 f4 f5<span class="token entity" title="\n">\n</span>line3 f6 f7"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{print "Line No:"NR", No of fields:"NF, "$0="$0, "$1="$1, "$2="$2, "$3="$3}'</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> <span class="token parameter variable">-e</span> <span class="token string">"line1 f2 f3<span class="token entity" title="\n">\n</span>line2 f4 f5<span class="token entity" title="\n">\n</span>line3 f6 f7"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{print "Line No:"NR", No of fields:"NF, "$0="$0, "$1="$1, "$2="$2, "$3="$3}'</span>
</span><span class="code-line line-number" line="2">Line No:1, No of fields:3 <span class="token variable">$0</span><span class="token operator">=</span>line1 f2 f3 <span class="token variable">$1</span><span class="token operator">=</span>line1 <span class="token variable">$2</span><span class="token operator">=</span>f2 <span class="token variable">$3</span><span class="token operator">=</span>f3 </span><span class="code-line line-number" line="2">Line No:1, No of fields:3 <span class="token variable">$0</span><span class="token operator">=</span>line1 f2 f3 <span class="token variable">$1</span><span class="token operator">=</span>line1 <span class="token variable">$2</span><span class="token operator">=</span>f2 <span class="token variable">$3</span><span class="token operator">=</span>f3
</span><span class="code-line line-number" line="3">Line No:2, No of fields:3 <span class="token variable">$0</span><span class="token operator">=</span>line2 f4 f5 <span class="token variable">$1</span><span class="token operator">=</span>line2 <span class="token variable">$2</span><span class="token operator">=</span>f4 <span class="token variable">$3</span><span class="token operator">=</span>f5 </span><span class="code-line line-number" line="3">Line No:2, No of fields:3 <span class="token variable">$0</span><span class="token operator">=</span>line2 f4 f5 <span class="token variable">$1</span><span class="token operator">=</span>line2 <span class="token variable">$2</span><span class="token operator">=</span>f4 <span class="token variable">$3</span><span class="token operator">=</span>f5
</span><span class="code-line line-number" line="4">Line No:3, No of fields:3 <span class="token variable">$0</span><span class="token operator">=</span>line3 f6 f7 <span class="token variable">$1</span><span class="token operator">=</span>line3 <span class="token variable">$2</span><span class="token operator">=</span>f6 <span class="token variable">$3</span><span class="token operator">=</span>f7 </span><span class="code-line line-number" line="4">Line No:3, No of fields:3 <span class="token variable">$0</span><span class="token operator">=</span>line3 f6 f7 <span class="token variable">$1</span><span class="token operator">=</span>line3 <span class="token variable">$2</span><span class="token operator">=</span>f6 <span class="token variable">$3</span><span class="token operator">=</span>f7
@ -268,14 +268,14 @@ Line No:2, No of fields:3 $0=line2 f4 f5 $1=line2 $2=f4 $3=f5
Line No:3, No of fields:3 $0=line3 f6 f7 $1=line3 $2=f6 $3=f7 Line No:3, No of fields:3 $0=line3 f6 f7 $1=line3 $2=f6 $3=f7
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>使用<code>print $NF</code>可以打印出一行中的最后一个字段,使用<code>$(NF-1)</code>则是打印倒数第二个字段,其他以此类推:</p> <p>使用<code>print $NF</code>可以打印出一行中的最后一个字段,使用<code>$(NF-1)</code>则是打印倒数第二个字段,其他以此类推:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> -e <span class="token string">"line1 f2 f3<span class="token entity" title="\n">\n</span> line2 f4 f5"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{print $NF}'</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> <span class="token parameter variable">-e</span> <span class="token string">"line1 f2 f3<span class="token entity" title="\n">\n</span> line2 f4 f5"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{print $NF}'</span>
</span><span class="code-line line-number" line="2">f3 </span><span class="code-line line-number" line="2">f3
</span><span class="code-line line-number" line="3">f5 </span><span class="code-line line-number" line="3">f5
</span></code><div onclick="copied(this)" data-code="echo -e &#x22;line1 f2 f3\n line2 f4 f5&#x22; | awk &#x27;{print $NF}&#x27; </span></code><div onclick="copied(this)" data-code="echo -e &#x22;line1 f2 f3\n line2 f4 f5&#x22; | awk &#x27;{print $NF}&#x27;
f3 f3
f5 f5
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> -e <span class="token string">"line1 f2 f3<span class="token entity" title="\n">\n</span> line2 f4 f5"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{print $(NF-1)}'</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">echo</span> <span class="token parameter variable">-e</span> <span class="token string">"line1 f2 f3<span class="token entity" title="\n">\n</span> line2 f4 f5"</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{print $(NF-1)}'</span>
</span><span class="code-line line-number" line="2">f2 </span><span class="code-line line-number" line="2">f2
</span><span class="code-line line-number" line="3">f4 </span><span class="code-line line-number" line="3">f4
</span><span class="code-line line-number" line="4"> </span><span class="code-line line-number" line="4">
@ -316,7 +316,7 @@ f4
<h2 id="将外部变量值传递给awk"><a class="anchor" aria-hidden="true" tabindex="-1" href="#将外部变量值传递给awk"><span class="octicon octicon-link"></span></a>将外部变量值传递给awk</h2> <h2 id="将外部变量值传递给awk"><a class="anchor" aria-hidden="true" tabindex="-1" href="#将外部变量值传递给awk"><span class="octicon octicon-link"></span></a>将外部变量值传递给awk</h2>
<p>借助 <strong><code>-v</code>选项</strong> 可以将外部值并非来自stdin传递给awk</p> <p>借助 <strong><code>-v</code>选项</strong> 可以将外部值并非来自stdin传递给awk</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token assign-left variable">VAR</span><span class="token operator">=</span><span class="token number">10000</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token assign-left variable">VAR</span><span class="token operator">=</span><span class="token number">10000</span>
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">echo</span> <span class="token operator">|</span> <span class="token function">awk</span> -v <span class="token assign-left variable">VARIABLE</span><span class="token operator">=</span><span class="token variable">$VAR</span> <span class="token string">'{ print VARIABLE }'</span> </span><span class="code-line line-number" line="2"><span class="token builtin class-name">echo</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token parameter variable">-v</span> <span class="token assign-left variable">VARIABLE</span><span class="token operator">=</span><span class="token variable">$VAR</span> <span class="token string">'{ print VARIABLE }'</span>
</span></code><div onclick="copied(this)" data-code="VAR=10000 </span></code><div onclick="copied(this)" data-code="VAR=10000
echo | awk -v VARIABLE=$VAR &#x27;{ print VARIABLE }&#x27; echo | awk -v VARIABLE=$VAR &#x27;{ print VARIABLE }&#x27;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
@ -334,7 +334,7 @@ echo | awk &#x27;{ print v1,v2 }&#x27; v1=$var1 v2=$var2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>以上方法中变量之间用空格分隔作为awk的命令行参数跟随在BEGIN、{}和END语句块之后。</p> <p>以上方法中变量之间用空格分隔作为awk的命令行参数跟随在BEGIN、{}和END语句块之后。</p>
<h2 id="查找进程pid"><a class="anchor" aria-hidden="true" tabindex="-1" href="#查找进程pid"><span class="octicon octicon-link"></span></a>查找进程pid</h2> <h2 id="查找进程pid"><a class="anchor" aria-hidden="true" tabindex="-1" href="#查找进程pid"><span class="octicon octicon-link"></span></a>查找进程pid</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">netstat</span> -antup <span class="token operator">|</span> <span class="token function">grep</span> <span class="token number">7770</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{ print $NF NR}'</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{ print $1}'</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">netstat</span> <span class="token parameter variable">-antup</span> <span class="token operator">|</span> <span class="token function">grep</span> <span class="token number">7770</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{ print $NF NR}'</span> <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'{ print $1}'</span>
</span></code><div onclick="copied(this)" data-code="netstat -antup | grep 7770 | awk &#x27;{ print $NF NR}&#x27; | awk &#x27;{ print $1}&#x27; </span></code><div onclick="copied(this)" data-code="netstat -antup | grep 7770 | awk &#x27;{ print $NF NR}&#x27; | awk &#x27;{ print $1}&#x27;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h2 id="awk运算与判断"><a class="anchor" aria-hidden="true" tabindex="-1" href="#awk运算与判断"><span class="octicon octicon-link"></span></a>awk运算与判断</h2> <h2 id="awk运算与判断"><a class="anchor" aria-hidden="true" tabindex="-1" href="#awk运算与判断"><span class="octicon octicon-link"></span></a>awk运算与判断</h2>
@ -1429,7 +1429,7 @@ drwxr-xr-x 95 root root 4096 10-08 14:01 ..
</tr> </tr>
</tbody> </tbody>
</table> </table>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -1442,31 +1442,31 @@ drwxr-xr-x 95 root root 4096 10-08 14:01 ..
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -1500,7 +1500,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728272"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402041"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728272"></script> <script type="text/javascript" src="../js/index.js?v=1661420402041"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,axel,多线程下载工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,axel,多线程下载工具">
<title>axel 命令Linux axel 命令详解:多线程下载工具 - Linux 命令搜索引擎</title> <title>axel 命令Linux axel 命令详解:多线程下载工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728296"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420401764">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -121,14 +121,14 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>CentOS安装Axel</p> <p>CentOS安装Axel</p>
<p>目前yum源上没有Axel我们可以到 <a href="http://pkgs.repoforge.org/axel/">http://pkgs.repoforge.org/axel/</a> 下载rpm包安装。</p> <p>目前yum源上没有Axel我们可以到 <a href="http://pkgs.repoforge.org/axel/">http://pkgs.repoforge.org/axel/</a> 下载rpm包安装。</p>
<p>32位CentOS执行下面命令</p> <p>32位CentOS执行下面命令</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">wget</span> -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.i386.rpm <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">wget</span> <span class="token parameter variable">-c</span> http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.i386.rpm
</span><span class="code-line line-number" line="2"><span class="token function">rpm</span> -ivh axel-2.4-1.el5.rf.i386.rpm </span><span class="code-line line-number" line="2"><span class="token function">rpm</span> <span class="token parameter variable">-ivh</span> axel-2.4-1.el5.rf.i386.rpm
</span></code><div onclick="copied(this)" data-code="wget -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.i386.rpm </span></code><div onclick="copied(this)" data-code="wget -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.i386.rpm
rpm -ivh axel-2.4-1.el5.rf.i386.rpm rpm -ivh axel-2.4-1.el5.rf.i386.rpm
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>64位CentOS执行下面命令</p> <p>64位CentOS执行下面命令</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">wget</span> -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.x86_64.rpm <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">wget</span> <span class="token parameter variable">-c</span> http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.x86_64.rpm
</span><span class="code-line line-number" line="2"><span class="token function">rpm</span> -ivh axel-2.4-1.el5.rf.x86_64.rpm </span><span class="code-line line-number" line="2"><span class="token function">rpm</span> <span class="token parameter variable">-ivh</span> axel-2.4-1.el5.rf.x86_64.rpm
</span></code><div onclick="copied(this)" data-code="wget -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.x86_64.rpm </span></code><div onclick="copied(this)" data-code="wget -c http://pkgs.repoforge.org/axel/axel-2.4-1.el5.rf.x86_64.rpm
rpm -ivh axel-2.4-1.el5.rf.x86_64.rpm rpm -ivh axel-2.4-1.el5.rf.x86_64.rpm
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
@ -141,18 +141,18 @@ rpm -ivh axel-2.4-1.el5.rf.x86_64.rpm
</span></code><div onclick="copied(this)" data-code="axel [options] url1 [url2] [url...] </span></code><div onclick="copied(this)" data-code="axel [options] url1 [url2] [url...]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">--max-speed<span class="token operator">=</span>x , -s x <span class="token comment"># 最高速度x</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">--max-speed<span class="token operator">=</span>x , <span class="token parameter variable">-s</span> x <span class="token comment"># 最高速度x</span>
</span><span class="code-line line-number" line="2">--num-connections<span class="token operator">=</span>x , -n x <span class="token comment"># 连接数x</span> </span><span class="code-line line-number" line="2">--num-connections<span class="token operator">=</span>x , <span class="token parameter variable">-n</span> x <span class="token comment"># 连接数x</span>
</span><span class="code-line line-number" line="3">--output<span class="token operator">=</span>f , -o f <span class="token comment"># 下载为本地文件f</span> </span><span class="code-line line-number" line="3"><span class="token parameter variable">--output</span><span class="token operator">=</span>f , <span class="token parameter variable">-o</span> f <span class="token comment"># 下载为本地文件f</span>
</span><span class="code-line line-number" line="4">--search<span class="token punctuation">[</span><span class="token operator">=</span>x<span class="token punctuation">]</span> , -S <span class="token punctuation">[</span>x<span class="token punctuation">]</span> <span class="token comment"># 搜索镜像</span> </span><span class="code-line line-number" line="4">--search<span class="token punctuation">[</span><span class="token operator">=</span>x<span class="token punctuation">]</span> , <span class="token parameter variable">-S</span> <span class="token punctuation">[</span>x<span class="token punctuation">]</span> <span class="token comment"># 搜索镜像</span>
</span><span class="code-line line-number" line="5">--header<span class="token operator">=</span>x , -H x <span class="token comment"># 添加头文件字符串x指定 HTTP header</span> </span><span class="code-line line-number" line="5"><span class="token parameter variable">--header</span><span class="token operator">=</span>x , <span class="token parameter variable">-H</span> x <span class="token comment"># 添加头文件字符串x指定 HTTP header</span>
</span><span class="code-line line-number" line="6">--user-agent<span class="token operator">=</span>x , -U x <span class="token comment"># 设置用户代理(指定 HTTP user agent</span> </span><span class="code-line line-number" line="6">--user-agent<span class="token operator">=</span>x , <span class="token parameter variable">-U</span> x <span class="token comment"># 设置用户代理(指定 HTTP user agent</span>
</span><span class="code-line line-number" line="7">--no-proxy -N <span class="token comment"># 不使用代理服务器</span> </span><span class="code-line line-number" line="7">--no-proxy <span class="token parameter variable">-N</span> <span class="token comment"># 不使用代理服务器</span>
</span><span class="code-line line-number" line="8">--quiet -q <span class="token comment"># 静默模式</span> </span><span class="code-line line-number" line="8"><span class="token parameter variable">--quiet</span> <span class="token parameter variable">-q</span> <span class="token comment"># 静默模式</span>
</span><span class="code-line line-number" line="9">--verbose -v <span class="token comment"># 更多状态信息</span> </span><span class="code-line line-number" line="9"><span class="token parameter variable">--verbose</span> -v <span class="token comment"># 更多状态信息</span>
</span><span class="code-line line-number" line="10">--alternate -a <span class="token comment"># Alternate progress indicator</span> </span><span class="code-line line-number" line="10"><span class="token parameter variable">--alternate</span> <span class="token parameter variable">-a</span> <span class="token comment"># Alternate progress indicator</span>
</span><span class="code-line line-number" line="11">--help -h <span class="token comment"># 帮助</span> </span><span class="code-line line-number" line="11"><span class="token parameter variable">--help</span> -h <span class="token comment"># 帮助</span>
</span><span class="code-line line-number" line="12">--version -V <span class="token comment"># 版本信息</span> </span><span class="code-line line-number" line="12"><span class="token parameter variable">--version</span> -V <span class="token comment"># 版本信息</span>
</span></code><div onclick="copied(this)" data-code="--max-speed=x , -s x # 最高速度x </span></code><div onclick="copied(this)" data-code="--max-speed=x , -s x # 最高速度x
--num-connections=x , -n x # 连接数x --num-connections=x , -n x # 连接数x
--output=f , -o f # 下载为本地文件f --output=f , -o f # 下载为本地文件f
@ -168,11 +168,11 @@ rpm -ivh axel-2.4-1.el5.rf.x86_64.rpm
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>如下载lnmp安装包指定10个线程存到 <code>/tmp/</code></p> <p>如下载lnmp安装包指定10个线程存到 <code>/tmp/</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">axel -n <span class="token number">10</span> -o /tmp/ http://www.jsdig.com/lnmp.tar.gz <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">axel <span class="token parameter variable">-n</span> <span class="token number">10</span> <span class="token parameter variable">-o</span> /tmp/ http://www.jsdig.com/lnmp.tar.gz
</span></code><div onclick="copied(this)" data-code="axel -n 10 -o /tmp/ http://www.jsdig.com/lnmp.tar.gz </span></code><div onclick="copied(this)" data-code="axel -n 10 -o /tmp/ http://www.jsdig.com/lnmp.tar.gz
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>如果下载过程中下载中断可以再执行下载命令即可恢复上次的下载进度。</p> <p>如果下载过程中下载中断可以再执行下载命令即可恢复上次的下载进度。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -185,31 +185,31 @@ rpm -ivh axel-2.4-1.el5.rf.x86_64.rpm
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -243,7 +243,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728297"></script> <script type="text/javascript" src="../js/dt.js?v=1661420401765"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728297"></script> <script type="text/javascript" src="../js/index.js?v=1661420401765"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,badblocks,查找磁盘中损坏的区块"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,badblocks,查找磁盘中损坏的区块">
<title>badblocks 命令Linux badblocks 命令详解:查找磁盘中损坏的区块 - Linux 命令搜索引擎</title> <title>badblocks 命令Linux badblocks 命令详解:查找磁盘中损坏的区块 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728315"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402058">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -141,7 +141,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</ul> </ul>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>badblocks以 4096 的一个block每一个block检查16次将结果输出到“hda-badblocks-list”文件里。</p> <p>badblocks以 4096 的一个block每一个block检查16次将结果输出到“hda-badblocks-list”文件里。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">badblocks -b <span class="token number">4096</span> -c <span class="token number">16</span> /dev/hda1 -o hda-badblocks-list <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">badblocks <span class="token parameter variable">-b</span> <span class="token number">4096</span> <span class="token parameter variable">-c</span> <span class="token number">16</span> /dev/hda1 <span class="token parameter variable">-o</span> hda-badblocks-list
</span></code><div onclick="copied(this)" data-code="badblocks -b 4096 -c 16 /dev/hda1 -o hda-badblocks-list </span></code><div onclick="copied(this)" data-code="badblocks -b 4096 -c 16 /dev/hda1 -o hda-badblocks-list
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>hda-badblocks-list是个文本文件内容如下</p> <p>hda-badblocks-list是个文本文件内容如下</p>
@ -165,7 +165,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
…… ……
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>可以针对可疑的区块多做几次操作。下面badblocks以4096字节为一个“block”,每一个“block”检查1次, 将结果输出到“hda-badblocks-list.1”文件中由第51000 block开始到63000 block结束。</p> <p>可以针对可疑的区块多做几次操作。下面badblocks以4096字节为一个“block”,每一个“block”检查1次, 将结果输出到“hda-badblocks-list.1”文件中由第51000 block开始到63000 block结束。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">badblocks -b <span class="token number">4096</span> -c <span class="token number">1</span> /dev/hda1 -o hda-badblocks-list.1 <span class="token number">63000</span> <span class="token number">51000</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">badblocks <span class="token parameter variable">-b</span> <span class="token number">4096</span> <span class="token parameter variable">-c</span> <span class="token number">1</span> /dev/hda1 <span class="token parameter variable">-o</span> hda-badblocks-list.1 <span class="token number">63000</span> <span class="token number">51000</span>
</span></code><div onclick="copied(this)" data-code="badblocks -b 4096 -c 1 /dev/hda1 -o hda-badblocks-list.1 63000 51000 </span></code><div onclick="copied(this)" data-code="badblocks -b 4096 -c 1 /dev/hda1 -o hda-badblocks-list.1 63000 51000
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这次花费的时间比较短硬盘在指定的情况下在很短的时间就产生“嘎嘎嘎嘎”的响声。由于检查条件的不同其输出的结果也不完全是相同的。重复几次同样的操作因条件多少都有些不同所以结果也有所不同。进行多次操作后直到产生最后的hda-badblock-list.final文件。</p> <p>这次花费的时间比较短硬盘在指定的情况下在很短的时间就产生“嘎嘎嘎嘎”的响声。由于检查条件的不同其输出的结果也不完全是相同的。重复几次同样的操作因条件多少都有些不同所以结果也有所不同。进行多次操作后直到产生最后的hda-badblock-list.final文件。</p>
@ -177,12 +177,12 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>2、在创建文件系统前检测坏道</strong></p> <p><strong>2、在创建文件系统前检测坏道</strong></p>
<p>badblocks可以随e2fsck和mke2fs的-c删除一起运行对ext3文件系统也一样在创建文件系统前就先检测坏道信息</p> <p>badblocks可以随e2fsck和mke2fs的-c删除一起运行对ext3文件系统也一样在创建文件系统前就先检测坏道信息</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">mkfs.ext3 -c /dev/hda1 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">mkfs.ext3 <span class="token parameter variable">-c</span> /dev/hda1
</span></code><div onclick="copied(this)" data-code="mkfs.ext3 -c /dev/hda1 </span></code><div onclick="copied(this)" data-code="mkfs.ext3 -c /dev/hda1
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>代码表示使用-c在创建文件系统前检查坏道的硬盘。</p> <p>代码表示使用-c在创建文件系统前检查坏道的硬盘。</p>
<p>这个操作已经很清楚地告知我们可以采用<code>mkfs.ext3 -c</code>选项用<code>read-only</code>方式检查硬盘。这个命令会在格式化硬盘时检查硬盘并标出错误的硬盘“block”。用这个方法格式化硬盘需要有相当大的耐心因为命令运行后会一个个用读的方式检查硬盘。</p> <p>这个操作已经很清楚地告知我们可以采用<code>mkfs.ext3 -c</code>选项用<code>read-only</code>方式检查硬盘。这个命令会在格式化硬盘时检查硬盘并标出错误的硬盘“block”。用这个方法格式化硬盘需要有相当大的耐心因为命令运行后会一个个用读的方式检查硬盘。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -195,31 +195,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -253,7 +253,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728316"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402059"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728316"></script> <script type="text/javascript" src="../js/index.js?v=1661420402059"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,base64,base64 编码/解码文件或标准输入输出"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,base64,base64 编码/解码文件或标准输入输出">
<title>base64 命令Linux base64 命令详解base64 编码/解码文件或标准输入输出 - Linux 命令搜索引擎</title> <title>base64 命令Linux base64 命令详解base64 编码/解码文件或标准输入输出 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728327"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402069">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -122,12 +122,12 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="base64 [OPTION]... [FILE] </span></code><div onclick="copied(this)" data-code="base64 [OPTION]... [FILE]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-d, --decode <span class="token comment"># 解码</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-d, <span class="token parameter variable">--decode</span> <span class="token comment"># 解码</span>
</span><span class="code-line line-number" line="2">-i, --ignore-garbage <span class="token comment"># 解码时,忽略非字母字符</span> </span><span class="code-line line-number" line="2">-i, --ignore-garbage <span class="token comment"># 解码时,忽略非字母字符</span>
</span><span class="code-line line-number" line="3">-w, --wrap<span class="token operator">=</span>COLS <span class="token comment"># 在指定的字符数后自动换行(默认为76), 0 为禁用自动换行</span> </span><span class="code-line line-number" line="3">-w, <span class="token parameter variable">--wrap</span><span class="token operator">=</span>COLS <span class="token comment"># 在指定的字符数后自动换行(默认为76), 0 为禁用自动换行</span>
</span><span class="code-line line-number" line="4"> </span><span class="code-line line-number" line="4">
</span><span class="code-line line-number" line="5">--help <span class="token comment"># 显示此帮助说明并退出</span> </span><span class="code-line line-number" line="5"><span class="token parameter variable">--help</span> <span class="token comment"># 显示此帮助说明并退出</span>
</span><span class="code-line line-number" line="6">--version <span class="token comment"># 输出版本信息并退出</span> </span><span class="code-line line-number" line="6"><span class="token parameter variable">--version</span> <span class="token comment"># 输出版本信息并退出</span>
</span></code><div onclick="copied(this)" data-code="-d, --decode # 解码 </span></code><div onclick="copied(this)" data-code="-d, --decode # 解码
-i, --ignore-garbage # 解码时,忽略非字母字符 -i, --ignore-garbage # 解码时,忽略非字母字符
-w, --wrap=COLS # 在指定的字符数后自动换行(默认为76), 0 为禁用自动换行 -w, --wrap=COLS # 在指定的字符数后自动换行(默认为76), 0 为禁用自动换行
@ -145,14 +145,14 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="base64 file </span></code><div onclick="copied(this)" data-code="base64 file
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>解码</p> <p>解码</p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">printf</span> Zm9v<span class="token operator">|</span>base64 -d <pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">printf</span> Zm9v<span class="token operator">|</span>base64 <span class="token parameter variable">-d</span>
</span></code><div onclick="copied(this)" data-code="printf Zm9v|base64 -d </span></code><div onclick="copied(this)" data-code="printf Zm9v|base64 -d
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>解码文件</p> <p>解码文件</p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">base64 -d <span class="token function">file</span> <pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">base64 <span class="token parameter variable">-d</span> <span class="token function">file</span>
</span></code><div onclick="copied(this)" data-code="base64 -d file </span></code><div onclick="copied(this)" data-code="base64 -d file
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -165,31 +165,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -223,7 +223,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728328"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402069"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728328"></script> <script type="text/javascript" src="../js/index.js?v=1661420402069"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,basename,打印目录或者文件的基本名称"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,basename,打印目录或者文件的基本名称">
<title>basename 命令Linux basename 命令详解:打印目录或者文件的基本名称 - Linux 命令搜索引擎</title> <title>basename 命令Linux basename 命令详解:打印目录或者文件的基本名称 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728337"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402077">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -143,7 +143,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="OFILE=&#x60;basename $1 .c&#x60;.o </span></code><div onclick="copied(this)" data-code="OFILE=&#x60;basename $1 .c&#x60;.o
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>此命令指定给 OFILE 文件第一个位置上的参数($1的值但它的 .c 后缀更改至 .o。如果 $1 是 /home/jim/program.c 文件,则 OFILE 成为 program.o。因为 program.o 仅是一个基本文件名称,它标识在当前目录中的文件。</p> <p>此命令指定给 OFILE 文件第一个位置上的参数($1的值但它的 .c 后缀更改至 .o。如果 $1 是 /home/jim/program.c 文件,则 OFILE 成为 program.o。因为 program.o 仅是一个基本文件名称,它标识在当前目录中的文件。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -156,31 +156,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -214,7 +214,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728338"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402078"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728338"></script> <script type="text/javascript" src="../js/index.js?v=1661420402078"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,batch,在系统不繁忙的时候执行定时任务"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,batch,在系统不繁忙的时候执行定时任务">
<title>batch 命令Linux batch 命令详解:在系统不繁忙的时候执行定时任务 - Linux 命令搜索引擎</title> <title>batch 命令Linux batch 命令详解:在系统不繁忙的时候执行定时任务 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728346"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402102">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -141,7 +141,7 @@ at> echo 1234
at> <EOT> at> <EOT>
job 5 at Sun Apr 28 08:49:00 2013 job 5 at Sun Apr 28 08:49:00 2013
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -154,31 +154,31 @@ job 5 at Sun Apr 28 08:49:00 2013
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -212,7 +212,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728347"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402103"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728347"></script> <script type="text/javascript" src="../js/index.js?v=1661420402103"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bc,算术操作精密运算工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bc,算术操作精密运算工具">
<title>bc 命令Linux bc 命令详解:算术操作精密运算工具 - Linux 命令搜索引擎</title> <title>bc 命令Linux bc 命令详解:算术操作精密运算工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728366"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402094">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -182,7 +182,7 @@ echo &#x22;obase=10;ibase=2;$abc&#x22; | bc
</span></code><div onclick="copied(this)" data-code="echo &#x22;10^10&#x22; | bc </span></code><div onclick="copied(this)" data-code="echo &#x22;10^10&#x22; | bc
echo &#x22;sqrt(100)&#x22; | bc echo &#x22;sqrt(100)&#x22; | bc
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -195,31 +195,31 @@ echo &#x22;sqrt(100)&#x22; | bc
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -253,7 +253,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728367"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402095"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728367"></script> <script type="text/javascript" src="../js/index.js?v=1661420402095"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bg,将前台终端作业移动到后台运行"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bg,将前台终端作业移动到后台运行">
<title>bg 命令Linux bg 命令详解:将前台终端作业移动到后台运行 - Linux 命令搜索引擎</title> <title>bg 命令Linux bg 命令详解:将前台终端作业移动到后台运行 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728379"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402115">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -160,7 +160,7 @@ bg %1
<li>该命令需要<code>set</code>选项<code>monitor</code>处于开启状态时才能执行;查看作业控制状态:输入<code>set -o</code>查看<code>monitor</code>行;执行<code>set -o monitor</code><code>set -m</code>开启该选项。</li> <li>该命令需要<code>set</code>选项<code>monitor</code>处于开启状态时才能执行;查看作业控制状态:输入<code>set -o</code>查看<code>monitor</code>行;执行<code>set -o monitor</code><code>set -m</code>开启该选项。</li>
<li>该命令是bash内建命令相关的帮助信息请查看<code>help</code>命令。</li> <li>该命令是bash内建命令相关的帮助信息请查看<code>help</code>命令。</li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -173,31 +173,31 @@ bg %1
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -231,7 +231,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728380"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402116"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728380"></script> <script type="text/javascript" src="../js/index.js?v=1661420402116"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bind,显示或设置键盘按键与其相关的功能"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bind,显示或设置键盘按键与其相关的功能">
<title>bind 命令Linux bind 命令详解:显示或设置键盘按键与其相关的功能 - Linux 命令搜索引擎</title> <title>bind 命令Linux bind 命令详解:显示或设置键盘按键与其相关的功能 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728393"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402126">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -136,11 +136,11 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
-v列出目前的按键配置与其功能。 -v列出目前的按键配置与其功能。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">bind</span> -x <span class="token string">'"\C-l":ls -l'</span> <span class="token comment">#直接按 CTRL+L 就列出目录</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token builtin class-name">bind</span> <span class="token parameter variable">-x</span> <span class="token string">'"\C-l":ls -l'</span> <span class="token comment">#直接按 CTRL+L 就列出目录</span>
</span></code><div onclick="copied(this)" data-code="bind -x &#x27;&#x22;\C-l&#x22;:ls -l&#x27; #直接按 CTRL+L 就列出目录 </span></code><div onclick="copied(this)" data-code="bind -x &#x27;&#x22;\C-l&#x22;:ls -l&#x27; #直接按 CTRL+L 就列出目录
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>其中keyseq可以使用<code>showkey -a</code>命令来获取:</p> <p>其中keyseq可以使用<code>showkey -a</code>命令来获取:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">showkey -a <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">showkey <span class="token parameter variable">-a</span>
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">Press any keys - Ctrl-D will terminate this program </span><span class="code-line line-number" line="3">Press any keys - Ctrl-D will terminate this program
</span><span class="code-line line-number" line="4"> </span><span class="code-line line-number" line="4">
@ -181,7 +181,7 @@ Press any keys - Ctrl-D will terminate this program
^C 3 0003 0x03 Ctrl-C ^C 3 0003 0x03 Ctrl-C
^D 4 0004 0x04 Ctrl-D 退出 ^D 4 0004 0x04 Ctrl-D 退出
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -194,31 +194,31 @@ Press any keys - Ctrl-D will terminate this program
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -252,7 +252,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728393"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402127"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728393"></script> <script type="text/javascript" src="../js/index.js?v=1661420402127"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,blkid,查看块设备的文件系统类型、LABEL、UUID等信息"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,blkid,查看块设备的文件系统类型、LABEL、UUID等信息">
<title>blkid 命令Linux blkid 命令详解查看块设备的文件系统类型、LABEL、UUID等信息 - Linux 命令搜索引擎</title> <title>blkid 命令Linux blkid 命令详解查看块设备的文件系统类型、LABEL、UUID等信息 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728416"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402148">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -118,37 +118,37 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h2 id="补充说明"><a class="anchor" aria-hidden="true" tabindex="-1" href="#补充说明"><span class="octicon octicon-link"></span></a>补充说明</h2> <h2 id="补充说明"><a class="anchor" aria-hidden="true" tabindex="-1" href="#补充说明"><span class="octicon octicon-link"></span></a>补充说明</h2>
<p>在Linux下可以使用 <strong>blkid命令</strong> 对查询设备上所采用文件系统类型进行查询。blkid主要用来对系统的块设备包括交换分区所使用的文件系统类型、LABEL、UUID等信息进行查询。要使用这个命令必须安装e2fsprogs软件包。</p> <p>在Linux下可以使用 <strong>blkid命令</strong> 对查询设备上所采用文件系统类型进行查询。blkid主要用来对系统的块设备包括交换分区所使用的文件系统类型、LABEL、UUID等信息进行查询。要使用这个命令必须安装e2fsprogs软件包。</p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blkid -L <span class="token operator">|</span> -U <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blkid <span class="token parameter variable">-L</span> <span class="token operator">|</span> <span class="token parameter variable">-U</span>
</span><span class="code-line line-number" line="2">blkid <span class="token punctuation">[</span>-c <span class="token punctuation">]</span> <span class="token punctuation">[</span>-ghlLv<span class="token punctuation">]</span> <span class="token punctuation">[</span>-o<span class="token punctuation">]</span> <span class="token punctuation">[</span>-s <span class="token punctuation">]</span><span class="token punctuation">[</span>-t <span class="token punctuation">]</span> -<span class="token punctuation">[</span>w <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token punctuation">..</span>.<span class="token punctuation">]</span> </span><span class="code-line line-number" line="2">blkid <span class="token punctuation">[</span>-c <span class="token punctuation">]</span> <span class="token punctuation">[</span>-ghlLv<span class="token punctuation">]</span> <span class="token punctuation">[</span>-o<span class="token punctuation">]</span> <span class="token punctuation">[</span>-s <span class="token punctuation">]</span><span class="token punctuation">[</span>-t <span class="token punctuation">]</span> -<span class="token punctuation">[</span>w <span class="token punctuation">]</span> <span class="token punctuation">[</span> <span class="token punctuation">..</span>.<span class="token punctuation">]</span>
</span><span class="code-line line-number" line="3">blkid -p <span class="token punctuation">[</span>-s <span class="token punctuation">]</span> <span class="token punctuation">[</span>-O <span class="token punctuation">]</span> <span class="token punctuation">[</span>-S <span class="token punctuation">]</span><span class="token punctuation">[</span>-o<span class="token punctuation">]</span> <span class="token punctuation">..</span>. </span><span class="code-line line-number" line="3">blkid <span class="token parameter variable">-p</span> <span class="token punctuation">[</span>-s <span class="token punctuation">]</span> <span class="token punctuation">[</span>-O <span class="token punctuation">]</span> <span class="token punctuation">[</span>-S <span class="token punctuation">]</span><span class="token punctuation">[</span>-o<span class="token punctuation">]</span> <span class="token punctuation">..</span>.
</span><span class="code-line line-number" line="4">blkid -i <span class="token punctuation">[</span>-s <span class="token punctuation">]</span> <span class="token punctuation">[</span>-o<span class="token punctuation">]</span> <span class="token punctuation">..</span>. </span><span class="code-line line-number" line="4">blkid <span class="token parameter variable">-i</span> <span class="token punctuation">[</span>-s <span class="token punctuation">]</span> <span class="token punctuation">[</span>-o<span class="token punctuation">]</span> <span class="token punctuation">..</span>.
</span></code><div onclick="copied(this)" data-code="blkid -L | -U </span></code><div onclick="copied(this)" data-code="blkid -L | -U
blkid [-c ] [-ghlLv] [-o] [-s ][-t ] -[w ] [ ...] blkid [-c ] [-ghlLv] [-o] [-s ][-t ] -[w ] [ ...]
blkid -p [-s ] [-O ] [-S ][-o] ... blkid -p [-s ] [-O ] [-S ][-o] ...
blkid -i [-s ] [-o] ... blkid -i [-s ] [-o] ...
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-c <span class="token operator">&#x3C;</span>file<span class="token operator">></span> <span class="token comment"># 指定cache文件(default: /etc/blkid.tab, /dev/null = none)</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-c</span> <span class="token operator">&#x3C;</span>file<span class="token operator">></span> <span class="token comment"># 指定cache文件(default: /etc/blkid.tab, /dev/null = none)</span>
</span><span class="code-line line-number" line="2">-d <span class="token comment"># don't encode non-printing characters</span> </span><span class="code-line line-number" line="2"><span class="token parameter variable">-d</span> <span class="token comment"># don't encode non-printing characters</span>
</span><span class="code-line line-number" line="3">-h <span class="token comment"># 显示帮助信息</span> </span><span class="code-line line-number" line="3"><span class="token parameter variable">-h</span> <span class="token comment"># 显示帮助信息</span>
</span><span class="code-line line-number" line="4">-g <span class="token comment"># garbage collect the blkid cache</span> </span><span class="code-line line-number" line="4"><span class="token parameter variable">-g</span> <span class="token comment"># garbage collect the blkid cache</span>
</span><span class="code-line line-number" line="5">-o <span class="token operator">&#x3C;</span>format<span class="token operator">></span> <span class="token comment"># 指定输出格式</span> </span><span class="code-line line-number" line="5"><span class="token parameter variable">-o</span> <span class="token operator">&#x3C;</span>format<span class="token operator">></span> <span class="token comment"># 指定输出格式</span>
</span><span class="code-line line-number" line="6">-k <span class="token comment"># list all known filesystems/RAIDs and exit</span> </span><span class="code-line line-number" line="6"><span class="token parameter variable">-k</span> <span class="token comment"># list all known filesystems/RAIDs and exit</span>
</span><span class="code-line line-number" line="7">-s <span class="token operator">&#x3C;</span>tag<span class="token operator">></span> <span class="token comment"># 显示指定信息,默认显示所有信息</span> </span><span class="code-line line-number" line="7"><span class="token parameter variable">-s</span> <span class="token operator">&#x3C;</span>tag<span class="token operator">></span> <span class="token comment"># 显示指定信息,默认显示所有信息</span>
</span><span class="code-line line-number" line="8">-t <span class="token operator">&#x3C;</span>token<span class="token operator">></span> <span class="token comment"># find device with a specific token (NAME=value pair)</span> </span><span class="code-line line-number" line="8"><span class="token parameter variable">-t</span> <span class="token operator">&#x3C;</span>token<span class="token operator">></span> <span class="token comment"># find device with a specific token (NAME=value pair)</span>
</span><span class="code-line line-number" line="9">-l <span class="token comment"># look up only first device with token specified by -t</span> </span><span class="code-line line-number" line="9"><span class="token parameter variable">-l</span> <span class="token comment"># look up only first device with token specified by -t</span>
</span><span class="code-line line-number" line="10">-L <span class="token operator">&#x3C;</span>label<span class="token operator">></span> <span class="token comment"># convert LABEL to device name</span> </span><span class="code-line line-number" line="10"><span class="token parameter variable">-L</span> <span class="token operator">&#x3C;</span>label<span class="token operator">></span> <span class="token comment"># convert LABEL to device name</span>
</span><span class="code-line line-number" line="11">-U <span class="token operator">&#x3C;</span>uuid<span class="token operator">></span> <span class="token comment"># convert UUID to device name</span> </span><span class="code-line line-number" line="11"><span class="token parameter variable">-U</span> <span class="token operator">&#x3C;</span>uuid<span class="token operator">></span> <span class="token comment"># convert UUID to device name</span>
</span><span class="code-line line-number" line="12">-v <span class="token comment"># 显示版本信息</span> </span><span class="code-line line-number" line="12"><span class="token parameter variable">-v</span> <span class="token comment"># 显示版本信息</span>
</span><span class="code-line line-number" line="13">-w <span class="token operator">&#x3C;</span>file<span class="token operator">></span> <span class="token comment"># write cache to different file (/dev/null = no write)</span> </span><span class="code-line line-number" line="13"><span class="token parameter variable">-w</span> <span class="token operator">&#x3C;</span>file<span class="token operator">></span> <span class="token comment"># write cache to different file (/dev/null = no write)</span>
</span><span class="code-line line-number" line="14"><span class="token operator">&#x3C;</span>dev<span class="token operator">></span> <span class="token comment"># specify device(s) to probe (default: all devices)</span> </span><span class="code-line line-number" line="14"><span class="token operator">&#x3C;</span>dev<span class="token operator">></span> <span class="token comment"># specify device(s) to probe (default: all devices)</span>
</span><span class="code-line line-number" line="15">Low-level probing options: </span><span class="code-line line-number" line="15">Low-level probing options:
</span><span class="code-line line-number" line="16">-p <span class="token comment"># low-level superblocks probing (bypass cache)</span> </span><span class="code-line line-number" line="16"><span class="token parameter variable">-p</span> <span class="token comment"># low-level superblocks probing (bypass cache)</span>
</span><span class="code-line line-number" line="17">-i <span class="token comment"># gather information about I/O limits</span> </span><span class="code-line line-number" line="17"><span class="token parameter variable">-i</span> <span class="token comment"># gather information about I/O limits</span>
</span><span class="code-line line-number" line="18">-S <span class="token operator">&#x3C;</span>size<span class="token operator">></span> <span class="token comment"># overwrite device size</span> </span><span class="code-line line-number" line="18"><span class="token parameter variable">-S</span> <span class="token operator">&#x3C;</span>size<span class="token operator">></span> <span class="token comment"># overwrite device size</span>
</span><span class="code-line line-number" line="19">-O <span class="token operator">&#x3C;</span>offset<span class="token operator">></span> <span class="token comment"># probe at the given offset</span> </span><span class="code-line line-number" line="19"><span class="token parameter variable">-O</span> <span class="token operator">&#x3C;</span>offset<span class="token operator">></span> <span class="token comment"># probe at the given offset</span>
</span><span class="code-line line-number" line="20">-u <span class="token operator">&#x3C;</span>list<span class="token operator">></span> <span class="token comment"># filter by "usage" (e.g. -u filesystem,raid)</span> </span><span class="code-line line-number" line="20"><span class="token parameter variable">-u</span> <span class="token operator">&#x3C;</span>list<span class="token operator">></span> <span class="token comment"># filter by "usage" (e.g. -u filesystem,raid)</span>
</span><span class="code-line line-number" line="21">-n <span class="token operator">&#x3C;</span>list<span class="token operator">></span> <span class="token comment"># filter by filesystem type (e.g. -n vfat,ext3)</span> </span><span class="code-line line-number" line="21"><span class="token parameter variable">-n</span> <span class="token operator">&#x3C;</span>list<span class="token operator">></span> <span class="token comment"># filter by filesystem type (e.g. -n vfat,ext3)</span>
</span></code><div onclick="copied(this)" data-code="-c <file> # 指定cache文件(default: /etc/blkid.tab, /dev/null = none) </span></code><div onclick="copied(this)" data-code="-c <file> # 指定cache文件(default: /etc/blkid.tab, /dev/null = none)
-d # don&#x27;t encode non-printing characters -d # don&#x27;t encode non-printing characters
-h # 显示帮助信息 -h # 显示帮助信息
@ -177,34 +177,34 @@ Low-level probing options:
</span></code><div onclick="copied(this)" data-code="sudo blkid </span></code><div onclick="copied(this)" data-code="sudo blkid
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>2、显示指定设备 UUID</p> <p>2、显示指定设备 UUID</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid -s UUID /dev/sda5 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid <span class="token parameter variable">-s</span> UUID /dev/sda5
</span></code><div onclick="copied(this)" data-code="sudo blkid -s UUID /dev/sda5 </span></code><div onclick="copied(this)" data-code="sudo blkid -s UUID /dev/sda5
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>3、显示所有设备 UUID</p> <p>3、显示所有设备 UUID</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid -s UUID <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid <span class="token parameter variable">-s</span> UUID
</span></code><div onclick="copied(this)" data-code="sudo blkid -s UUID </span></code><div onclick="copied(this)" data-code="sudo blkid -s UUID
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>4、显示指定设备 LABEL</p> <p>4、显示指定设备 LABEL</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid -s LABEL /dev/sda5 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid <span class="token parameter variable">-s</span> LABEL /dev/sda5
</span></code><div onclick="copied(this)" data-code="sudo blkid -s LABEL /dev/sda5 </span></code><div onclick="copied(this)" data-code="sudo blkid -s LABEL /dev/sda5
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>5、显示所有设备 LABEL</p> <p>5、显示所有设备 LABEL</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid -s LABEL <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid <span class="token parameter variable">-s</span> LABEL
</span></code><div onclick="copied(this)" data-code="sudo blkid -s LABEL </span></code><div onclick="copied(this)" data-code="sudo blkid -s LABEL
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>6、显示所有设备文件系统</p> <p>6、显示所有设备文件系统</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid -s TYPE <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid <span class="token parameter variable">-s</span> TYPE
</span></code><div onclick="copied(this)" data-code="sudo blkid -s TYPE </span></code><div onclick="copied(this)" data-code="sudo blkid -s TYPE
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>7、显示所有设备</p> <p>7、显示所有设备</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid -o device <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid <span class="token parameter variable">-o</span> device
</span></code><div onclick="copied(this)" data-code="sudo blkid -o device </span></code><div onclick="copied(this)" data-code="sudo blkid -o device
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>8、以列表方式查看详细信息</p> <p>8、以列表方式查看详细信息</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid -o list <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">sudo</span> blkid <span class="token parameter variable">-o</span> list
</span></code><div onclick="copied(this)" data-code="sudo blkid -o list </span></code><div onclick="copied(this)" data-code="sudo blkid -o list
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -217,31 +217,31 @@ Low-level probing options:
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -275,7 +275,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728417"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402149"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728417"></script> <script type="text/javascript" src="../js/index.js?v=1661420402149"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,blockdev,从命令行调用区块设备控制程序"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,blockdev,从命令行调用区块设备控制程序">
<title>blockdev 命令Linux blockdev 命令详解:从命令行调用区块设备控制程序 - Linux 命令搜索引擎</title> <title>blockdev 命令Linux blockdev 命令详解:从命令行调用区块设备控制程序 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728428"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402158">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -145,18 +145,18 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>设备文件名:指定要操作的磁盘的设备文件名。</p> <p>设备文件名:指定要操作的磁盘的设备文件名。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>设置设备为只读:</p> <p>设置设备为只读:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blockdev --setro /dev/hda4 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blockdev <span class="token parameter variable">--setro</span> /dev/hda4
</span></code><div onclick="copied(this)" data-code="blockdev --setro /dev/hda4 </span></code><div onclick="copied(this)" data-code="blockdev --setro /dev/hda4
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>读取设备是否为只读:</p> <p>读取设备是否为只读:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blockdev --getro /dev/hda4 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blockdev <span class="token parameter variable">--getro</span> /dev/hda4
</span></code><div onclick="copied(this)" data-code="blockdev --getro /dev/hda4 </span></code><div onclick="copied(this)" data-code="blockdev --getro /dev/hda4
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>设置设别为可读写:</p> <p>设置设别为可读写:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blockdev --setrw /dev/hda4 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">blockdev <span class="token parameter variable">--setrw</span> /dev/hda4
</span></code><div onclick="copied(this)" data-code="blockdev --setrw /dev/hda4 </span></code><div onclick="copied(this)" data-code="blockdev --setrw /dev/hda4
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -169,31 +169,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -227,7 +227,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728429"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402159"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728429"></script> <script type="text/javascript" src="../js/index.js?v=1661420402159"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bmodinfo,显示给定模块的详细信息"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bmodinfo,显示给定模块的详细信息">
<title>bmodinfo 命令Linux bmodinfo 命令详解:显示给定模块的详细信息 - Linux 命令搜索引擎</title> <title>bmodinfo 命令Linux bmodinfo 命令详解:显示给定模块的详细信息 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728440"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402169">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -162,7 +162,7 @@ alias: char-major-21-*
vermagic: 2.6.9-42.ELsmp SMP 686 REGPARM 4KSTACKS gcc-3.4 vermagic: 2.6.9-42.ELsmp SMP 686 REGPARM 4KSTACKS gcc-3.4
depends: scsi_mod depends: scsi_mod
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -175,31 +175,31 @@ depends: scsi_mod
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -233,7 +233,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728441"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402170"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728441"></script> <script type="text/javascript" src="../js/index.js?v=1661420402170"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,break,结束forwhile或until循环。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,break,结束forwhile或until循环。">
<title>break 命令Linux break 命令详解结束forwhile或until循环。 - Linux 命令搜索引擎</title> <title>break 命令Linux break 命令详解结束forwhile或until循环。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728463"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402191">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -188,7 +188,7 @@ done
<ol> <ol>
<li>该命令是bash内建命令相关的帮助信息请查看<code>help</code>命令。</li> <li>该命令是bash内建命令相关的帮助信息请查看<code>help</code>命令。</li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -201,31 +201,31 @@ done
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -259,7 +259,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728464"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402191"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728464"></script> <script type="text/javascript" src="../js/index.js?v=1661420402191"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,builtin,执行bash内建命令。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,builtin,执行bash内建命令。">
<title>builtin 命令Linux builtin 命令详解执行bash内建命令。 - Linux 命令搜索引擎</title> <title>builtin 命令Linux builtin 命令详解执行bash内建命令。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728484"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402207">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -136,7 +136,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="2"><span class="token comment"># 此时内建命令优先使用</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 此时内建命令优先使用</span>
</span><span class="code-line line-number" line="3"><span class="token builtin class-name">echo</span> <span class="token string">"the Great Wall"</span> </span><span class="code-line line-number" line="3"><span class="token builtin class-name">echo</span> <span class="token string">"the Great Wall"</span>
</span><span class="code-line line-number" line="4"><span class="token comment"># 调用内建命令type返回命令的类型builtin</span> </span><span class="code-line line-number" line="4"><span class="token comment"># 调用内建命令type返回命令的类型builtin</span>
</span><span class="code-line line-number" line="5"><span class="token builtin class-name">type</span> -t <span class="token builtin class-name">echo</span> </span><span class="code-line line-number" line="5"><span class="token builtin class-name">type</span> <span class="token parameter variable">-t</span> <span class="token builtin class-name">echo</span>
</span><span class="code-line line-number" line="6"><span class="token comment"># 定义 echo 函数</span> </span><span class="code-line line-number" line="6"><span class="token comment"># 定义 echo 函数</span>
</span><span class="code-line line-number" line="7"><span class="token function-name function">echo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> </span><span class="code-line line-number" line="7"><span class="token function-name function">echo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
</span><span class="code-line line-number" line="8"> <span class="token builtin class-name">printf</span> <span class="token string">"123<span class="token entity" title="\n">\n</span>"</span> </span><span class="code-line line-number" line="8"> <span class="token builtin class-name">printf</span> <span class="token string">"123<span class="token entity" title="\n">\n</span>"</span>
@ -144,9 +144,9 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="10"><span class="token comment"># 此时同名函数优先使用显示123</span> </span><span class="code-line line-number" line="10"><span class="token comment"># 此时同名函数优先使用显示123</span>
</span><span class="code-line line-number" line="11"><span class="token builtin class-name">echo</span> </span><span class="code-line line-number" line="11"><span class="token builtin class-name">echo</span>
</span><span class="code-line line-number" line="12"><span class="token comment"># 调用内建命令type返回命令的类型function</span> </span><span class="code-line line-number" line="12"><span class="token comment"># 调用内建命令type返回命令的类型function</span>
</span><span class="code-line line-number" line="13"><span class="token builtin class-name">type</span> -t <span class="token builtin class-name">echo</span> </span><span class="code-line line-number" line="13"><span class="token builtin class-name">type</span> <span class="token parameter variable">-t</span> <span class="token builtin class-name">echo</span>
</span><span class="code-line line-number" line="14"><span class="token comment"># 此时内建命令优先使用</span> </span><span class="code-line line-number" line="14"><span class="token comment"># 此时内建命令优先使用</span>
</span><span class="code-line line-number" line="15"><span class="token builtin class-name">builtin</span> <span class="token builtin class-name">echo</span> -e <span class="token string">"backslash <span class="token entity" title="\\">\\</span>"</span> </span><span class="code-line line-number" line="15"><span class="token builtin class-name">builtin</span> <span class="token builtin class-name">echo</span> <span class="token parameter variable">-e</span> <span class="token string">"backslash <span class="token entity" title="\\">\\</span>"</span>
</span></code><div onclick="copied(this)" data-code="# 关于外部命令优先级最高的情况请参考enable命令 </span></code><div onclick="copied(this)" data-code="# 关于外部命令优先级最高的情况请参考enable命令
# 此时内建命令优先使用 # 此时内建命令优先使用
echo &#x22;the Great Wall&#x22; echo &#x22;the Great Wall&#x22;
@ -191,7 +191,7 @@ alias which=&#x27;alias | /usr/bin/which --tty-only --read-alias --show-dot --sh
<p>如果要调用的内建命令被禁用了(包括<code>builtin</code>),那么执行会报错;关于禁用和启用内建命令请参考<code>enable</code>命令。</p> <p>如果要调用的内建命令被禁用了(包括<code>builtin</code>),那么执行会报错;关于禁用和启用内建命令请参考<code>enable</code>命令。</p>
</li> </li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -204,31 +204,31 @@ alias which=&#x27;alias | /usr/bin/which --tty-only --read-alias --show-dot --sh
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -262,7 +262,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728485"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402208"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728485"></script> <script type="text/javascript" src="../js/index.js?v=1661420402208"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bunzip2,创一个bz2文件压缩包"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bunzip2,创一个bz2文件压缩包">
<title>bunzip2 命令Linux bunzip2 命令详解创一个bz2文件压缩包 - Linux 命令搜索引擎</title> <title>bunzip2 命令Linux bunzip2 命令详解创一个bz2文件压缩包 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728493"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402217">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -137,11 +137,11 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>.bz2压缩包指定需要解压缩的.bz2压缩包。</p> <p>.bz2压缩包指定需要解压缩的.bz2压缩包。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p><code>/opt</code>目录下的etc.zip、var.zip和backup.zip进行压缩设置压缩率为最高同时在压缩完毕后不删除原始文件显示压缩过程的详细信息。</p> <p><code>/opt</code>目录下的etc.zip、var.zip和backup.zip进行压缩设置压缩率为最高同时在压缩完毕后不删除原始文件显示压缩过程的详细信息。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -9vk /opt/etc.zip /opt/var.zip /opt/backup.zip <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token parameter variable">-9vk</span> /opt/etc.zip /opt/var.zip /opt/backup.zip
</span></code><div onclick="copied(this)" data-code="bzip2 -9vk /opt/etc.zip /opt/var.zip /opt/backup.zip </span></code><div onclick="copied(this)" data-code="bzip2 -9vk /opt/etc.zip /opt/var.zip /opt/backup.zip
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>压缩完毕后,在<code>/opt</code>下就会生成相应的etc.zip.bz2、var.zip.bz2和backup.zip.bz2文件。</p> <p>压缩完毕后,在<code>/opt</code>下就会生成相应的etc.zip.bz2、var.zip.bz2和backup.zip.bz2文件。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -154,31 +154,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -212,7 +212,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728494"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402218"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728494"></script> <script type="text/javascript" src="../js/index.js?v=1661420402218"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bye,命令用于中断FTP连线并结束程序"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bye,命令用于中断FTP连线并结束程序">
<title>bye 命令Linux bye 命令详解命令用于中断FTP连线并结束程序 - Linux 命令搜索引擎</title> <title>bye 命令Linux bye 命令详解命令用于中断FTP连线并结束程序 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728499"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402222">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -125,7 +125,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">bye <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">bye
</span></code><div onclick="copied(this)" data-code="bye </span></code><div onclick="copied(this)" data-code="bye
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -138,31 +138,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -196,7 +196,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728500"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402223"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728500"></script> <script type="text/javascript" src="../js/index.js?v=1661420402223"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzcat,解压缩指定的.bz2文件"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzcat,解压缩指定的.bz2文件">
<title>bzcat 命令Linux bzcat 命令详解:解压缩指定的.bz2文件 - Linux 命令搜索引擎</title> <title>bzcat 命令Linux bzcat 命令详解:解压缩指定的.bz2文件 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728508"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402236">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -125,7 +125,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>.bz2压缩文件指定要显示内容的.bz2压缩文件。</p> <p>.bz2压缩文件指定要显示内容的.bz2压缩文件。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p><code>/tmp/man.config</code>以bzip2格式压缩</p> <p><code>/tmp/man.config</code>以bzip2格式压缩</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -z man.config <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token parameter variable">-z</span> man.config
</span></code><div onclick="copied(this)" data-code="bzip2 -z man.config </span></code><div onclick="copied(this)" data-code="bzip2 -z man.config
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>此时man.config会变成man.config.bz2</p> <p>此时man.config会变成man.config.bz2</p>
@ -134,7 +134,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="bzcat man.config.bz2 </span></code><div onclick="copied(this)" data-code="bzcat man.config.bz2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>此时屏幕上会显示 man.config.bz2 解压缩之后的文件内容。</p> <p>此时屏幕上会显示 man.config.bz2 解压缩之后的文件内容。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -147,31 +147,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -205,7 +205,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728509"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402237"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728509"></script> <script type="text/javascript" src="../js/index.js?v=1661420402237"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzcmp,比较两个压缩包中的文件"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzcmp,比较两个压缩包中的文件">
<title>bzcmp 命令Linux bzcmp 命令详解:比较两个压缩包中的文件 - Linux 命令搜索引擎</title> <title>bzcmp 命令Linux bzcmp 命令详解:比较两个压缩包中的文件 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728514"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402229">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -126,7 +126,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>文件1指定要比较的第一个.bz2压缩包</li> <li>文件1指定要比较的第一个.bz2压缩包</li>
<li>文件2指定要比较的第二个.bz2压缩包。</li> <li>文件2指定要比较的第二个.bz2压缩包。</li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -139,31 +139,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -197,7 +197,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728515"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402230"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728515"></script> <script type="text/javascript" src="../js/index.js?v=1661420402230"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzdiff,直接比较两个.bz2压缩包中文件的不同"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzdiff,直接比较两个.bz2压缩包中文件的不同">
<title>bzdiff 命令Linux bzdiff 命令详解:直接比较两个.bz2压缩包中文件的不同 - Linux 命令搜索引擎</title> <title>bzdiff 命令Linux bzdiff 命令详解:直接比较两个.bz2压缩包中文件的不同 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728520"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402241">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -126,7 +126,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>文件1指定要比较的第一个.bz2压缩包</li> <li>文件1指定要比较的第一个.bz2压缩包</li>
<li>文件2指定要比较的第二个.bz2压缩包。</li> <li>文件2指定要比较的第二个.bz2压缩包。</li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -139,31 +139,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -197,7 +197,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728521"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402242"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728521"></script> <script type="text/javascript" src="../js/index.js?v=1661420402242"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzgrep,使用正则表达式搜索.bz2压缩包中文件"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzgrep,使用正则表达式搜索.bz2压缩包中文件">
<title>bzgrep 命令Linux bzgrep 命令详解:使用正则表达式搜索.bz2压缩包中文件 - Linux 命令搜索引擎</title> <title>bzgrep 命令Linux bzgrep 命令详解:使用正则表达式搜索.bz2压缩包中文件 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728528"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402247">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -126,7 +126,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>搜索模式:指定要搜索的模式;</li> <li>搜索模式:指定要搜索的模式;</li>
<li>.bz2文件指定要搜索的.bz2压缩包。</li> <li>.bz2文件指定要搜索的.bz2压缩包。</li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -139,31 +139,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -197,7 +197,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728529"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402248"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728529"></script> <script type="text/javascript" src="../js/index.js?v=1661420402248"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzip2,将文件压缩成bz2格式"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzip2,将文件压缩成bz2格式">
<title>bzip2 命令Linux bzip2 命令详解将文件压缩成bz2格式 - Linux 命令搜索引擎</title> <title>bzip2 命令Linux bzip2 命令详解将文件压缩成bz2格式 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728562"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402285">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -139,45 +139,45 @@ anyothername 解压成 anyothername.out
<p>bzip2 采用 32 位 CRC 校验码作自我检查,以确认解压后的文件与原始文件相同。 这可用于检测压缩文件是否损坏,并防止 bzip2 中未知的缺陷(运气好的话这种可能性非常小)。 数据损坏而未检测到的几率非常之小, 对于每个被处理的文件大约是四十亿分之一。 检查是在解压缩时进行的,因此它只能说明某个地方出问题了。 它能帮助恢复原始未压缩的数据。可以用 bzip2recover 来尝试从损坏的文件中恢复数据。</p> <p>bzip2 采用 32 位 CRC 校验码作自我检查,以确认解压后的文件与原始文件相同。 这可用于检测压缩文件是否损坏,并防止 bzip2 中未知的缺陷(运气好的话这种可能性非常小)。 数据损坏而未检测到的几率非常之小, 对于每个被处理的文件大约是四十亿分之一。 检查是在解压缩时进行的,因此它只能说明某个地方出问题了。 它能帮助恢复原始未压缩的数据。可以用 bzip2recover 来尝试从损坏的文件中恢复数据。</p>
<p>返回值:正常退出返回 0 出现环境问题返回 1 文件未找到非法的选项I/O错误等 返回 2 表明压缩文件损坏,出现导致 bzip2 紧急退出的内部一致性错误(例如缺陷)时返回 3。</p> <p>返回值:正常退出返回 0 出现环境问题返回 1 文件未找到非法的选项I/O错误等 返回 2 表明压缩文件损坏,出现导致 bzip2 紧急退出的内部一致性错误(例如缺陷)时返回 3。</p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token punctuation">[</span> -cdfkqstvzVL123456789 <span class="token punctuation">]</span> <span class="token punctuation">[</span> filenames <span class="token punctuation">..</span>. <span class="token punctuation">]</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token punctuation">[</span> <span class="token parameter variable">-cdfkqstvzVL123456789</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> filenames <span class="token punctuation">..</span>. <span class="token punctuation">]</span>
</span></code><div onclick="copied(this)" data-code="bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ] </span></code><div onclick="copied(this)" data-code="bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-c --stdout <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-c</span> <span class="token parameter variable">--stdout</span>
</span><span class="code-line line-number" line="2"> <span class="token comment"># 将数据压缩或解压缩至标准输出。</span> </span><span class="code-line line-number" line="2"> <span class="token comment"># 将数据压缩或解压缩至标准输出。</span>
</span><span class="code-line line-number" line="3"> </span><span class="code-line line-number" line="3">
</span><span class="code-line line-number" line="4">-d --decompress </span><span class="code-line line-number" line="4"><span class="token parameter variable">-d</span> <span class="token parameter variable">--decompress</span>
</span><span class="code-line line-number" line="5"> <span class="token comment"># 强制解压缩。 bzip2, bunzip2 以及 bzcat 实际上是同一个程序,进行何种操作将根据程序名确定。 指定该选项后将不考虑这一机制,强制 bzip2 进行解压缩。</span> </span><span class="code-line line-number" line="5"> <span class="token comment"># 强制解压缩。 bzip2, bunzip2 以及 bzcat 实际上是同一个程序,进行何种操作将根据程序名确定。 指定该选项后将不考虑这一机制,强制 bzip2 进行解压缩。</span>
</span><span class="code-line line-number" line="6"> </span><span class="code-line line-number" line="6">
</span><span class="code-line line-number" line="7">-z --compress </span><span class="code-line line-number" line="7"><span class="token parameter variable">-z</span> <span class="token parameter variable">--compress</span>
</span><span class="code-line line-number" line="8"> <span class="token comment"># -d 选项的补充:强制进行压缩操作,而不管执行的是哪个程序。</span> </span><span class="code-line line-number" line="8"> <span class="token comment"># -d 选项的补充:强制进行压缩操作,而不管执行的是哪个程序。</span>
</span><span class="code-line line-number" line="9"> </span><span class="code-line line-number" line="9">
</span><span class="code-line line-number" line="10">-t --test </span><span class="code-line line-number" line="10"><span class="token parameter variable">-t</span> <span class="token parameter variable">--test</span>
</span><span class="code-line line-number" line="11"> <span class="token comment"># 检查指定文件的完整性,但并不对其解压缩。 实际上将对数据进行实验性的解压缩操作,而不输出结果。</span> </span><span class="code-line line-number" line="11"> <span class="token comment"># 检查指定文件的完整性,但并不对其解压缩。 实际上将对数据进行实验性的解压缩操作,而不输出结果。</span>
</span><span class="code-line line-number" line="12"> </span><span class="code-line line-number" line="12">
</span><span class="code-line line-number" line="13">-f --force </span><span class="code-line line-number" line="13"><span class="token parameter variable">-f</span> <span class="token parameter variable">--force</span>
</span><span class="code-line line-number" line="14"> <span class="token comment"># 强制覆盖输出文件。通常 bzip2 不会覆盖已经存在的文件。该选项还强制 bzip2 打破文件的硬连接,缺省情况下 bzip2 不会这么做。</span> </span><span class="code-line line-number" line="14"> <span class="token comment"># 强制覆盖输出文件。通常 bzip2 不会覆盖已经存在的文件。该选项还强制 bzip2 打破文件的硬连接,缺省情况下 bzip2 不会这么做。</span>
</span><span class="code-line line-number" line="15"> </span><span class="code-line line-number" line="15">
</span><span class="code-line line-number" line="16">-k --keep </span><span class="code-line line-number" line="16"><span class="token parameter variable">-k</span> <span class="token parameter variable">--keep</span>
</span><span class="code-line line-number" line="17"> <span class="token comment"># 在压缩或解压缩时保留输入文件(不删除这些文件)。</span> </span><span class="code-line line-number" line="17"> <span class="token comment"># 在压缩或解压缩时保留输入文件(不删除这些文件)。</span>
</span><span class="code-line line-number" line="18"> </span><span class="code-line line-number" line="18">
</span><span class="code-line line-number" line="19">-s --small </span><span class="code-line line-number" line="19"><span class="token parameter variable">-s</span> <span class="token parameter variable">--small</span>
</span><span class="code-line line-number" line="20"> <span class="token comment"># 在压缩、解压缩及检查时减少内存用量。采用一种修正的算法进行压缩和测试,每个数据块仅需要 2.5 个字节。这意味着任何文件都可以在 2300k</span> </span><span class="code-line line-number" line="20"> <span class="token comment"># 在压缩、解压缩及检查时减少内存用量。采用一种修正的算法进行压缩和测试,每个数据块仅需要 2.5 个字节。这意味着任何文件都可以在 2300k</span>
</span><span class="code-line line-number" line="21"> <span class="token comment"># 的内存中进行解压缩, 尽管速度只有通常情况下的一半。</span> </span><span class="code-line line-number" line="21"> <span class="token comment"># 的内存中进行解压缩, 尽管速度只有通常情况下的一半。</span>
</span><span class="code-line line-number" line="22"> </span><span class="code-line line-number" line="22">
</span><span class="code-line line-number" line="23"> <span class="token comment"># 在压缩时,-s将选定 200k 的块长度,内存用量也限制在 200k 左右, 代价是压缩率会降低。 总之如果机器的内存较少8兆字节或更少</span> </span><span class="code-line line-number" line="23"> <span class="token comment"># 在压缩时,-s将选定 200k 的块长度,内存用量也限制在 200k 左右, 代价是压缩率会降低。 总之如果机器的内存较少8兆字节或更少</span>
</span><span class="code-line line-number" line="24"> <span class="token comment"># 可对所有操作都采用-s选项。参见下面的内存管理。</span> </span><span class="code-line line-number" line="24"> <span class="token comment"># 可对所有操作都采用-s选项。参见下面的内存管理。</span>
</span><span class="code-line line-number" line="25"> </span><span class="code-line line-number" line="25">
</span><span class="code-line line-number" line="26">-q --quiet </span><span class="code-line line-number" line="26"><span class="token parameter variable">-q</span> <span class="token parameter variable">--quiet</span>
</span><span class="code-line line-number" line="27"> <span class="token comment"># 压制不重要的警告信息。属于 I/O 错误及其它严重事件的信息将不会被压制。</span> </span><span class="code-line line-number" line="27"> <span class="token comment"># 压制不重要的警告信息。属于 I/O 错误及其它严重事件的信息将不会被压制。</span>
</span><span class="code-line line-number" line="28"> </span><span class="code-line line-number" line="28">
</span><span class="code-line line-number" line="29">-v --verbose </span><span class="code-line line-number" line="29"><span class="token parameter variable">-v</span> <span class="token parameter variable">--verbose</span>
</span><span class="code-line line-number" line="30"> <span class="token comment"># 详尽模式 -- 显示每个被处理文件的压缩率。 命令行中更多的 -v 选项将增加详细的程度, 使 bzip2 显示出许多主要用于诊断目的信息。</span> </span><span class="code-line line-number" line="30"> <span class="token comment"># 详尽模式 -- 显示每个被处理文件的压缩率。 命令行中更多的 -v 选项将增加详细的程度, 使 bzip2 显示出许多主要用于诊断目的信息。</span>
</span><span class="code-line line-number" line="31"> </span><span class="code-line line-number" line="31">
</span><span class="code-line line-number" line="32">-L --license -V --version </span><span class="code-line line-number" line="32"><span class="token parameter variable">-L</span> <span class="token parameter variable">--license</span> <span class="token parameter variable">-V</span> <span class="token parameter variable">--version</span>
</span><span class="code-line line-number" line="33"> <span class="token comment"># 显示软件版本,许可证条款及条件。</span> </span><span class="code-line line-number" line="33"> <span class="token comment"># 显示软件版本,许可证条款及条件。</span>
</span><span class="code-line line-number" line="34"> </span><span class="code-line line-number" line="34">
</span><span class="code-line line-number" line="35">-1 to -9 </span><span class="code-line line-number" line="35"><span class="token parameter variable">-1</span> to <span class="token parameter variable">-9</span>
</span><span class="code-line line-number" line="36"> <span class="token comment"># 在压缩时将块长度设为 100 k、200 k .. 900 k。 对解压缩没有影响。参见下面的内存管理。</span> </span><span class="code-line line-number" line="36"> <span class="token comment"># 在压缩时将块长度设为 100 k、200 k .. 900 k。 对解压缩没有影响。参见下面的内存管理。</span>
</span><span class="code-line line-number" line="37"> </span><span class="code-line line-number" line="37">
</span><span class="code-line line-number" line="38">-- <span class="token comment"># 将所有后面的命令行变量看作文件名,即使这些变量以减号"-"打头。 可用这一选项处理以减号"-"打头的文件名, 例如bzip2 -- -myfilename.</span> </span><span class="code-line line-number" line="38">-- <span class="token comment"># 将所有后面的命令行变量看作文件名,即使这些变量以减号"-"打头。 可用这一选项处理以减号"-"打头的文件名, 例如bzip2 -- -myfilename.</span>
@ -234,14 +234,14 @@ anyothername 解压成 anyothername.out
<p><strong>压缩指定文件filename:</strong></p> <p><strong>压缩指定文件filename:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> filename <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> filename
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3"><span class="token function">bzip2</span> -z filename </span><span class="code-line line-number" line="3"><span class="token function">bzip2</span> <span class="token parameter variable">-z</span> filename
</span></code><div onclick="copied(this)" data-code="bzip2 filename </span></code><div onclick="copied(this)" data-code="bzip2 filename
bzip2 -z filename bzip2 -z filename
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里压缩的时候不会输出会将原来的文件filename给删除替换成filename.bz2.如果以前有filename.bz2则不会替换并提示错误如果想要替换则指定-f选项例如<code>bzip2 -f filename</code>如果filename是目录则也提醒错误不做任何操作如果filename已经是压过的了有bz2后缀就提醒一下不再压缩没有bz2后缀会再次压缩。</p> <p>这里压缩的时候不会输出会将原来的文件filename给删除替换成filename.bz2.如果以前有filename.bz2则不会替换并提示错误如果想要替换则指定-f选项例如<code>bzip2 -f filename</code>如果filename是目录则也提醒错误不做任何操作如果filename已经是压过的了有bz2后缀就提醒一下不再压缩没有bz2后缀会再次压缩。</p>
<p><strong>解压指定的文件filename.bz2:</strong></p> <p><strong>解压指定的文件filename.bz2:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -d filename.bz2 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token parameter variable">-d</span> filename.bz2
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">bunzip2 filename.bz2 </span><span class="code-line line-number" line="3">bunzip2 filename.bz2
</span></code><div onclick="copied(this)" data-code="bzip2 -d filename.bz2 </span></code><div onclick="copied(this)" data-code="bzip2 -d filename.bz2
@ -250,7 +250,7 @@ bunzip2 filename.bz2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里解压的时候没标准输出会将原来的文件filename.bz2给替换成filename。如果以前有filename则不会替换并提示错误如果想要替换则指定<code>-f</code>选项,例如<code>bzip2 -df filename.bz2</code></p> <p>这里解压的时候没标准输出会将原来的文件filename.bz2给替换成filename。如果以前有filename则不会替换并提示错误如果想要替换则指定<code>-f</code>选项,例如<code>bzip2 -df filename.bz2</code></p>
<p><strong>压缩解压的时候将结果也输出:</strong></p> <p><strong>压缩解压的时候将结果也输出:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token variable">$bzip2</span> -v filename <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token variable">$bzip2</span> <span class="token parameter variable">-v</span> filename
</span></code><div onclick="copied(this)" data-code="$bzip2 -v filename </span></code><div onclick="copied(this)" data-code="$bzip2 -v filename
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>输入之后,输出如下:</p> <p>输入之后,输出如下:</p>
@ -259,7 +259,7 @@ bunzip2 filename.bz2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里,加上<code>-v</code>选项就会输出了,只用压缩举例了,解压的时候同理<code>bzip2 -dv filename.bz2</code>不再举例了。</p> <p>这里,加上<code>-v</code>选项就会输出了,只用压缩举例了,解压的时候同理<code>bzip2 -dv filename.bz2</code>不再举例了。</p>
<p><strong>模拟解压实际并不解压:</strong></p> <p><strong>模拟解压实际并不解压:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -tv filename.bz2 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token parameter variable">-tv</span> filename.bz2
</span></code><div onclick="copied(this)" data-code="bzip2 -tv filename.bz2 </span></code><div onclick="copied(this)" data-code="bzip2 -tv filename.bz2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>输入之后,输出如下:</p> <p>输入之后,输出如下:</p>
@ -268,12 +268,12 @@ bunzip2 filename.bz2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里,<code>-t</code>指定要进行模拟解压,不实际生成结果,也就是说类似检查文件,当然就算目录下面有filename也不会有什么错误输出了因为它根本不会真的解压文件。为了在屏幕上输出这里加上<code>-v</code>选项了,如果是真的解压<code>bzip2 -dv filename.bz2</code>则输出的是把"ok"替换成了"done"。</p> <p>这里,<code>-t</code>指定要进行模拟解压,不实际生成结果,也就是说类似检查文件,当然就算目录下面有filename也不会有什么错误输出了因为它根本不会真的解压文件。为了在屏幕上输出这里加上<code>-v</code>选项了,如果是真的解压<code>bzip2 -dv filename.bz2</code>则输出的是把"ok"替换成了"done"。</p>
<p><strong>压缩解压的时候,除了生成结果文件,将原来的文件也保存:</strong></p> <p><strong>压缩解压的时候,除了生成结果文件,将原来的文件也保存:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -k filename <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token parameter variable">-k</span> filename
</span></code><div onclick="copied(this)" data-code="bzip2 -k filename </span></code><div onclick="copied(this)" data-code="bzip2 -k filename
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里,加上<code>-k</code>就保存原始的文件了,否则原始文件会被结果文件替代。只用压缩举例了,解压的时候同理<code>$bzip2 -dk filename.bz2</code>不再举例了。</p> <p>这里,加上<code>-k</code>就保存原始的文件了,否则原始文件会被结果文件替代。只用压缩举例了,解压的时候同理<code>$bzip2 -dk filename.bz2</code>不再举例了。</p>
<p><strong>解压到标准输出:</strong></p> <p><strong>解压到标准输出:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -dc filename.bz2 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token parameter variable">-dc</span> filename.bz2
</span></code><div onclick="copied(this)" data-code="bzip2 -dc filename.bz2 </span></code><div onclick="copied(this)" data-code="bzip2 -dc filename.bz2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>输入之后,输出如下:</p> <p>输入之后,输出如下:</p>
@ -282,7 +282,7 @@ bunzip2 filename.bz2
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里,使用<code>-c</code>指定到标准输出输出的是文件filename的内容不会将filename.bz2删除。</p> <p>这里,使用<code>-c</code>指定到标准输出输出的是文件filename的内容不会将filename.bz2删除。</p>
<p><strong>压缩到标准输出:</strong></p> <p><strong>压缩到标准输出:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -c filename <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> <span class="token parameter variable">-c</span> filename
</span><span class="code-line line-number" line="2">bzip2: I won<span class="token string">'t write compressed data to a terminal. </span><span class="code-line line-number" line="2">bzip2: I won<span class="token string">'t write compressed data to a terminal.
</span></span><span class="code-line line-number" line="3"><span class="token string">bzip2: For help, type: `bzip2 --help'</span><span class="token builtin class-name">.</span> </span></span><span class="code-line line-number" line="3"><span class="token string">bzip2: For help, type: `bzip2 --help'</span><span class="token builtin class-name">.</span>
</span></code><div onclick="copied(this)" data-code="bzip2 -c filename </span></code><div onclick="copied(this)" data-code="bzip2 -c filename
@ -291,11 +291,11 @@ bzip2: For help, type: &#x60;bzip2 --help&#x27;.
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里,使用<code>-c</code>指定压缩到标准输出不删除原有文件,不同的是,压缩后的文件无法输出到标准输出。</p> <p>这里,使用<code>-c</code>指定压缩到标准输出不删除原有文件,不同的是,压缩后的文件无法输出到标准输出。</p>
<p><strong>使用bzip2的时候将所有后面的看作文件(即使文件名以'-'开头)</strong></p> <p><strong>使用bzip2的时候将所有后面的看作文件(即使文件名以'-'开头)</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -- -myfilename <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">bzip2</span> -- <span class="token parameter variable">-myfilename</span>
</span></code><div onclick="copied(this)" data-code="bzip2 -- -myfilename </span></code><div onclick="copied(this)" data-code="bzip2 -- -myfilename
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里主要是为了防止文件名中<code>-</code>产生以为是选项的歧义。</p> <p>这里主要是为了防止文件名中<code>-</code>产生以为是选项的歧义。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -308,31 +308,31 @@ bzip2: For help, type: &#x60;bzip2 --help&#x27;.
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -366,7 +366,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728563"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402286"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728563"></script> <script type="text/javascript" src="../js/index.js?v=1661420402286"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzip2recover,恢复被破坏的.bz2压缩包中的文件"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzip2recover,恢复被破坏的.bz2压缩包中的文件">
<title>bzip2recover 命令Linux bzip2recover 命令详解:恢复被破坏的.bz2压缩包中的文件 - Linux 命令搜索引擎</title> <title>bzip2recover 命令Linux bzip2recover 命令详解:恢复被破坏的.bz2压缩包中的文件 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728569"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402295">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -124,7 +124,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>文件:指定要恢复数据的.bz2压缩包。</p> <p>文件:指定要恢复数据的.bz2压缩包。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -137,31 +137,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -195,7 +195,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728570"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402296"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728570"></script> <script type="text/javascript" src="../js/index.js?v=1661420402296"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzless,增强.bz2压缩包查看器"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzless,增强.bz2压缩包查看器">
<title>bzless 命令Linux bzless 命令详解:增强.bz2压缩包查看器 - Linux 命令搜索引擎</title> <title>bzless 命令Linux bzless 命令详解:增强.bz2压缩包查看器 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728574"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402291">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -123,7 +123,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>文件:指定要分屏显示的.bz2压缩包。</p> <p>文件:指定要分屏显示的.bz2压缩包。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -136,31 +136,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -194,7 +194,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728575"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402291"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728575"></script> <script type="text/javascript" src="../js/index.js?v=1661420402291"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzmore,查看bzip2压缩过的文本文件的内容"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,bzmore,查看bzip2压缩过的文本文件的内容">
<title>bzmore 命令Linux bzmore 命令详解查看bzip2压缩过的文本文件的内容 - Linux 命令搜索引擎</title> <title>bzmore 命令Linux bzmore 命令详解查看bzip2压缩过的文本文件的内容 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728580"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402300">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -123,7 +123,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>文件:指定要分屏显示的.bz2压缩包。</p> <p>文件:指定要分屏显示的.bz2压缩包。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -136,31 +136,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -194,7 +194,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728581"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402300"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728581"></script> <script type="text/javascript" src="../js/index.js?v=1661420402300"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cal,显示当前日历或指定日期的日历"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cal,显示当前日历或指定日期的日历">
<title>cal 命令Linux cal 命令详解:显示当前日历或指定日期的日历 - Linux 命令搜索引擎</title> <title>cal 命令Linux cal 命令详解:显示当前日历或指定日期的日历 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728609"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402326">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -127,16 +127,16 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
天在这项改革被略去了, 所以那个月的日历有点不太寻常. 天在这项改革被略去了, 所以那个月的日历有点不太寻常.
</p> </p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cal</span> <span class="token punctuation">[</span> -mjy <span class="token punctuation">]</span> <span class="token punctuation">[</span> 月份 <span class="token punctuation">]</span> <span class="token punctuation">[</span> 年份 <span class="token punctuation">]</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cal</span> <span class="token punctuation">[</span> <span class="token parameter variable">-mjy</span> <span class="token punctuation">]</span> <span class="token punctuation">[</span> 月份 <span class="token punctuation">]</span> <span class="token punctuation">[</span> 年份 <span class="token punctuation">]</span>
</span></code><div onclick="copied(this)" data-code="cal [ -mjy ] [ 月份 ] [ 年份 ] </span></code><div onclick="copied(this)" data-code="cal [ -mjy ] [ 月份 ] [ 年份 ]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-l <span class="token comment"># 显示单月输出;</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-l</span> <span class="token comment"># 显示单月输出;</span>
</span><span class="code-line line-number" line="2">-3 <span class="token comment"># 显示临近三个月的日历;</span> </span><span class="code-line line-number" line="2"><span class="token parameter variable">-3</span> <span class="token comment"># 显示临近三个月的日历;</span>
</span><span class="code-line line-number" line="3">-s <span class="token comment"># 将星期日作为月的第一天;</span> </span><span class="code-line line-number" line="3"><span class="token parameter variable">-s</span> <span class="token comment"># 将星期日作为月的第一天;</span>
</span><span class="code-line line-number" line="4">-m <span class="token comment"># 显示星期一作为一周的第一天.. (缺省为星期日.)</span> </span><span class="code-line line-number" line="4"><span class="token parameter variable">-m</span> <span class="token comment"># 显示星期一作为一周的第一天.. (缺省为星期日.)</span>
</span><span class="code-line line-number" line="5">-j <span class="token comment"># 显示儒略历的(Julian)日期 (以 1 为基的天数, 从 1 月 1 日开始计数) .</span> </span><span class="code-line line-number" line="5"><span class="token parameter variable">-j</span> <span class="token comment"># 显示儒略历的(Julian)日期 (以 1 为基的天数, 从 1 月 1 日开始计数) .</span>
</span><span class="code-line line-number" line="6">-y <span class="token comment"># 显示当前年份的日历..</span> </span><span class="code-line line-number" line="6"><span class="token parameter variable">-y</span> <span class="token comment"># 显示当前年份的日历..</span>
</span></code><div onclick="copied(this)" data-code="-l # 显示单月输出 </span></code><div onclick="copied(this)" data-code="-l # 显示单月输出
-3 # 显示临近三个月的日历; -3 # 显示临近三个月的日历;
-s # 将星期日作为月的第一天; -s # 将星期日作为月的第一天;
@ -207,7 +207,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
26 27 28 29 30 24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 24 25 26 27 28 29 30 28 29 30
31 31
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -220,31 +220,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -278,7 +278,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728610"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402326"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728610"></script> <script type="text/javascript" src="../js/index.js?v=1661420402326"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cancel,取消已存在的打印任务"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cancel,取消已存在的打印任务">
<title>cancel 命令Linux cancel 命令详解:取消已存在的打印任务 - Linux 命令搜索引擎</title> <title>cancel 命令Linux cancel 命令详解:取消已存在的打印任务 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728616"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402331">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -135,7 +135,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>打印任务号:指定要取消的打印任务编号。</p> <p>打印任务号:指定要取消的打印任务编号。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -148,31 +148,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -206,7 +206,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728617"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402332"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728617"></script> <script type="text/javascript" src="../js/index.js?v=1661420402332"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cat,连接多个文件并打印到标准输出。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cat,连接多个文件并打印到标准输出。">
<title>cat 命令Linux cat 命令详解:连接多个文件并打印到标准输出。 - Linux 命令搜索引擎</title> <title>cat 命令Linux cat 命令详解:连接多个文件并打印到标准输出。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728639"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402350">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -132,17 +132,17 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">-A, --show-all 等价于<span class="token string">"-vET"</span>组合选项。 </span><span class="code-line line-number" line="3">-A, --show-all 等价于<span class="token string">"-vET"</span>组合选项。
</span><span class="code-line line-number" line="4">-b, --number-nonblank 只对非空行编号从1开始编号覆盖<span class="token string">"-n"</span>选项。 </span><span class="code-line line-number" line="4">-b, --number-nonblank 只对非空行编号从1开始编号覆盖<span class="token string">"-n"</span>选项。
</span><span class="code-line line-number" line="5">-e 等价于<span class="token string">"-vE"</span>组合选项。 </span><span class="code-line line-number" line="5"><span class="token parameter variable">-e</span> 等价于<span class="token string">"-vE"</span>组合选项。
</span><span class="code-line line-number" line="6">-E, --show-ends 在每行的结尾显示<span class="token string">'$'</span>字符。 </span><span class="code-line line-number" line="6">-E, --show-ends 在每行的结尾显示<span class="token string">'$'</span>字符。
</span><span class="code-line line-number" line="7">-n, --number 对所有行编号从1开始编号。 </span><span class="code-line line-number" line="7">-n, <span class="token parameter variable">--number</span> 对所有行编号从1开始编号。
</span><span class="code-line line-number" line="8">-s, --squeeze-blank 压缩连续的空行到一行。 </span><span class="code-line line-number" line="8">-s, --squeeze-blank 压缩连续的空行到一行。
</span><span class="code-line line-number" line="9">-t 等价于<span class="token string">"-vT"</span>组合选项。 </span><span class="code-line line-number" line="9"><span class="token parameter variable">-t</span> 等价于<span class="token string">"-vT"</span>组合选项。
</span><span class="code-line line-number" line="10">-T, --show-tabs 使用<span class="token string">"^I"</span>表示TAB制表符 </span><span class="code-line line-number" line="10">-T, --show-tabs 使用<span class="token string">"^I"</span>表示TAB制表符
</span><span class="code-line line-number" line="11">-u POSIX兼容性选项无意义。 </span><span class="code-line line-number" line="11"><span class="token parameter variable">-u</span> POSIX兼容性选项无意义。
</span><span class="code-line line-number" line="12">-v, --show-nonprinting 使用<span class="token string">"^"</span><span class="token string">"M-"</span>符号显示控制字符除了LFDline feed即换行符<span class="token string">'\n'</span>和TAB制表符 </span><span class="code-line line-number" line="12">-v, --show-nonprinting 使用<span class="token string">"^"</span><span class="token string">"M-"</span>符号显示控制字符除了LFDline feed即换行符<span class="token string">'\n'</span>和TAB制表符
</span><span class="code-line line-number" line="13"> </span><span class="code-line line-number" line="13">
</span><span class="code-line line-number" line="14">--help 显示帮助信息并退出。 </span><span class="code-line line-number" line="14"><span class="token parameter variable">--help</span> 显示帮助信息并退出。
</span><span class="code-line line-number" line="15">--version 显示版本信息并退出。 </span><span class="code-line line-number" line="15"><span class="token parameter variable">--version</span> 显示版本信息并退出。
</span></code><div onclick="copied(this)" data-code="长选项与短选项等价 </span></code><div onclick="copied(this)" data-code="长选项与短选项等价
-A, --show-all 等价于&#x22;-vET&#x22;组合选项。 -A, --show-all 等价于&#x22;-vET&#x22;组合选项。
@ -165,13 +165,13 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 合并显示多个文件</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 合并显示多个文件</span>
</span><span class="code-line line-number" line="2"><span class="token function">cat</span> ./1.log ./2.log ./3.log </span><span class="code-line line-number" line="2"><span class="token function">cat</span> ./1.log ./2.log ./3.log
</span><span class="code-line line-number" line="3"><span class="token comment"># 显示文件中的非打印字符、tab、换行符</span> </span><span class="code-line line-number" line="3"><span class="token comment"># 显示文件中的非打印字符、tab、换行符</span>
</span><span class="code-line line-number" line="4"><span class="token function">cat</span> -A test.log </span><span class="code-line line-number" line="4"><span class="token function">cat</span> <span class="token parameter variable">-A</span> test.log
</span><span class="code-line line-number" line="5"><span class="token comment"># 压缩文件的空行</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 压缩文件的空行</span>
</span><span class="code-line line-number" line="6"><span class="token function">cat</span> -s test.log </span><span class="code-line line-number" line="6"><span class="token function">cat</span> <span class="token parameter variable">-s</span> test.log
</span><span class="code-line line-number" line="7"><span class="token comment"># 显示文件并在所有行开头附加行号</span> </span><span class="code-line line-number" line="7"><span class="token comment"># 显示文件并在所有行开头附加行号</span>
</span><span class="code-line line-number" line="8"><span class="token function">cat</span> -n test.log </span><span class="code-line line-number" line="8"><span class="token function">cat</span> <span class="token parameter variable">-n</span> test.log
</span><span class="code-line line-number" line="9"><span class="token comment"># 显示文件并在所有非空行开头附加行号</span> </span><span class="code-line line-number" line="9"><span class="token comment"># 显示文件并在所有非空行开头附加行号</span>
</span><span class="code-line line-number" line="10"><span class="token function">cat</span> -b test.log </span><span class="code-line line-number" line="10"><span class="token function">cat</span> <span class="token parameter variable">-b</span> test.log
</span><span class="code-line line-number" line="11"><span class="token comment"># 将标准输入的内容和文件内容一并显示</span> </span><span class="code-line line-number" line="11"><span class="token comment"># 将标准输入的内容和文件内容一并显示</span>
</span><span class="code-line line-number" line="12"><span class="token builtin class-name">echo</span> <span class="token string">'######'</span> <span class="token operator">|</span><span class="token function">cat</span> - test.log </span><span class="code-line line-number" line="12"><span class="token builtin class-name">echo</span> <span class="token string">'######'</span> <span class="token operator">|</span><span class="token function">cat</span> - test.log
</span></code><div onclick="copied(this)" data-code="# 合并显示多个文件 </span></code><div onclick="copied(this)" data-code="# 合并显示多个文件
@ -197,7 +197,7 @@ echo &#x27;######&#x27; |cat - test.log
<ol> <ol>
<li><a href="https://superuser.com/questions/328054/is-there-an-lfd-key-on-my-keyboard">Question about LFD key</a></li> <li><a href="https://superuser.com/questions/328054/is-there-an-lfd-key-on-my-keyboard">Question about LFD key</a></li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -210,31 +210,31 @@ echo &#x27;######&#x27; |cat - test.log
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -268,7 +268,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728640"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402351"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728640"></script> <script type="text/javascript" src="../js/index.js?v=1661420402351"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cd,切换用户当前工作目录。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cd,切换用户当前工作目录。">
<title>cd 命令Linux cd 命令详解:切换用户当前工作目录。 - Linux 命令搜索引擎</title> <title>cd 命令Linux cd 命令详解:切换用户当前工作目录。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728662"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402372">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -130,8 +130,8 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h2 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h2> <h2 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h2>
<p>dir可选指定要切换到的目录。</p> <p>dir可选指定要切换到的目录。</p>
<h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2> <h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-L (默认值)如果要切换到的目标目录是一个符号连接,那么切换到符号连接的目录。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-L</span> (默认值)如果要切换到的目标目录是一个符号连接,那么切换到符号连接的目录。
</span><span class="code-line line-number" line="2">-P 如果要切换到的目标目录是一个符号连接,那么切换到它指向的物理位置目录。 </span><span class="code-line line-number" line="2"><span class="token parameter variable">-P</span> 如果要切换到的目标目录是一个符号连接,那么切换到它指向的物理位置目录。
</span><span class="code-line line-number" line="3">- 当前工作目录将被切换到环境变量<span class="token environment constant">OLDPWD</span>所表示的目录,也就是前一个工作目录。 </span><span class="code-line line-number" line="3">- 当前工作目录将被切换到环境变量<span class="token environment constant">OLDPWD</span>所表示的目录,也就是前一个工作目录。
</span></code><div onclick="copied(this)" data-code="-L 默认值如果要切换到的目标目录是一个符号连接那么切换到符号连接的目录 </span></code><div onclick="copied(this)" data-code="-L 默认值如果要切换到的目标目录是一个符号连接那么切换到符号连接的目录
-P 如果要切换到的目标目录是一个符号连接,那么切换到它指向的物理位置目录。 -P 如果要切换到的目标目录是一个符号连接,那么切换到它指向的物理位置目录。
@ -189,13 +189,13 @@ cd test3
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>关于<code>cdable_vars</code></p> <p>关于<code>cdable_vars</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 打开选项。</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 打开选项。</span>
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">shopt</span> -s cdable_vars </span><span class="code-line line-number" line="2"><span class="token builtin class-name">shopt</span> <span class="token parameter variable">-s</span> cdable_vars
</span><span class="code-line line-number" line="3"><span class="token comment"># 假设当前路径以及CDPATH没有名为new_var的目录。</span> </span><span class="code-line line-number" line="3"><span class="token comment"># 假设当前路径以及CDPATH没有名为new_var的目录。</span>
</span><span class="code-line line-number" line="4"><span class="token assign-left variable">new_var</span><span class="token operator">=</span><span class="token string">'~/Desktop'</span> </span><span class="code-line line-number" line="4"><span class="token assign-left variable">new_var</span><span class="token operator">=</span><span class="token string">'~/Desktop'</span>
</span><span class="code-line line-number" line="5"><span class="token comment"># 尝试进入。</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 尝试进入。</span>
</span><span class="code-line line-number" line="6"><span class="token builtin class-name">cd</span> new_var </span><span class="code-line line-number" line="6"><span class="token builtin class-name">cd</span> new_var
</span><span class="code-line line-number" line="7"><span class="token comment"># 关闭选项。</span> </span><span class="code-line line-number" line="7"><span class="token comment"># 关闭选项。</span>
</span><span class="code-line line-number" line="8"><span class="token builtin class-name">shopt</span> -u cdable_vars </span><span class="code-line line-number" line="8"><span class="token builtin class-name">shopt</span> <span class="token parameter variable">-u</span> cdable_vars
</span></code><div onclick="copied(this)" data-code="# 打开选项 </span></code><div onclick="copied(this)" data-code="# 打开选项
shopt -s cdable_vars shopt -s cdable_vars
# 假设当前路径以及CDPATH没有名为new_var的目录。 # 假设当前路径以及CDPATH没有名为new_var的目录。
@ -214,7 +214,7 @@ shopt -u cdable_vars
<p>建议您在编写脚本的过程中如有必要使用<code>cd</code>命令时,请增加必要的注释以用于提醒阅读者当前工作目录,以免出现诸如<code>找不到文件</code>这类问题的发生。</p> <p>建议您在编写脚本的过程中如有必要使用<code>cd</code>命令时,请增加必要的注释以用于提醒阅读者当前工作目录,以免出现诸如<code>找不到文件</code>这类问题的发生。</p>
</li> </li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -227,31 +227,31 @@ shopt -u cdable_vars
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -285,7 +285,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728664"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402374"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728664"></script> <script type="text/javascript" src="../js/index.js?v=1661420402374"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cdrecord,Linux系统下光盘刻录功能命令"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cdrecord,Linux系统下光盘刻录功能命令">
<title>cdrecord 命令Linux cdrecord 命令详解Linux系统下光盘刻录功能命令 - Linux 命令搜索引擎</title> <title>cdrecord 命令Linux cdrecord 命令详解Linux系统下光盘刻录功能命令 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728686"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402409">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -137,7 +137,7 @@ dev=<刻录机设备号>:指定使用“-scanbus”参数扫描到的刻录机
<p>ISO文件指定刻录光盘使用的ISO映像文件。</p> <p>ISO文件指定刻录光盘使用的ISO映像文件。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>查看系统所有 CD-R(w) 设备:</p> <p>查看系统所有 CD-R(w) 设备:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cdrecord -scanbus <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cdrecord <span class="token parameter variable">-scanbus</span>
</span><span class="code-line line-number" line="2">scsibus0: </span><span class="code-line line-number" line="2">scsibus0:
</span><span class="code-line line-number" line="3"> <span class="token number">0,0</span>,0 <span class="token number">0</span><span class="token punctuation">)</span> * </span><span class="code-line line-number" line="3"> <span class="token number">0,0</span>,0 <span class="token number">0</span><span class="token punctuation">)</span> *
</span><span class="code-line line-number" line="4"> <span class="token number">0,1</span>,0 <span class="token number">1</span><span class="token punctuation">)</span> * </span><span class="code-line line-number" line="4"> <span class="token number">0,1</span>,0 <span class="token number">1</span><span class="token punctuation">)</span> *
@ -151,7 +151,7 @@ scsibus0:
0,3,0 3) &#x27;HP &#x27; &#x27;CD-Writer+ 9200 &#x27; &#x27;1.0c&#x27; Removable CD-ROM 0,3,0 3) &#x27;HP &#x27; &#x27;CD-Writer+ 9200 &#x27; &#x27;1.0c&#x27; Removable CD-ROM
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>用iso文件刻录一张光盘</p> <p>用iso文件刻录一张光盘</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cdrecord -v -eject <span class="token assign-left variable">speed</span><span class="token operator">=</span><span class="token number">4</span> <span class="token assign-left variable">dev</span><span class="token operator">=</span><span class="token number">0,3</span>,0 backup.iso <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cdrecord <span class="token parameter variable">-v</span> <span class="token parameter variable">-eject</span> <span class="token assign-left variable">speed</span><span class="token operator">=</span><span class="token number">4</span> <span class="token assign-left variable">dev</span><span class="token operator">=</span><span class="token number">0,3</span>,0 backup.iso
</span></code><div onclick="copied(this)" data-code="cdrecord -v -eject speed=4 dev=0,3,0 backup.iso </span></code><div onclick="copied(this)" data-code="cdrecord -v -eject speed=4 dev=0,3,0 backup.iso
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>参数解释</p> <p>参数解释</p>
@ -161,10 +161,10 @@ scsibus0:
<li>speed=4 dev=0,3,0四速刻录到HP CD-writer设备上。</li> <li>speed=4 dev=0,3,0四速刻录到HP CD-writer设备上。</li>
</ul> </ul>
<p>擦写光驱:</p> <p>擦写光驱:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cdrecord --dev<span class="token operator">=</span><span class="token number">0,3</span>,0 --blank<span class="token operator">=</span>fast <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cdrecord <span class="token parameter variable">--dev</span><span class="token operator">=</span><span class="token number">0,3</span>,0 <span class="token parameter variable">--blank</span><span class="token operator">=</span>fast
</span></code><div onclick="copied(this)" data-code="cdrecord --dev=0,3,0 --blank=fast </span></code><div onclick="copied(this)" data-code="cdrecord --dev=0,3,0 --blank=fast
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -177,31 +177,31 @@ scsibus0:
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -235,7 +235,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728687"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402409"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728687"></script> <script type="text/javascript" src="../js/index.js?v=1661420402409"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chage,修改帐号和密码的有效期限"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chage,修改帐号和密码的有效期限">
<title>chage 命令Linux chage 命令详解:修改帐号和密码的有效期限 - Linux 命令搜索引擎</title> <title>chage 命令Linux chage 命令详解:修改帐号和密码的有效期限 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728704"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402396">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -168,7 +168,7 @@ CREATE_MAIL_SPOOL=yes
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>通过修改配置文件能对之后新建用户起作用而目前系统已经存在的用户则直接用chage来配置。</p> <p>通过修改配置文件能对之后新建用户起作用而目前系统已经存在的用户则直接用chage来配置。</p>
<p>我的服务器root帐户密码策略信息如下</p> <p>我的服务器root帐户密码策略信息如下</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chage -l root <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chage <span class="token parameter variable">-l</span> root
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">最近一次密码修改时间 <span class="token number">3</span><span class="token number">12</span>, <span class="token number">2013</span> </span><span class="code-line line-number" line="3">最近一次密码修改时间 <span class="token number">3</span><span class="token number">12</span>, <span class="token number">2013</span>
</span><span class="code-line line-number" line="4">密码过期时间 :从不 </span><span class="code-line line-number" line="4">密码过期时间 :从不
@ -188,8 +188,8 @@ CREATE_MAIL_SPOOL=yes
在密码过期之前警告的天数 7 在密码过期之前警告的天数 7
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>我可以通过如下命令修改我的密码过期时间:</p> <p>我可以通过如下命令修改我的密码过期时间:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chage -M <span class="token number">60</span> root <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chage <span class="token parameter variable">-M</span> <span class="token number">60</span> root
</span><span class="code-line line-number" line="2">chage -l root </span><span class="code-line line-number" line="2">chage <span class="token parameter variable">-l</span> root
</span><span class="code-line line-number" line="3"> </span><span class="code-line line-number" line="3">
</span><span class="code-line line-number" line="4">最近一次密码修改时间 <span class="token number">3</span><span class="token number">12</span>, <span class="token number">2013</span> </span><span class="code-line line-number" line="4">最近一次密码修改时间 <span class="token number">3</span><span class="token number">12</span>, <span class="token number">2013</span>
</span><span class="code-line line-number" line="5">密码过期时间 <span class="token number">5</span><span class="token number">11</span>, <span class="token number">2013</span> </span><span class="code-line line-number" line="5">密码过期时间 <span class="token number">5</span><span class="token number">11</span>, <span class="token number">2013</span>
@ -210,8 +210,8 @@ chage -l root
在密码过期之前警告的天数 9 在密码过期之前警告的天数 9
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>然后通过如下命令设置密码失效时间:</p> <p>然后通过如下命令设置密码失效时间:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chage -I <span class="token number">5</span> root <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chage <span class="token parameter variable">-I</span> <span class="token number">5</span> root
</span><span class="code-line line-number" line="2">chage -l root </span><span class="code-line line-number" line="2">chage <span class="token parameter variable">-l</span> root
</span><span class="code-line line-number" line="3"> </span><span class="code-line line-number" line="3">
</span><span class="code-line line-number" line="4">最近一次密码修改时间 <span class="token number">3</span><span class="token number">12</span>, <span class="token number">2013</span> </span><span class="code-line line-number" line="4">最近一次密码修改时间 <span class="token number">3</span><span class="token number">12</span>, <span class="token number">2013</span>
</span><span class="code-line line-number" line="5">密码过期时间 <span class="token number">5</span><span class="token number">11</span>, <span class="token number">2013</span> </span><span class="code-line line-number" line="5">密码过期时间 <span class="token number">5</span><span class="token number">11</span>, <span class="token number">2013</span>
@ -232,7 +232,7 @@ chage -l root
在密码过期之前警告的天数 9 在密码过期之前警告的天数 9
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>从上述命令可以看到在密码过期后5天密码自动失效这个用户将无法登陆系统了。</p> <p>从上述命令可以看到在密码过期后5天密码自动失效这个用户将无法登陆系统了。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -245,31 +245,31 @@ chage -l root
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -303,7 +303,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728704"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402397"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728704"></script> <script type="text/javascript" src="../js/index.js?v=1661420402397"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chattr,用来改变文件属性"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chattr,用来改变文件属性">
<title>chattr 命令Linux chattr 命令详解:用来改变文件属性 - Linux 命令搜索引擎</title> <title>chattr 命令Linux chattr 命令详解:用来改变文件属性 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728716"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402420">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -162,7 +162,7 @@ u预防意外删除。
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chattr +a /data1/user_act.log <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chattr +a /data1/user_act.log
</span></code><div onclick="copied(this)" data-code="chattr +a /data1/user_act.log </span></code><div onclick="copied(this)" data-code="chattr +a /data1/user_act.log
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -175,31 +175,31 @@ u预防意外删除。
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -233,7 +233,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728717"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402422"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728717"></script> <script type="text/javascript" src="../js/index.js?v=1661420402423"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chcon,修改对象(文件)的安全上下文"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chcon,修改对象(文件)的安全上下文">
<title>chcon 命令Linux chcon 命令详解:修改对象(文件)的安全上下文 - Linux 命令搜索引擎</title> <title>chcon 命令Linux chcon 命令详解:修改对象(文件)的安全上下文 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728731"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402436">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -120,20 +120,20 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon <span class="token punctuation">[</span>选项<span class="token punctuation">]</span><span class="token punctuation">..</span>. 环境 文件<span class="token punctuation">..</span>. <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon <span class="token punctuation">[</span>选项<span class="token punctuation">]</span><span class="token punctuation">..</span>. 环境 文件<span class="token punctuation">..</span>.
</span><span class="code-line line-number" line="2">chcon <span class="token punctuation">[</span>选项<span class="token punctuation">]</span><span class="token punctuation">..</span>. <span class="token punctuation">[</span>-u 用户<span class="token punctuation">]</span> <span class="token punctuation">[</span>-r 角色<span class="token punctuation">]</span> <span class="token punctuation">[</span>-l 范围<span class="token punctuation">]</span> <span class="token punctuation">[</span>-t 类型<span class="token punctuation">]</span> 文件<span class="token punctuation">..</span>. </span><span class="code-line line-number" line="2">chcon <span class="token punctuation">[</span>选项<span class="token punctuation">]</span><span class="token punctuation">..</span>. <span class="token punctuation">[</span>-u 用户<span class="token punctuation">]</span> <span class="token punctuation">[</span>-r 角色<span class="token punctuation">]</span> <span class="token punctuation">[</span>-l 范围<span class="token punctuation">]</span> <span class="token punctuation">[</span>-t 类型<span class="token punctuation">]</span> 文件<span class="token punctuation">..</span>.
</span><span class="code-line line-number" line="3">chcon <span class="token punctuation">[</span>选项<span class="token punctuation">]</span><span class="token punctuation">..</span>. --reference<span class="token operator">=</span>参考文件 文件<span class="token punctuation">..</span>. </span><span class="code-line line-number" line="3">chcon <span class="token punctuation">[</span>选项<span class="token punctuation">]</span><span class="token punctuation">..</span>. <span class="token parameter variable">--reference</span><span class="token operator">=</span>参考文件 文件<span class="token punctuation">..</span>.
</span></code><div onclick="copied(this)" data-code="chcon [选项]... 环境 文件... </span></code><div onclick="copied(this)" data-code="chcon [选项]... 环境 文件...
chcon [选项]... [-u 用户] [-r 角色] [-l 范围] [-t 类型] 文件... chcon [选项]... [-u 用户] [-r 角色] [-l 范围] [-t 类型] 文件...
chcon [选项]... --reference=参考文件 文件... chcon [选项]... --reference=参考文件 文件...
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-h, --no-dereference影响符号连接而非引用的文件。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-h, --no-dereference影响符号连接而非引用的文件。
</span><span class="code-line line-number" line="2"> --reference<span class="token operator">=</span>参考文件:使用指定参考文件的安全环境,而非指定值。 </span><span class="code-line line-number" line="2"> <span class="token parameter variable">--reference</span><span class="token operator">=</span>参考文件:使用指定参考文件的安全环境,而非指定值。
</span><span class="code-line line-number" line="3">-R, --recursive递归处理所有的文件及子目录。 </span><span class="code-line line-number" line="3">-R, --recursive递归处理所有的文件及子目录。
</span><span class="code-line line-number" line="4">-v, --verbose为处理的所有文件显示诊断信息。 </span><span class="code-line line-number" line="4">-v, --verbose为处理的所有文件显示诊断信息。
</span><span class="code-line line-number" line="5">-u, --user<span class="token operator">=</span>用户:设置指定用户的目标安全环境。 </span><span class="code-line line-number" line="5">-u, <span class="token parameter variable">--user</span><span class="token operator">=</span>用户:设置指定用户的目标安全环境。
</span><span class="code-line line-number" line="6">-r, --role<span class="token operator">=</span>角色:设置指定角色的目标安全环境。 </span><span class="code-line line-number" line="6">-r, <span class="token parameter variable">--role</span><span class="token operator">=</span>角色:设置指定角色的目标安全环境。
</span><span class="code-line line-number" line="7">-t, --type<span class="token operator">=</span>类型:设置指定类型的目标安全环境。 </span><span class="code-line line-number" line="7">-t, <span class="token parameter variable">--type</span><span class="token operator">=</span>类型:设置指定类型的目标安全环境。
</span><span class="code-line line-number" line="8">-l, --range<span class="token operator">=</span>范围:设置指定范围的目标安全环境。 </span><span class="code-line line-number" line="8">-l, <span class="token parameter variable">--range</span><span class="token operator">=</span>范围:设置指定范围的目标安全环境。
</span></code><div onclick="copied(this)" data-code="-h, --no-dereference影响符号连接而非引用的文件 </span></code><div onclick="copied(this)" data-code="-h, --no-dereference影响符号连接而非引用的文件
--reference=参考文件:使用指定参考文件的安全环境,而非指定值。 --reference=参考文件:使用指定参考文件的安全环境,而非指定值。
-R, --recursive递归处理所有的文件及子目录。 -R, --recursive递归处理所有的文件及子目录。
@ -157,28 +157,28 @@ chcon [选项]... --reference=参考文件 文件...
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>如果你想把这个ftp共享给匿名用户的话需要开启以下</p> <p>如果你想把这个ftp共享给匿名用户的话需要开启以下</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon -R -t public_content_t /var/ftp <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon <span class="token parameter variable">-R</span> <span class="token parameter variable">-t</span> public_content_t /var/ftp
</span></code><div onclick="copied(this)" data-code="chcon -R -t public_content_t /var/ftp </span></code><div onclick="copied(this)" data-code="chcon -R -t public_content_t /var/ftp
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>如果你想让你设置的FTP目录可以上传文件的话SELINUX需要设置</p> <p>如果你想让你设置的FTP目录可以上传文件的话SELINUX需要设置</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon -t public_content_rw_t /var/ftp/incoming <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon <span class="token parameter variable">-t</span> public_content_rw_t /var/ftp/incoming
</span></code><div onclick="copied(this)" data-code="chcon -t public_content_rw_t /var/ftp/incoming </span></code><div onclick="copied(this)" data-code="chcon -t public_content_rw_t /var/ftp/incoming
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>允许用户HHTP访问其家目录该设定限仅于用户的家目录主页</p> <p>允许用户HHTP访问其家目录该设定限仅于用户的家目录主页</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">setsebool -P httpd_enable_homedirs <span class="token number">1</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">setsebool <span class="token parameter variable">-P</span> httpd_enable_homedirs <span class="token number">1</span>
</span><span class="code-line line-number" line="2">chcon -R -t httpd_sys_content_t ~user/public_html </span><span class="code-line line-number" line="2">chcon <span class="token parameter variable">-R</span> <span class="token parameter variable">-t</span> httpd_sys_content_t ~user/public_html
</span></code><div onclick="copied(this)" data-code="setsebool -P httpd_enable_homedirs 1 </span></code><div onclick="copied(this)" data-code="setsebool -P httpd_enable_homedirs 1
chcon -R -t httpd_sys_content_t ~user/public_html chcon -R -t httpd_sys_content_t ~user/public_html
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>如果你希望将samba目录共享给其他用户你需要设置</p> <p>如果你希望将samba目录共享给其他用户你需要设置</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon -t samba_share_t /directory <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon <span class="token parameter variable">-t</span> samba_share_t /directory
</span></code><div onclick="copied(this)" data-code="chcon -t samba_share_t /directory </span></code><div onclick="copied(this)" data-code="chcon -t samba_share_t /directory
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>共享rsync目录时</p> <p>共享rsync目录时</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon -t public_content_t /directories <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">chcon <span class="token parameter variable">-t</span> public_content_t /directories
</span></code><div onclick="copied(this)" data-code="chcon -t public_content_t /directories </span></code><div onclick="copied(this)" data-code="chcon -t public_content_t /directories
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -191,31 +191,31 @@ chcon -R -t httpd_sys_content_t ~user/public_html
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -249,7 +249,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728732"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402436"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728732"></script> <script type="text/javascript" src="../js/index.js?v=1661420402436"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chfn,用来改变finger命令显示的信息"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chfn,用来改变finger命令显示的信息">
<title>chfn 命令Linux chfn 命令详解用来改变finger命令显示的信息 - Linux 命令搜索引擎</title> <title>chfn 命令Linux chfn 命令详解用来改变finger命令显示的信息 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728747"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402454">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -180,7 +180,7 @@ Office[]:NCCU
Office Phone[]: [del] Office Phone[]: [del]
Home Phone[]: [del] Home Phone[]: [del]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -193,31 +193,31 @@ Home Phone[]: [del]
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -251,7 +251,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728748"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402454"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728748"></script> <script type="text/javascript" src="../js/index.js?v=1661420402454"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chgrp,用来变更文件或目录的所属群组"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chgrp,用来变更文件或目录的所属群组">
<title>chgrp 命令Linux chgrp 命令详解:用来变更文件或目录的所属群组 - Linux 命令搜索引擎</title> <title>chgrp 命令Linux chgrp 命令详解:用来变更文件或目录的所属群组 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728760"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402484">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -123,7 +123,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="chgrp [选项][组群][文件|目录] </span></code><div onclick="copied(this)" data-code="chgrp [选项][组群][文件|目录]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-R 递归式地改变指定目录及其下的所有子目录和文件的所属的组 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-R</span> 递归式地改变指定目录及其下的所有子目录和文件的所属的组
</span><span class="code-line line-number" line="2">-c或——changes效果类似“-v”参数但仅回报更改的部分 </span><span class="code-line line-number" line="2">-c或——changes效果类似“-v”参数但仅回报更改的部分
</span><span class="code-line line-number" line="3">-f或--quiet或——silent不显示错误信息 </span><span class="code-line line-number" line="3">-f或--quiet或——silent不显示错误信息
</span><span class="code-line line-number" line="4">-h或--no-dereference只对符号连接的文件作修改而不是该其他任何相关文件 </span><span class="code-line line-number" line="4">-h或--no-dereference只对符号连接的文件作修改而不是该其他任何相关文件
@ -132,7 +132,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="7">-L遍历每一个遇到的通到目录的符号链接 </span><span class="code-line line-number" line="7">-L遍历每一个遇到的通到目录的符号链接
</span><span class="code-line line-number" line="8">-P不遍历任何符号链接默认 </span><span class="code-line line-number" line="8">-P不遍历任何符号链接默认
</span><span class="code-line line-number" line="9">-v或——verbose显示指令执行过程 </span><span class="code-line line-number" line="9">-v或——verbose显示指令执行过程
</span><span class="code-line line-number" line="10">--reference<span class="token operator">=</span><span class="token operator">&#x3C;</span>参考文件或目录<span class="token operator">></span>:把指定文件或目录的所属群组全部设成和参考文件或目录的所属群组相同; </span><span class="code-line line-number" line="10"><span class="token parameter variable">--reference</span><span class="token operator">=</span><span class="token operator">&#x3C;</span>参考文件或目录<span class="token operator">></span>:把指定文件或目录的所属群组全部设成和参考文件或目录的所属群组相同;
</span></code><div onclick="copied(this)" data-code="-R 递归式地改变指定目录及其下的所有子目录和文件的所属的组 </span></code><div onclick="copied(this)" data-code="-R 递归式地改变指定目录及其下的所有子目录和文件的所属的组
-c或——changes效果类似“-v”参数但仅回报更改的部分 -c或——changes效果类似“-v”参数但仅回报更改的部分
-f或--quiet或——silent不显示错误信息 -f或--quiet或——silent不显示错误信息
@ -151,14 +151,14 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</ul> </ul>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p><code>/usr/meng</code>及其子目录下的所有文件的用户组改为mengxin</p> <p><code>/usr/meng</code>及其子目录下的所有文件的用户组改为mengxin</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chgrp</span> -R mengxin /usr/meng <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chgrp</span> <span class="token parameter variable">-R</span> mengxin /usr/meng
</span></code><div onclick="copied(this)" data-code="chgrp -R mengxin /usr/meng </span></code><div onclick="copied(this)" data-code="chgrp -R mengxin /usr/meng
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>更改文件ah的组群所有者为 <code>newuser</code></p> <p>更改文件ah的组群所有者为 <code>newuser</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@rhel ~<span class="token punctuation">]</span><span class="token comment"># chgrp newuser ah</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@rhel ~<span class="token punctuation">]</span><span class="token comment"># chgrp newuser ah</span>
</span></code><div onclick="copied(this)" data-code="[root@rhel ~]# chgrp newuser ah </span></code><div onclick="copied(this)" data-code="[root@rhel ~]# chgrp newuser ah
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -171,31 +171,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -229,7 +229,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728760"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402485"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728760"></script> <script type="text/javascript" src="../js/index.js?v=1661420402485"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chkconfig,检查或设置系统的各种服务"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chkconfig,检查或设置系统的各种服务">
<title>chkconfig 命令Linux chkconfig 命令详解:检查或设置系统的各种服务 - Linux 命令搜索引擎</title> <title>chkconfig 命令Linux chkconfig 命令详解:检查或设置系统的各种服务 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728784"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402475">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -161,13 +161,13 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
# higher quality random number generation. # higher quality random number generation.
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chkconfig</span> --list <span class="token comment">#列出所有的系统服务。</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chkconfig</span> <span class="token parameter variable">--list</span> <span class="token comment">#列出所有的系统服务。</span>
</span><span class="code-line line-number" line="2"><span class="token function">chkconfig</span> --add httpd <span class="token comment">#增加httpd服务。</span> </span><span class="code-line line-number" line="2"><span class="token function">chkconfig</span> <span class="token parameter variable">--add</span> httpd <span class="token comment">#增加httpd服务。</span>
</span><span class="code-line line-number" line="3"><span class="token function">chkconfig</span> --del httpd <span class="token comment">#删除httpd服务。</span> </span><span class="code-line line-number" line="3"><span class="token function">chkconfig</span> <span class="token parameter variable">--del</span> httpd <span class="token comment">#删除httpd服务。</span>
</span><span class="code-line line-number" line="4"><span class="token function">chkconfig</span> --level httpd <span class="token number">2345</span> on <span class="token comment">#设置httpd在运行级别为2、3、4、5的情况下都是on开启的状态。</span> </span><span class="code-line line-number" line="4"><span class="token function">chkconfig</span> <span class="token parameter variable">--level</span> httpd <span class="token number">2345</span> on <span class="token comment">#设置httpd在运行级别为2、3、4、5的情况下都是on开启的状态。</span>
</span><span class="code-line line-number" line="5"><span class="token function">chkconfig</span> --list <span class="token comment"># 列出系统所有的服务启动情况。</span> </span><span class="code-line line-number" line="5"><span class="token function">chkconfig</span> <span class="token parameter variable">--list</span> <span class="token comment"># 列出系统所有的服务启动情况。</span>
</span><span class="code-line line-number" line="6"><span class="token function">chkconfig</span> --list mysqld <span class="token comment"># 列出mysqld服务设置情况。</span> </span><span class="code-line line-number" line="6"><span class="token function">chkconfig</span> <span class="token parameter variable">--list</span> mysqld <span class="token comment"># 列出mysqld服务设置情况。</span>
</span><span class="code-line line-number" line="7"><span class="token function">chkconfig</span> --level <span class="token number">35</span> mysqld on <span class="token comment"># 设定mysqld在等级3和5为开机运行服务--level 35表示操作只在等级3和5执行on表示启动off表示关闭。</span> </span><span class="code-line line-number" line="7"><span class="token function">chkconfig</span> <span class="token parameter variable">--level</span> <span class="token number">35</span> mysqld on <span class="token comment"># 设定mysqld在等级3和5为开机运行服务--level 35表示操作只在等级3和5执行on表示启动off表示关闭。</span>
</span><span class="code-line line-number" line="8"><span class="token function">chkconfig</span> mysqld on <span class="token comment"># 设定mysqld在各等级为on“各等级”包括2、3、4、5等级。</span> </span><span class="code-line line-number" line="8"><span class="token function">chkconfig</span> mysqld on <span class="token comment"># 设定mysqld在各等级为on“各等级”包括2、3、4、5等级。</span>
</span><span class="code-line line-number" line="9"> </span><span class="code-line line-number" line="9">
</span><span class="code-line line-number" line="10"><span class="token function">chkconfig</span> level redis <span class="token number">2345</span> on <span class="token comment"># 把redis在运行级别为2、3、4、5的情况下都是on开启的状态。</span> </span><span class="code-line line-number" line="10"><span class="token function">chkconfig</span> level redis <span class="token number">2345</span> on <span class="token comment"># 把redis在运行级别为2、3、4、5的情况下都是on开启的状态。</span>
@ -188,7 +188,7 @@ chkconfig level redis 2345 on # 把redis在运行级别为2、3、4、5的情
<li><code>chkconfig --add servicename</code>在chkconfig工具服务列表中增加此服务此时服务会被在<code>/etc/rc.d/rcN.d</code>中赋予K/S入口了</li> <li><code>chkconfig --add servicename</code>在chkconfig工具服务列表中增加此服务此时服务会被在<code>/etc/rc.d/rcN.d</code>中赋予K/S入口了</li>
<li><code>chkconfig --level 35 mysqld on</code>修改服务的默认启动等级。</li> <li><code>chkconfig --level 35 mysqld on</code>修改服务的默认启动等级。</li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -201,31 +201,31 @@ chkconfig level redis 2345 on # 把redis在运行级别为2、3、4、5的情
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -259,7 +259,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728784"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402476"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728784"></script> <script type="text/javascript" src="../js/index.js?v=1661420402476"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chmod,用来变更文件或目录的权限"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chmod,用来变更文件或目录的权限">
<title>chmod 命令Linux chmod 命令详解:用来变更文件或目录的权限 - Linux 命令搜索引擎</title> <title>chmod 命令Linux chmod 命令详解:用来变更文件或目录的权限 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728820"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402510">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -118,7 +118,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h2 id="概要"><a class="anchor" aria-hidden="true" tabindex="-1" href="#概要"><span class="octicon octicon-link"></span></a>概要</h2> <h2 id="概要"><a class="anchor" aria-hidden="true" tabindex="-1" href="#概要"><span class="octicon octicon-link"></span></a>概要</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chmod</span> <span class="token punctuation">[</span>OPTION<span class="token punctuation">]</span><span class="token punctuation">..</span>. MODE<span class="token punctuation">[</span>,MODE<span class="token punctuation">]</span><span class="token punctuation">..</span>. FILE<span class="token punctuation">..</span>. <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chmod</span> <span class="token punctuation">[</span>OPTION<span class="token punctuation">]</span><span class="token punctuation">..</span>. MODE<span class="token punctuation">[</span>,MODE<span class="token punctuation">]</span><span class="token punctuation">..</span>. FILE<span class="token punctuation">..</span>.
</span><span class="code-line line-number" line="2"><span class="token function">chmod</span> <span class="token punctuation">[</span>OPTION<span class="token punctuation">]</span><span class="token punctuation">..</span>. OCTAL-MODE FILE<span class="token punctuation">..</span>. </span><span class="code-line line-number" line="2"><span class="token function">chmod</span> <span class="token punctuation">[</span>OPTION<span class="token punctuation">]</span><span class="token punctuation">..</span>. OCTAL-MODE FILE<span class="token punctuation">..</span>.
</span><span class="code-line line-number" line="3"><span class="token function">chmod</span> <span class="token punctuation">[</span>OPTION<span class="token punctuation">]</span><span class="token punctuation">..</span>. --reference<span class="token operator">=</span>RFILE FILE<span class="token punctuation">..</span>. </span><span class="code-line line-number" line="3"><span class="token function">chmod</span> <span class="token punctuation">[</span>OPTION<span class="token punctuation">]</span><span class="token punctuation">..</span>. <span class="token parameter variable">--reference</span><span class="token operator">=</span>RFILE FILE<span class="token punctuation">..</span>.
</span></code><div onclick="copied(this)" data-code="chmod [OPTION]... MODE[,MODE]... FILE... </span></code><div onclick="copied(this)" data-code="chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE... chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE... chmod [OPTION]... --reference=RFILE FILE...
@ -138,7 +138,7 @@ chmod [OPTION]... --reference=RFILE FILE...
</span><span class="code-line line-number" line="3">--preserve-root不能在根目录下递归操作。 </span><span class="code-line line-number" line="3">--preserve-root不能在根目录下递归操作。
</span><span class="code-line line-number" line="4">-f, --silent, --quiet抑制多数错误消息的输出。 </span><span class="code-line line-number" line="4">-f, --silent, --quiet抑制多数错误消息的输出。
</span><span class="code-line line-number" line="5">-v, --verbose无论文件是否更改了权限一律输出操作信息。 </span><span class="code-line line-number" line="5">-v, --verbose无论文件是否更改了权限一律输出操作信息。
</span><span class="code-line line-number" line="6">--reference<span class="token operator">=</span>RFILE使用参考文件或参考目录RFILE的权限来设置目标文件或目录的权限。 </span><span class="code-line line-number" line="6"><span class="token parameter variable">--reference</span><span class="token operator">=</span>RFILE使用参考文件或参考目录RFILE的权限来设置目标文件或目录的权限。
</span><span class="code-line line-number" line="7">-R, --recursive对目录以及目录下的文件递归执行更改权限操作。 </span><span class="code-line line-number" line="7">-R, --recursive对目录以及目录下的文件递归执行更改权限操作。
</span><span class="code-line line-number" line="8">--help显示帮助信息并退出。 </span><span class="code-line line-number" line="8">--help显示帮助信息并退出。
</span><span class="code-line line-number" line="9">--version显示版本信息并退出。 </span><span class="code-line line-number" line="9">--version显示版本信息并退出。
@ -176,7 +176,7 @@ chmod [OPTION]... --reference=RFILE FILE...
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">linux文件的用户权限说明 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">linux文件的用户权限说明
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3"><span class="token comment"># 查看当前目录(包含隐藏文件)的长格式。</span> </span><span class="code-line line-number" line="3"><span class="token comment"># 查看当前目录(包含隐藏文件)的长格式。</span>
</span><span class="code-line line-number" line="4"><span class="token function">ls</span> -la </span><span class="code-line line-number" line="4"><span class="token function">ls</span> <span class="token parameter variable">-la</span>
</span><span class="code-line line-number" line="5"> -rw-r--r-- <span class="token number">1</span> user staff <span class="token number">651</span> Oct <span class="token number">12</span> <span class="token number">12</span>:53 .gitmodules </span><span class="code-line line-number" line="5"> -rw-r--r-- <span class="token number">1</span> user staff <span class="token number">651</span> Oct <span class="token number">12</span> <span class="token number">12</span>:53 .gitmodules
</span><span class="code-line line-number" line="6"> </span><span class="code-line line-number" line="6">
</span><span class="code-line line-number" line="7"><span class="token comment"># 第1位如果是d则代表目录是-则代表普通文件。</span> </span><span class="code-line line-number" line="7"><span class="token comment"># 第1位如果是d则代表目录是-则代表普通文件。</span>
@ -208,9 +208,9 @@ ls -la
</span><span class="code-line line-number" line="10"><span class="token function">chmod</span> <span class="token number">764</span> ./test.log </span><span class="code-line line-number" line="10"><span class="token function">chmod</span> <span class="token number">764</span> ./test.log
</span><span class="code-line line-number" line="11"><span class="token comment"># 将目录以及目录下的文件都设置为所有用户拥有读写权限。</span> </span><span class="code-line line-number" line="11"><span class="token comment"># 将目录以及目录下的文件都设置为所有用户拥有读写权限。</span>
</span><span class="code-line line-number" line="12"><span class="token comment"># 注意,使用'-R'选项一定要保留当前用户的执行和读取权限,否则会报错!</span> </span><span class="code-line line-number" line="12"><span class="token comment"># 注意,使用'-R'选项一定要保留当前用户的执行和读取权限,否则会报错!</span>
</span><span class="code-line line-number" line="13"><span class="token function">chmod</span> -R <span class="token assign-left variable">a</span><span class="token operator">=</span>rw ./testdir/ </span><span class="code-line line-number" line="13"><span class="token function">chmod</span> <span class="token parameter variable">-R</span> <span class="token assign-left variable">a</span><span class="token operator">=</span>rw ./testdir/
</span><span class="code-line line-number" line="14"><span class="token comment"># 根据其他文件的权限设置文件权限。</span> </span><span class="code-line line-number" line="14"><span class="token comment"># 根据其他文件的权限设置文件权限。</span>
</span><span class="code-line line-number" line="15"><span class="token function">chmod</span> --reference<span class="token operator">=</span>./1.log ./test.log </span><span class="code-line line-number" line="15"><span class="token function">chmod</span> <span class="token parameter variable">--reference</span><span class="token operator">=</span>./1.log ./test.log
</span></code><div onclick="copied(this)" data-code="# 添加组用户的写权限 </span></code><div onclick="copied(this)" data-code="# 添加组用户的写权限
chmod g+w ./test.log chmod g+w ./test.log
# 删除其他用户的所有权限。 # 删除其他用户的所有权限。
@ -239,7 +239,7 @@ chmod --reference=./1.log ./test.log
<p>使用<code>-R</code>选项一定要保留当前用户的执行和读取权限,否则会报错!</p> <p>使用<code>-R</code>选项一定要保留当前用户的执行和读取权限,否则会报错!</p>
</li> </li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -252,31 +252,31 @@ chmod --reference=./1.log ./test.log
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -310,7 +310,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728822"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402511"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728822"></script> <script type="text/javascript" src="../js/index.js?v=1661420402511"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chown,用来变更文件或目录的拥有者或所属群组"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chown,用来变更文件或目录的拥有者或所属群组">
<title>chown 命令Linux chown 命令详解:用来变更文件或目录的拥有者或所属群组 - Linux 命令搜索引擎</title> <title>chown 命令Linux chown 命令详解:用来变更文件或目录的拥有者或所属群组 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728793"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402527">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -130,7 +130,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="5">-v或——version显示指令执行过程 </span><span class="code-line line-number" line="5">-v或——version显示指令执行过程
</span><span class="code-line line-number" line="6">--dereference效果和“-h”参数相同 </span><span class="code-line line-number" line="6">--dereference效果和“-h”参数相同
</span><span class="code-line line-number" line="7">--help在线帮助 </span><span class="code-line line-number" line="7">--help在线帮助
</span><span class="code-line line-number" line="8">--reference<span class="token operator">=</span><span class="token operator">&#x3C;</span>参考文件或目录<span class="token operator">></span>:把指定文件或目录的拥有者与所属群组全部设成和参考文件或目录的拥有者与所属群组相同; </span><span class="code-line line-number" line="8"><span class="token parameter variable">--reference</span><span class="token operator">=</span><span class="token operator">&#x3C;</span>参考文件或目录<span class="token operator">></span>:把指定文件或目录的拥有者与所属群组全部设成和参考文件或目录的拥有者与所属群组相同;
</span><span class="code-line line-number" line="9">--version显示版本信息。 </span><span class="code-line line-number" line="9">--version显示版本信息。
</span></code><div onclick="copied(this)" data-code="-c或——changes效果类似“-v”参数但仅回报更改的部分 </span></code><div onclick="copied(this)" data-code="-c或——changes效果类似“-v”参数但仅回报更改的部分
-f或--quite或——silent不显示错误信息 -f或--quite或——silent不显示错误信息
@ -146,10 +146,10 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>用户:组:指定所有者和所属工作组。当省略“:组”,仅改变文件所有者;<br>文件指定要改变所有者和工作组的文件列表。支持多个文件和目标支持shell通配符。</p> <p>用户:组:指定所有者和所属工作组。当省略“:组”,仅改变文件所有者;<br>文件指定要改变所有者和工作组的文件列表。支持多个文件和目标支持shell通配符。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>将目录<code>/usr/meng</code>及其下面的所有文件、子目录的文件主改成 liu</p> <p>将目录<code>/usr/meng</code>及其下面的所有文件、子目录的文件主改成 liu</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chown</span> -R liu /usr/meng <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">chown</span> <span class="token parameter variable">-R</span> liu /usr/meng
</span></code><div onclick="copied(this)" data-code="chown -R liu /usr/meng </span></code><div onclick="copied(this)" data-code="chown -R liu /usr/meng
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -162,31 +162,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -220,7 +220,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728795"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402528"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728795"></script> <script type="text/javascript" src="../js/index.js?v=1661420402528"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chpasswd,批量更新用户口令的工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chpasswd,批量更新用户口令的工具">
<title>chpasswd 命令Linux chpasswd 命令详解:批量更新用户口令的工具 - Linux 命令搜索引擎</title> <title>chpasswd 命令Linux chpasswd 命令详解:批量更新用户口令的工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728829"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402517">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -135,7 +135,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="chpasswd < user.txt </span></code><div onclick="copied(this)" data-code="chpasswd < user.txt
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>以上是运用chpasswd命令来批量修改密码。是linux系统管理中的捷径。</p> <p>以上是运用chpasswd命令来批量修改密码。是linux系统管理中的捷径。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -148,31 +148,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -206,7 +206,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728830"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402520"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728830"></script> <script type="text/javascript" src="../js/index.js?v=1661420402520"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chroot,把根目录换成指定的目的目录"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chroot,把根目录换成指定的目的目录">
<title>chroot 命令Linux chroot 命令详解:把根目录换成指定的目的目录 - Linux 命令搜索引擎</title> <title>chroot 命令Linux chroot 命令详解:把根目录换成指定的目的目录 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728853"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402547">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -199,7 +199,7 @@ cp /lib/ld-linux.so.2 newRoot/lib
chroot newRoot /a.out chroot newRoot /a.out
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这样就能够正确运行a.out了因为a.out使用到了其他的动态连接库所以需要将库拷贝到newRoot中如果没有其他库那么直接拷贝a.out就能运行。例如静态编译后的busybox其安装目录中的<code>/bin/busybox</code>就没有依赖其他库。</p> <p>这样就能够正确运行a.out了因为a.out使用到了其他的动态连接库所以需要将库拷贝到newRoot中如果没有其他库那么直接拷贝a.out就能运行。例如静态编译后的busybox其安装目录中的<code>/bin/busybox</code>就没有依赖其他库。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -212,31 +212,31 @@ chroot newRoot /a.out
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -270,7 +270,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728854"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402548"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728854"></script> <script type="text/javascript" src="../js/index.js?v=1661420402548"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chsh,用来更换登录系统时使用的shell"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,chsh,用来更换登录系统时使用的shell">
<title>chsh 命令Linux chsh 命令详解用来更换登录系统时使用的shell - Linux 命令搜索引擎</title> <title>chsh 命令Linux chsh 命令详解用来更换登录系统时使用的shell - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728874"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402582">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -136,7 +136,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p><strong>查看系统安装了哪些shell的两种方法</strong></p> <p><strong>查看系统安装了哪些shell的两种方法</strong></p>
<p>第一种:</p> <p>第一种:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>rocrocket@localhost ~<span class="token punctuation">]</span>$ chsh -l <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>rocrocket@localhost ~<span class="token punctuation">]</span>$ chsh <span class="token parameter variable">-l</span>
</span><span class="code-line line-number" line="2">/bin/sh </span><span class="code-line line-number" line="2">/bin/sh
</span><span class="code-line line-number" line="3">/bin/bash </span><span class="code-line line-number" line="3">/bin/bash
</span><span class="code-line line-number" line="4">/sbin/nologin </span><span class="code-line line-number" line="4">/sbin/nologin
@ -168,7 +168,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>注意SHELL一定要是大写。可以看到目前使用的shell是<code>/bin/bash</code></p> <p>注意SHELL一定要是大写。可以看到目前使用的shell是<code>/bin/bash</code></p>
<p><strong>把我的shell改成zsh</strong></p> <p><strong>把我的shell改成zsh</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>rocrocket@localhost ~<span class="token punctuation">]</span>$ chsh -s /bin/zsh <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>rocrocket@localhost ~<span class="token punctuation">]</span>$ chsh <span class="token parameter variable">-s</span> /bin/zsh
</span><span class="code-line line-number" line="2">Changing shell <span class="token keyword">for</span> rocrocket. </span><span class="code-line line-number" line="2">Changing shell <span class="token keyword">for</span> rocrocket.
</span><span class="code-line line-number" line="3">Password: </span><span class="code-line line-number" line="3">Password:
</span><span class="code-line line-number" line="4">Shell changed. </span><span class="code-line line-number" line="4">Shell changed.
@ -187,7 +187,7 @@ rocrocket:x:500:500:rocrocket,China:/rocrocket/PSB/home:/bin/zsh
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>你可以发现输出内容的最后部分已经变成了<code>/bin/zsh</code>下次重启的时候linux就会读取这一命令来启动shell了</p> <p>你可以发现输出内容的最后部分已经变成了<code>/bin/zsh</code>下次重启的时候linux就会读取这一命令来启动shell了</p>
<p><strong>把shell修改回/bin/bash</strong></p> <p><strong>把shell修改回/bin/bash</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>rocrocket@localhost ~<span class="token punctuation">]</span>$ chsh -s /bin/bash <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>rocrocket@localhost ~<span class="token punctuation">]</span>$ chsh <span class="token parameter variable">-s</span> /bin/bash
</span><span class="code-line line-number" line="2">Changing shell <span class="token keyword">for</span> rocrocket. </span><span class="code-line line-number" line="2">Changing shell <span class="token keyword">for</span> rocrocket.
</span><span class="code-line line-number" line="3">Password: </span><span class="code-line line-number" line="3">Password:
</span><span class="code-line line-number" line="4">Shell changed. </span><span class="code-line line-number" line="4">Shell changed.
@ -196,7 +196,7 @@ Changing shell for rocrocket.
Password: Password:
Shell changed. Shell changed.
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -209,31 +209,31 @@ Shell changed.
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -267,7 +267,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728875"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402583"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728875"></script> <script type="text/javascript" src="../js/index.js?v=1661420402583"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cksum,检查文件的CRC是否正确"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cksum,检查文件的CRC是否正确">
<title>cksum 命令Linux cksum 命令详解检查文件的CRC是否正确 - Linux 命令搜索引擎</title> <title>cksum 命令Linux cksum 命令详解检查文件的CRC是否正确 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728886"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402616">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -142,7 +142,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>上面的输出信息中,"1263453430"表示校验码,"78"表示字节数。</p> <p>上面的输出信息中,"1263453430"表示校验码,"78"表示字节数。</p>
<p>注意如果文件中有任何字符被修改都将改变计算后CRC校验码的值。</p> <p>注意如果文件中有任何字符被修改都将改变计算后CRC校验码的值。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -155,31 +155,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -213,7 +213,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728887"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402617"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728887"></script> <script type="text/javascript" src="../js/index.js?v=1661420402617"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,clear,清除当前屏幕终端上的任何信息"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,clear,清除当前屏幕终端上的任何信息">
<title>clear 命令Linux clear 命令详解:清除当前屏幕终端上的任何信息 - Linux 命令搜索引擎</title> <title>clear 命令Linux clear 命令详解:清除当前屏幕终端上的任何信息 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728891"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402620">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -123,7 +123,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>直接输入clear命令当前终端上的任何信息就可被清除。</p> <p>直接输入clear命令当前终端上的任何信息就可被清除。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -136,31 +136,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -194,7 +194,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728892"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402621"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728892"></script> <script type="text/javascript" src="../js/index.js?v=1661420402621"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,clock,用于调整 RTC 时间"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,clock,用于调整 RTC 时间">
<title>clock 命令Linux clock 命令详解:用于调整 RTC 时间 - Linux 命令搜索引擎</title> <title>clock 命令Linux clock 命令详解:用于调整 RTC 时间 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728903"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402630">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -118,24 +118,24 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h2 id="补充说明"><a class="anchor" aria-hidden="true" tabindex="-1" href="#补充说明"><span class="octicon octicon-link"></span></a>补充说明</h2> <h2 id="补充说明"><a class="anchor" aria-hidden="true" tabindex="-1" href="#补充说明"><span class="octicon octicon-link"></span></a>补充说明</h2>
<p><strong>clock命令</strong>用于调整 RTC 时间。 RTC 是电脑内建的硬件时间,执行这项指令可以显示现在时刻,调整硬件时钟的时间,将系统时间设成与硬件时钟之时间一致,或是把系统时间回存到硬件时钟。</p> <p><strong>clock命令</strong>用于调整 RTC 时间。 RTC 是电脑内建的硬件时间,执行这项指令可以显示现在时刻,调整硬件时钟的时间,将系统时间设成与硬件时钟之时间一致,或是把系统时间回存到硬件时钟。</p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3> <h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">clock <span class="token punctuation">[</span>--adjust<span class="token punctuation">]</span><span class="token punctuation">[</span>--debug<span class="token punctuation">]</span><span class="token punctuation">[</span>--directisa<span class="token punctuation">]</span><span class="token punctuation">[</span>--getepoch<span class="token punctuation">]</span><span class="token punctuation">[</span>--hctosys<span class="token punctuation">]</span><span class="token punctuation">[</span>--set --date<span class="token operator">=</span><span class="token string">"&#x3C;日期时间>"</span><span class="token punctuation">]</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">clock <span class="token punctuation">[</span>--adjust<span class="token punctuation">]</span><span class="token punctuation">[</span>--debug<span class="token punctuation">]</span><span class="token punctuation">[</span>--directisa<span class="token punctuation">]</span><span class="token punctuation">[</span>--getepoch<span class="token punctuation">]</span><span class="token punctuation">[</span>--hctosys<span class="token punctuation">]</span><span class="token punctuation">[</span>--set <span class="token parameter variable">--date</span><span class="token operator">=</span><span class="token string">"&#x3C;日期时间>"</span><span class="token punctuation">]</span>
</span><span class="code-line line-number" line="2"><span class="token punctuation">[</span>--setepoch --epoch<span class="token operator">=</span><span class="token operator">&#x3C;</span> <span class="token operator">></span><span class="token punctuation">]</span><span class="token punctuation">[</span>--show<span class="token punctuation">]</span><span class="token punctuation">[</span>--systohc<span class="token punctuation">]</span><span class="token punctuation">[</span>--test<span class="token punctuation">]</span><span class="token punctuation">[</span>--utc<span class="token punctuation">]</span><span class="token punctuation">[</span>--version<span class="token punctuation">]</span> </span><span class="code-line line-number" line="2"><span class="token punctuation">[</span>--setepoch <span class="token parameter variable">--epoch</span><span class="token operator">=</span><span class="token operator">&#x3C;</span> <span class="token operator">></span><span class="token punctuation">]</span><span class="token punctuation">[</span>--show<span class="token punctuation">]</span><span class="token punctuation">[</span>--systohc<span class="token punctuation">]</span><span class="token punctuation">[</span>--test<span class="token punctuation">]</span><span class="token punctuation">[</span>--utc<span class="token punctuation">]</span><span class="token punctuation">[</span>--version<span class="token punctuation">]</span>
</span></code><div onclick="copied(this)" data-code="clock [--adjust][--debug][--directisa][--getepoch][--hctosys][--set --date=&#x22;<日期时间>&#x22;] </span></code><div onclick="copied(this)" data-code="clock [--adjust][--debug][--directisa][--getepoch][--hctosys][--set --date=&#x22;<日期时间>&#x22;]
[--setepoch --epoch=< >][--show][--systohc][--test][--utc][--version] [--setepoch --epoch=< >][--show][--systohc][--test][--utc][--version]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">--adjust  第一次使用<span class="token string">"--set"</span><span class="token string">"--systohc"</span>参数设置硬件时钟,会在/etc目录下产生一个名称为adjtime的文件。当再次使用这两个参数调整硬件时钟此文件便会记录两次调整间之差异日后执行clock指令加上<span class="token string">"--adjust"</span>参数时,程序会自动根 据记录文件的数值差异,计算出平均值,自动调整硬件时钟的时间。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">--adjust</span>  第一次使用<span class="token string">"--set"</span><span class="token string">"--systohc"</span>参数设置硬件时钟,会在/etc目录下产生一个名称为adjtime的文件。当再次使用这两个参数调整硬件时钟此文件便会记录两次调整间之差异日后执行clock指令加上<span class="token string">"--adjust"</span>参数时,程序会自动根 据记录文件的数值差异,计算出平均值,自动调整硬件时钟的时间。
</span><span class="code-line line-number" line="2">--debug  详细显示指令执行过程,便于排错或了解程序执行的情形。 </span><span class="code-line line-number" line="2"><span class="token parameter variable">--debug</span>  详细显示指令执行过程,便于排错或了解程序执行的情形。
</span><span class="code-line line-number" line="3">--directisa  告诉clock指令不要通过/dev/rtc设备文件直接对硬件时钟进行存取。这个参数适用于仅有ISA总线结构的老式电脑。 </span><span class="code-line line-number" line="3"><span class="token parameter variable">--directisa</span>  告诉clock指令不要通过/dev/rtc设备文件直接对硬件时钟进行存取。这个参数适用于仅有ISA总线结构的老式电脑。
</span><span class="code-line line-number" line="4">--getepoch  把系统核心内的硬件时钟新时代数值,呈现到标准输出设备。 </span><span class="code-line line-number" line="4"><span class="token parameter variable">--getepoch</span>  把系统核心内的硬件时钟新时代数值,呈现到标准输出设备。
</span><span class="code-line line-number" line="5">--hctosys  Hardware Clock to System Time把系统时间设成和硬件时钟一致。由于这个动作将会造成系统全面更新文件的存取时间所以最好在系统启动时就执行它。 </span><span class="code-line line-number" line="5"><span class="token parameter variable">--hctosys</span>  Hardware Clock to System Time把系统时间设成和硬件时钟一致。由于这个动作将会造成系统全面更新文件的存取时间所以最好在系统启动时就执行它。
</span><span class="code-line line-number" line="6">--set--date  设置硬件时钟的日期和时间。 </span><span class="code-line line-number" line="6">--set--date  设置硬件时钟的日期和时间。
</span><span class="code-line line-number" line="7">--setepoch--epoch<span class="token operator">=</span><span class="token operator">&#x3C;</span>年份<span class="token operator">></span>  设置系统核心之硬件时钟的新时代数值,年份以四位树字表示。 </span><span class="code-line line-number" line="7">--setepoch--epoch<span class="token operator">=</span><span class="token operator">&#x3C;</span>年份<span class="token operator">></span>  设置系统核心之硬件时钟的新时代数值,年份以四位树字表示。
</span><span class="code-line line-number" line="8">--show  读取硬件时钟的时间,并将其呈现至标准输出设备。 </span><span class="code-line line-number" line="8"><span class="token parameter variable">--show</span>  读取硬件时钟的时间,并将其呈现至标准输出设备。
</span><span class="code-line line-number" line="9">--systohc  System Time to Hardware Clock将系统时间存回硬件时钟内。 </span><span class="code-line line-number" line="9"><span class="token parameter variable">--systohc</span>  System Time to Hardware Clock将系统时间存回硬件时钟内。
</span><span class="code-line line-number" line="10">--test  仅作测试,并不真的将时间写入硬件时钟或系统时间。 </span><span class="code-line line-number" line="10"><span class="token parameter variable">--test</span>  仅作测试,并不真的将时间写入硬件时钟或系统时间。
</span><span class="code-line line-number" line="11">--utc  把硬件时钟上的时间时为CUT有时也称为UTC或UCT。 </span><span class="code-line line-number" line="11"><span class="token parameter variable">--utc</span>  把硬件时钟上的时间时为CUT有时也称为UTC或UCT。
</span><span class="code-line line-number" line="12">--version  显示版本信息。 </span><span class="code-line line-number" line="12"><span class="token parameter variable">--version</span>  显示版本信息。
</span></code><div onclick="copied(this)" data-code="--adjust  第一次使用&#x22;--set&#x22;&#x22;--systohc&#x22;参数设置硬件时钟会在/etc目录下产生一个名称为adjtime的文件当再次使用这两个参数调整硬件时钟此文件便会记录两次调整间之差异日后执行clock指令加上&#x22;--adjust&#x22;参数时程序会自动根 据记录文件的数值差异计算出平均值自动调整硬件时钟的时间 </span></code><div onclick="copied(this)" data-code="--adjust  第一次使用&#x22;--set&#x22;&#x22;--systohc&#x22;参数设置硬件时钟会在/etc目录下产生一个名称为adjtime的文件当再次使用这两个参数调整硬件时钟此文件便会记录两次调整间之差异日后执行clock指令加上&#x22;--adjust&#x22;参数时程序会自动根 据记录文件的数值差异计算出平均值自动调整硬件时钟的时间
--debug  详细显示指令执行过程,便于排错或了解程序执行的情形。 --debug  详细显示指令执行过程,便于排错或了解程序执行的情形。
--directisa  告诉clock指令不要通过/dev/rtc设备文件直接对硬件时钟进行存取。这个参数适用于仅有ISA总线结构的老式电脑。 --directisa  告诉clock指令不要通过/dev/rtc设备文件直接对硬件时钟进行存取。这个参数适用于仅有ISA总线结构的老式电脑。
@ -155,10 +155,10 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="clock # 获取当前的时间 </span></code><div onclick="copied(this)" data-code="clock # 获取当前的时间
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>显示UTC时间</p> <p>显示UTC时间</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">clock -utc <span class="token comment">#显示UTC时间</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">clock <span class="token parameter variable">-utc</span> <span class="token comment">#显示UTC时间</span>
</span></code><div onclick="copied(this)" data-code="clock -utc #显示UTC时间 </span></code><div onclick="copied(this)" data-code="clock -utc #显示UTC时间
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -171,31 +171,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -229,7 +229,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728903"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402631"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728903"></script> <script type="text/javascript" src="../js/index.js?v=1661420402631"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,clockdiff,检测两台linux主机的时间差"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,clockdiff,检测两台linux主机的时间差">
<title>clockdiff 命令Linux clockdiff 命令详解检测两台linux主机的时间差 - Linux 命令搜索引擎</title> <title>clockdiff 命令Linux clockdiff 命令详解检测两台linux主机的时间差 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728923"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402649">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -124,13 +124,13 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
-o1使用IP时间戳选项来测量系统时间差。用4个时间戳。如果-o和-o1都没有设置那么就是用ICMP时间戳来测试系统时间差。 -o1使用IP时间戳选项来测量系统时间差。用4个时间戳。如果-o和-o1都没有设置那么就是用ICMP时间戳来测试系统时间差。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">lixi@lixi-desktop:~$ <span class="token function">ping</span> -T tsandaddr www.ustc.edu.cn -c <span class="token number">1</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">lixi@lixi-desktop:~$ <span class="token function">ping</span> <span class="token parameter variable">-T</span> tsandaddr www.ustc.edu.cn <span class="token parameter variable">-c</span> <span class="token number">1</span>
</span><span class="code-line line-number" line="2">PING www.ustc.edu.cn <span class="token punctuation">(</span><span class="token number">202.38</span>.64.9<span class="token punctuation">)</span> <span class="token number">56</span><span class="token punctuation">(</span><span class="token number">124</span><span class="token punctuation">)</span> bytes of data. </span><span class="code-line line-number" line="2">PING www.ustc.edu.cn <span class="token punctuation">(</span><span class="token number">202.38</span>.64.9<span class="token punctuation">)</span> <span class="token number">56</span><span class="token punctuation">(</span><span class="token number">124</span><span class="token punctuation">)</span> bytes of data.
</span><span class="code-line line-number" line="3"><span class="token number">64</span> bytes from <span class="token number">202.38</span>.64.9: <span class="token assign-left variable">icmp_seq</span><span class="token operator">=</span><span class="token number">1</span> <span class="token assign-left variable">ttl</span><span class="token operator">=</span><span class="token number">62</span> <span class="token assign-left variable">time</span><span class="token operator">=</span><span class="token number">0.823</span> ms </span><span class="code-line line-number" line="3"><span class="token number">64</span> bytes from <span class="token number">202.38</span>.64.9: <span class="token assign-left variable">icmp_seq</span><span class="token operator">=</span><span class="token number">1</span> <span class="token assign-left variable">ttl</span><span class="token operator">=</span><span class="token number">62</span> <span class="token assign-left variable">time</span><span class="token operator">=</span><span class="token number">0.823</span> ms
</span><span class="code-line line-number" line="4">TS: lixi-desktop.local <span class="token punctuation">(</span><span class="token number">210.45</span>.74.25<span class="token punctuation">)</span> <span class="token number">12522473</span> absolute </span><span class="code-line line-number" line="4">TS: lixi-desktop.local <span class="token punctuation">(</span><span class="token number">210.45</span>.74.25<span class="token punctuation">)</span> <span class="token number">12522473</span> absolute
</span><span class="code-line line-number" line="5"> <span class="token number">210.45</span>.74.1 -251 </span><span class="code-line line-number" line="5"> <span class="token number">210.45</span>.74.1 <span class="token parameter variable">-251</span>
</span><span class="code-line line-number" line="6"> local-gw.ustc.edu.cn <span class="token punctuation">(</span><span class="token number">202.38</span>.64.126<span class="token punctuation">)</span> <span class="token number">248</span> </span><span class="code-line line-number" line="6"> local-gw.ustc.edu.cn <span class="token punctuation">(</span><span class="token number">202.38</span>.64.126<span class="token punctuation">)</span> <span class="token number">248</span>
</span><span class="code-line line-number" line="7"> <span class="token number">202.38</span>.64.9 -857514 </span><span class="code-line line-number" line="7"> <span class="token number">202.38</span>.64.9 <span class="token parameter variable">-857514</span>
</span><span class="code-line line-number" line="8">Unrecorded hops: <span class="token number">3</span> </span><span class="code-line line-number" line="8">Unrecorded hops: <span class="token number">3</span>
</span><span class="code-line line-number" line="9"> </span><span class="code-line line-number" line="9">
</span><span class="code-line line-number" line="10">--- www.ustc.edu.cn <span class="token function">ping</span> statistics --- </span><span class="code-line line-number" line="10">--- www.ustc.edu.cn <span class="token function">ping</span> statistics ---
@ -173,7 +173,7 @@ host=202.38.64.9 rtt=750(187)ms/0ms delta=-857517ms/-857517ms Wed Dec 17 11:28:3
host=gigagate1.Princeton.EDU rtt=307(21)ms/271ms delta=-5ms/-5ms Wed Dec 17 11:50:16 2008 host=gigagate1.Princeton.EDU rtt=307(21)ms/271ms delta=-5ms/-5ms Wed Dec 17 11:50:16 2008
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>上面是测试一个RTT较大的目的主机和本地主机的系统时间差。不过在使用clockdiff的时候需要一点运气因为很多路由会忽略ICMP或IP时间戳。</p> <p>上面是测试一个RTT较大的目的主机和本地主机的系统时间差。不过在使用clockdiff的时候需要一点运气因为很多路由会忽略ICMP或IP时间戳。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -186,31 +186,31 @@ host=gigagate1.Princeton.EDU rtt=307(21)ms/271ms delta=-5ms/-5ms Wed Dec 17 11:5
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -244,7 +244,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728924"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402650"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728924"></script> <script type="text/javascript" src="../js/index.js?v=1661420402650"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cmp,比较两个文件是否有差异"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cmp,比较两个文件是否有差异">
<title>cmp 命令Linux cmp 命令详解:比较两个文件是否有差异 - Linux 命令搜索引擎</title> <title>cmp 命令Linux cmp 命令详解:比较两个文件是否有差异 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728935"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402658">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -169,7 +169,7 @@ Jslkadjls 85
testfile testfile1 #有差异第8字节第2行 testfile testfile1 #有差异第8字节第2行
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>注意:在比较结果中,只能够显示第一比较结果。</p> <p>注意:在比较结果中,只能够显示第一比较结果。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -182,31 +182,31 @@ testfile testfile1 #有差异第8字节第2行
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -240,7 +240,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728936"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402658"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728936"></script> <script type="text/javascript" src="../js/index.js?v=1661420402658"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,col,过滤控制字符"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,col,过滤控制字符">
<title>col 命令Linux col 命令详解:过滤控制字符 - Linux 命令搜索引擎</title> <title>col 命令Linux col 命令详解:过滤控制字符 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728944"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402663">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -131,7 +131,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
-x以多个空格字符来表示跳格字符 -x以多个空格字符来表示跳格字符
-l<缓冲区列数>预设的内存缓冲区有128列用户可以自行指定缓冲区的大小。 -l<缓冲区列数>预设的内存缓冲区有128列用户可以自行指定缓冲区的大小。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -144,31 +144,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -202,7 +202,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728945"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402664"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728945"></script> <script type="text/javascript" src="../js/index.js?v=1661420402664"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,colrm,删除文件中的指定列"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,colrm,删除文件中的指定列">
<title>colrm 命令Linux colrm 命令详解:删除文件中的指定列 - Linux 命令搜索引擎</title> <title>colrm 命令Linux colrm 命令详解:删除文件中的指定列 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728950"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402668">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -126,7 +126,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>起始列号:指定要删除的指定列;</li> <li>起始列号:指定要删除的指定列;</li>
<li>结尾列号:指定要删除的结尾列。</li> <li>结尾列号:指定要删除的结尾列。</li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -139,31 +139,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -197,7 +197,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728951"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402668"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728951"></script> <script type="text/javascript" src="../js/index.js?v=1661420402668"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,comm,按行比较两个已排序的文件。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,comm,按行比较两个已排序的文件。">
<title>comm 命令Linux comm 命令详解:按行比较两个已排序的文件。 - Linux 命令搜索引擎</title> <title>comm 命令Linux comm 命令详解:按行比较两个已排序的文件。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728974"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402690">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -126,16 +126,16 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>无选项时输出三列,第一列为<code>FILE1</code>独有的行,第二列为<code>FILE2</code>独有的行,第三列为<code>FILE1</code><code>FILE2</code>共有的行。</li> <li>无选项时输出三列,第一列为<code>FILE1</code>独有的行,第二列为<code>FILE2</code>独有的行,第三列为<code>FILE1</code><code>FILE2</code>共有的行。</li>
</ul> </ul>
<h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2> <h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-1 不输出第一列。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-1</span> 不输出第一列。
</span><span class="code-line line-number" line="2">-2 不输出第二列。 </span><span class="code-line line-number" line="2"><span class="token parameter variable">-2</span> 不输出第二列。
</span><span class="code-line line-number" line="3">-3 不输出第三列。 </span><span class="code-line line-number" line="3"><span class="token parameter variable">-3</span> 不输出第三列。
</span><span class="code-line line-number" line="4">--check-order 检查输入行是否正确的排序,即使它们确实是已排序过的。 </span><span class="code-line line-number" line="4">--check-order 检查输入行是否正确的排序,即使它们确实是已排序过的。
</span><span class="code-line line-number" line="5">--nocheck-order 不检查输入行是否正确的排序。 </span><span class="code-line line-number" line="5">--nocheck-order 不检查输入行是否正确的排序。
</span><span class="code-line line-number" line="6">--output-delimiter<span class="token operator">=</span>STR 使用STR作为输出列之间的分隔符而不是默认的TAB。 </span><span class="code-line line-number" line="6">--output-delimiter<span class="token operator">=</span>STR 使用STR作为输出列之间的分隔符而不是默认的TAB。
</span><span class="code-line line-number" line="7">--total 额外地增加第四列输出概要。 </span><span class="code-line line-number" line="7"><span class="token parameter variable">--total</span> 额外地增加第四列输出概要。
</span><span class="code-line line-number" line="8">-z, --zero-terminated 设置行终止符为NUL而不是换行符。 </span><span class="code-line line-number" line="8">-z, --zero-terminated 设置行终止符为NUL而不是换行符。
</span><span class="code-line line-number" line="9">--help 显示帮助信息并退出。 </span><span class="code-line line-number" line="9"><span class="token parameter variable">--help</span> 显示帮助信息并退出。
</span><span class="code-line line-number" line="10">--version 显示版本信息并退出。 </span><span class="code-line line-number" line="10"><span class="token parameter variable">--version</span> 显示版本信息并退出。
</span></code><div onclick="copied(this)" data-code="-1 不输出第一列 </span></code><div onclick="copied(this)" data-code="-1 不输出第一列
-2 不输出第二列。 -2 不输出第二列。
-3 不输出第三列。 -3 不输出第三列。
@ -283,7 +283,7 @@ jjj
<ol> <ol>
<li>该命令是<code>GNU coreutils</code>包中的命令,相关的帮助信息请查看<code>man -s 1 comm</code><code>info coreutils 'comm invocation'</code></li> <li>该命令是<code>GNU coreutils</code>包中的命令,相关的帮助信息请查看<code>man -s 1 comm</code><code>info coreutils 'comm invocation'</code></li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -296,31 +296,31 @@ jjj
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -354,7 +354,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728975"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402691"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728975"></script> <script type="text/javascript" src="../js/index.js?v=1661420402691"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,command,调用并执行指定的命令"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,command,调用并执行指定的命令">
<title>command 命令Linux command 命令详解:调用并执行指定的命令 - Linux 命令搜索引擎</title> <title>command 命令Linux command 命令详解:调用并执行指定的命令 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728985"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402697">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -132,7 +132,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">Linux <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">Linux
</span></code><div onclick="copied(this)" data-code="Linux </span></code><div onclick="copied(this)" data-code="Linux
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -145,31 +145,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -203,7 +203,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181728985"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402697"></script>
<script type="text/javascript" src="../js/index.js?v=1661181728985"></script> <script type="text/javascript" src="../js/index.js?v=1661420402697"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,compress,使用Lempress-Ziv编码压缩数据文件"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,compress,使用Lempress-Ziv编码压缩数据文件">
<title>compress 命令Linux compress 命令详解使用Lempress-Ziv编码压缩数据文件 - Linux 命令搜索引擎</title> <title>compress 命令Linux compress 命令详解使用Lempress-Ziv编码压缩数据文件 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181728999"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403058">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -169,7 +169,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
-rw-r--r-- 1 root root 2605 Jul 27 11:46 man.config.back.Z -rw-r--r-- 1 root root 2605 Jul 27 11:46 man.config.back.Z
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这个<code>-c</code>的选项比较有趣会将压缩过程的资料输出到屏幕上而不是写入成为file.Z文件。所以我们可以透过资料流重导向的方法将资料输出成为另一个档名。</p> <p>这个<code>-c</code>的选项比较有趣会将压缩过程的资料输出到屏幕上而不是写入成为file.Z文件。所以我们可以透过资料流重导向的方法将资料输出成为另一个档名。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -182,31 +182,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -240,7 +240,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729000"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403058"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729000"></script> <script type="text/javascript" src="../js/index.js?v=1661420403058"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,consoletype,输出已连接的终端类型"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,consoletype,输出已连接的终端类型">
<title>consoletype 命令Linux consoletype 命令详解:输出已连接的终端类型 - Linux 命令搜索引擎</title> <title>consoletype 命令Linux consoletype 命令详解:输出已连接的终端类型 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729005"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402705">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -127,7 +127,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="[root@localhost ~]# consoletype </span></code><div onclick="copied(this)" data-code="[root@localhost ~]# consoletype
pty pty
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -140,31 +140,31 @@ pty
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -198,7 +198,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729005"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402705"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729006"></script> <script type="text/javascript" src="../js/index.js?v=1661420402705"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,continue,结束本次循环继续执行下一个forwhile或until循环。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,continue,结束本次循环继续执行下一个forwhile或until循环。">
<title>continue 命令Linux continue 命令详解结束本次循环继续执行下一个forwhile或until循环。 - Linux 命令搜索引擎</title> <title>continue 命令Linux continue 命令详解结束本次循环继续执行下一个forwhile或until循环。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729030"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402721">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -198,7 +198,7 @@ done
<ol> <ol>
<li>该命令是bash内建命令相关的帮助信息请查看<code>help</code>命令。</li> <li>该命令是bash内建命令相关的帮助信息请查看<code>help</code>命令。</li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -211,31 +211,31 @@ done
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -269,7 +269,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729031"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402722"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729031"></script> <script type="text/javascript" src="../js/index.js?v=1661420402722"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,convertquota,把老的配额文件转换为新的格式"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,convertquota,把老的配额文件转换为新的格式">
<title>convertquota 命令Linux convertquota 命令详解:把老的配额文件转换为新的格式 - Linux 命令搜索引擎</title> <title>convertquota 命令Linux convertquota 命令详解:把老的配额文件转换为新的格式 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729038"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402747">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -135,10 +135,10 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<p>文件系统:指定要转换磁盘配额数据文件格式的文件系统(硬盘分区)。</p> <p>文件系统:指定要转换磁盘配额数据文件格式的文件系统(硬盘分区)。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>使用convertquota指令转换指定文件系统<code>/data</code>的磁盘配额数据文件。在命令行中输入下面的命令:</p> <p>使用convertquota指令转换指定文件系统<code>/data</code>的磁盘配额数据文件。在命令行中输入下面的命令:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">convertquota -u /data //转换文件系统<span class="token string">"/data"</span>上的用户磁盘配额文件 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">convertquota <span class="token parameter variable">-u</span> /data //转换文件系统<span class="token string">"/data"</span>上的用户磁盘配额文件
</span></code><div onclick="copied(this)" data-code="convertquota -u /data //转换文件系统&#x22;/data&#x22;上的用户磁盘配额文件 </span></code><div onclick="copied(this)" data-code="convertquota -u /data //转换文件系统&#x22;/data&#x22;上的用户磁盘配额文件
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -151,31 +151,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -209,7 +209,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729039"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402748"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729039"></script> <script type="text/javascript" src="../js/index.js?v=1661420402748"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cp,将源文件或目录复制到目标文件或目录中"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cp,将源文件或目录复制到目标文件或目录中">
<title>cp 命令Linux cp 命令详解:将源文件或目录复制到目标文件或目录中 - Linux 命令搜索引擎</title> <title>cp 命令Linux cp 命令详解:将源文件或目录复制到目标文件或目录中 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729063"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402742">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -155,11 +155,11 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>下面的第一行中是 cp 命令和具体的参数(-r 是“递归”, -u 是“更新”,-v 是“详细”)。接下来的三行显示被复制文件的信息,最后一行显示命令行提示符。这样,只拷贝新的文件到我的存储设备上,我就使用 cp 的“更新”和“详细”选项。</p> <p>下面的第一行中是 cp 命令和具体的参数(-r 是“递归”, -u 是“更新”,-v 是“详细”)。接下来的三行显示被复制文件的信息,最后一行显示命令行提示符。这样,只拷贝新的文件到我的存储设备上,我就使用 cp 的“更新”和“详细”选项。</p>
<p>通常来说,参数 <code>-r</code> 也可用更详细的风格 <code>--recursive</code>。但是以简短的方式,也可以这么连用 <code>-ruv</code></p> <p>通常来说,参数 <code>-r</code> 也可用更详细的风格 <code>--recursive</code>。但是以简短的方式,也可以这么连用 <code>-ruv</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> -r -u -v /usr/men/tmp ~/men/tmp <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> <span class="token parameter variable">-r</span> <span class="token parameter variable">-u</span> <span class="token parameter variable">-v</span> /usr/men/tmp ~/men/tmp
</span></code><div onclick="copied(this)" data-code="cp -r -u -v /usr/men/tmp ~/men/tmp </span></code><div onclick="copied(this)" data-code="cp -r -u -v /usr/men/tmp ~/men/tmp
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>版本备份 <code>--backup=numbered</code> 参数意思为“我要做个备份,而且是带编号的连续备份”。所以一个备份就是 1 号,第二个就是 2 号,等等。</p> <p>版本备份 <code>--backup=numbered</code> 参数意思为“我要做个备份,而且是带编号的连续备份”。所以一个备份就是 1 号,第二个就是 2 号,等等。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">cp</span> --force --backup<span class="token operator">=</span>numbered test1.py test1.py <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">cp</span> <span class="token parameter variable">--force</span> <span class="token parameter variable">--backup</span><span class="token operator">=</span>numbered test1.py test1.py
</span><span class="code-line line-number" line="2">$ <span class="token function">ls</span> </span><span class="code-line line-number" line="2">$ <span class="token function">ls</span>
</span><span class="code-line line-number" line="3">test1.py test1.py.~1~ test1.py.~2~ </span><span class="code-line line-number" line="3">test1.py test1.py.~1~ test1.py.~2~
</span></code><div onclick="copied(this)" data-code="$ cp --force --backup=numbered test1.py test1.py </span></code><div onclick="copied(this)" data-code="$ cp --force --backup=numbered test1.py test1.py
@ -176,24 +176,24 @@ test1.py test1.py.~1~ test1.py.~2~
</span></code><div onclick="copied(this)" data-code="cp file /usr/men/tmp/file1 </span></code><div onclick="copied(this)" data-code="cp file /usr/men/tmp/file1
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>将目录<code>/usr/men</code>下的所有文件及其子目录复制到目录<code>/usr/zh</code></p> <p>将目录<code>/usr/men</code>下的所有文件及其子目录复制到目录<code>/usr/zh</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> -r /usr/men /usr/zh <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> <span class="token parameter variable">-r</span> /usr/men /usr/zh
</span></code><div onclick="copied(this)" data-code="cp -r /usr/men /usr/zh </span></code><div onclick="copied(this)" data-code="cp -r /usr/men /usr/zh
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>交互式地将目录<code>/usr/men</code>中的以m打头的所有.c文件复制到目录<code>/usr/zh</code></p> <p>交互式地将目录<code>/usr/men</code>中的以m打头的所有.c文件复制到目录<code>/usr/zh</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> -i /usr/men m*.c /usr/zh <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> <span class="token parameter variable">-i</span> /usr/men m*.c /usr/zh
</span></code><div onclick="copied(this)" data-code="cp -i /usr/men m*.c /usr/zh </span></code><div onclick="copied(this)" data-code="cp -i /usr/men m*.c /usr/zh
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>我们在Linux下使用cp命令复制文件时候有时候会需要覆盖一些同名文件覆盖文件的时候都会有提示需要不停的按Y来确定执行覆盖。文件数量不多还好但是要是几百个估计按Y都要吐血了于是折腾来半天总结了一个方法</p> <p>我们在Linux下使用cp命令复制文件时候有时候会需要覆盖一些同名文件覆盖文件的时候都会有提示需要不停的按Y来确定执行覆盖。文件数量不多还好但是要是几百个估计按Y都要吐血了于是折腾来半天总结了一个方法</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> aaa/* /bbb <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> aaa/* /bbb
</span><span class="code-line line-number" line="2"><span class="token comment"># 复制目录aaa下所有到/bbb目录下这时如果/bbb目录下有和aaa同名的文件需要按Y来确认并且会略过aaa目录下的子目录。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 复制目录aaa下所有到/bbb目录下这时如果/bbb目录下有和aaa同名的文件需要按Y来确认并且会略过aaa目录下的子目录。</span>
</span><span class="code-line line-number" line="3"> </span><span class="code-line line-number" line="3">
</span><span class="code-line line-number" line="4"><span class="token function">cp</span> -r aaa/* /bbb </span><span class="code-line line-number" line="4"><span class="token function">cp</span> <span class="token parameter variable">-r</span> aaa/* /bbb
</span><span class="code-line line-number" line="5"><span class="token comment"># 这次依然需要按Y来确认操作但是没有忽略子目录。</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 这次依然需要按Y来确认操作但是没有忽略子目录。</span>
</span><span class="code-line line-number" line="6"> </span><span class="code-line line-number" line="6">
</span><span class="code-line line-number" line="7"><span class="token function">cp</span> -r -a aaa/* /bbb </span><span class="code-line line-number" line="7"><span class="token function">cp</span> <span class="token parameter variable">-r</span> <span class="token parameter variable">-a</span> aaa/* /bbb
</span><span class="code-line line-number" line="8"><span class="token comment"># 依然需要按Y来确认操作并且把aaa目录以及子目录和文件属性也传递到了/bbb。</span> </span><span class="code-line line-number" line="8"><span class="token comment"># 依然需要按Y来确认操作并且把aaa目录以及子目录和文件属性也传递到了/bbb。</span>
</span><span class="code-line line-number" line="9"> </span><span class="code-line line-number" line="9">
</span><span class="code-line line-number" line="10"><span class="token punctuation">\</span>cp -r -a aaa/* /bbb </span><span class="code-line line-number" line="10"><span class="token punctuation">\</span>cp <span class="token parameter variable">-r</span> <span class="token parameter variable">-a</span> aaa/* /bbb
</span><span class="code-line line-number" line="11"><span class="token comment"># 成功没有提示按Y、传递了目录属性、没有略过目录。</span> </span><span class="code-line line-number" line="11"><span class="token comment"># 成功没有提示按Y、传递了目录属性、没有略过目录。</span>
</span></code><div onclick="copied(this)" data-code="cp aaa/* /bbb </span></code><div onclick="copied(this)" data-code="cp aaa/* /bbb
# 复制目录aaa下所有到/bbb目录下这时如果/bbb目录下有和aaa同名的文件需要按Y来确认并且会略过aaa目录下的子目录。 # 复制目录aaa下所有到/bbb目录下这时如果/bbb目录下有和aaa同名的文件需要按Y来确认并且会略过aaa目录下的子目录。
@ -208,16 +208,16 @@ cp -r -a aaa/* /bbb
# 成功没有提示按Y、传递了目录属性、没有略过目录。 # 成功没有提示按Y、传递了目录属性、没有略过目录。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>递归强制复制目录到指定目录中覆盖已存在文件</p> <p>递归强制复制目录到指定目录中覆盖已存在文件</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> -rfb ./* <span class="token punctuation">..</span>/backup <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> <span class="token parameter variable">-rfb</span> ./* <span class="token punctuation">..</span>/backup
</span><span class="code-line line-number" line="2"><span class="token comment"># 将当前目录下所有文件,复制到当前目录的兄弟目录 backup 文件夹中</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 将当前目录下所有文件,复制到当前目录的兄弟目录 backup 文件夹中</span>
</span></code><div onclick="copied(this)" data-code="cp -rfb ./* ../backup </span></code><div onclick="copied(this)" data-code="cp -rfb ./* ../backup
# 将当前目录下所有文件,复制到当前目录的兄弟目录 backup 文件夹中 # 将当前目录下所有文件,复制到当前目录的兄弟目录 backup 文件夹中
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>拷贝目录下的隐藏文件如 <code>.babelrc</code></p> <p>拷贝目录下的隐藏文件如 <code>.babelrc</code></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> -r aaa/.* ./bbb <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">cp</span> <span class="token parameter variable">-r</span> aaa/.* ./bbb
</span><span class="code-line line-number" line="2"><span class="token comment"># 将 aaa 目录下的,所有`.`开头的文件,复制到 bbb 目录中。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 将 aaa 目录下的,所有`.`开头的文件,复制到 bbb 目录中。</span>
</span><span class="code-line line-number" line="3"> </span><span class="code-line line-number" line="3">
</span><span class="code-line line-number" line="4"><span class="token function">cp</span> -a aaa ./bbb/ </span><span class="code-line line-number" line="4"><span class="token function">cp</span> <span class="token parameter variable">-a</span> aaa ./bbb/
</span><span class="code-line line-number" line="5"><span class="token comment"># 记住后面目录最好的'/' 带上 `-a` 参数</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 记住后面目录最好的'/' 带上 `-a` 参数</span>
</span></code><div onclick="copied(this)" data-code="cp -r aaa/.* ./bbb </span></code><div onclick="copied(this)" data-code="cp -r aaa/.* ./bbb
# 将 aaa 目录下的,所有&#x60;.&#x60;开头的文件,复制到 bbb 目录中。 # 将 aaa 目录下的,所有&#x60;.&#x60;开头的文件,复制到 bbb 目录中。
@ -231,7 +231,7 @@ cp -a aaa ./bbb/
</span></code><div onclick="copied(this)" data-code="cp aaa.conf ./ </span></code><div onclick="copied(this)" data-code="cp aaa.conf ./
# 将 aaa.conf 复制到当前目录 # 将 aaa.conf 复制到当前目录
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -244,31 +244,31 @@ cp -a aaa ./bbb/
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -302,7 +302,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729064"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402742"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729064"></script> <script type="text/javascript" src="../js/index.js?v=1661420402742"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cpio,用来建立、还原备份档的工具程序"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cpio,用来建立、还原备份档的工具程序">
<title>cpio 命令Linux cpio 命令详解:用来建立、还原备份档的工具程序 - Linux 命令搜索引擎</title> <title>cpio 命令Linux cpio 命令详解:用来建立、还原备份档的工具程序 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729087"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402763">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -209,12 +209,12 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="find /etc type f | cpio ocvB >/opt/etc.cpio </span></code><div onclick="copied(this)" data-code="find /etc type f | cpio ocvB >/opt/etc.cpio
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>将系统上所有资料备份到磁带机内,使用以下命令:</strong></p> <p><strong>将系统上所有资料备份到磁带机内,使用以下命令:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">find</span> / -print <span class="token operator">|</span> cpio -covB <span class="token operator">></span> /dev/st0 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">find</span> / <span class="token parameter variable">-print</span> <span class="token operator">|</span> cpio <span class="token parameter variable">-covB</span> <span class="token operator">></span> /dev/st0
</span></code><div onclick="copied(this)" data-code="find / -print | cpio -covB > /dev/st0 </span></code><div onclick="copied(this)" data-code="find / -print | cpio -covB > /dev/st0
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这里的<code>/dev/st0</code>是磁带的设备名代表SCSI磁带机。</p> <p>这里的<code>/dev/st0</code>是磁带的设备名代表SCSI磁带机。</p>
<p><strong>查看上例磁带机上备份的文件,使用以下命令:</strong></p> <p><strong>查看上例磁带机上备份的文件,使用以下命令:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cpio -icdvt <span class="token operator">&#x3C;</span> /dev/st0 <span class="token operator">></span> /tmp/st_content <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cpio <span class="token parameter variable">-icdvt</span> <span class="token operator">&#x3C;</span> /dev/st0 <span class="token operator">></span> /tmp/st_content
</span></code><div onclick="copied(this)" data-code="cpio -icdvt < /dev/st0 > /tmp/st_content </span></code><div onclick="copied(this)" data-code="cpio -icdvt < /dev/st0 > /tmp/st_content
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>有时可能因为备份的文件过多,一个屏幕无法显示完毕,此时我们利用下面命令,让磁带机的文件信息输出到文件。</p> <p>有时可能因为备份的文件过多,一个屏幕无法显示完毕,此时我们利用下面命令,让磁带机的文件信息输出到文件。</p>
@ -224,7 +224,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>注意cpio恢复的路径如果cpio在打包备份的时候用的是绝对路径那么在恢复的时候会自动恢复到这些绝对路径下本例就会将备份文件全部还原到/etc路径下对应的目录中。同理如果在打包备份用的是相对路径还原时也将恢复到相对路径下。</p> <p>注意cpio恢复的路径如果cpio在打包备份的时候用的是绝对路径那么在恢复的时候会自动恢复到这些绝对路径下本例就会将备份文件全部还原到/etc路径下对应的目录中。同理如果在打包备份用的是相对路径还原时也将恢复到相对路径下。</p>
<p>通过上面的示例可以看出cpio无法直接读取文件它需要每个文件或者目录的完整路径名才能识别读取而find命令的输出刚好做到了这点因此cpio命令一般和find命令配合使用。其实上面的示例我们已经看到了它们的组合用法。</p> <p>通过上面的示例可以看出cpio无法直接读取文件它需要每个文件或者目录的完整路径名才能识别读取而find命令的输出刚好做到了这点因此cpio命令一般和find命令配合使用。其实上面的示例我们已经看到了它们的组合用法。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -237,31 +237,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -295,7 +295,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729088"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402764"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729088"></script> <script type="text/javascript" src="../js/index.js?v=1661420402764"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,crontab,提交和管理用户的需要周期性执行的任务"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,crontab,提交和管理用户的需要周期性执行的任务">
<title>crontab 命令Linux crontab 命令详解:提交和管理用户的需要周期性执行的任务 - Linux 命令搜索引擎</title> <title>crontab 命令Linux crontab 命令详解:提交和管理用户的需要周期性执行的任务 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729130"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402798">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -272,7 +272,7 @@ MAILTO=&#x22;&#x22;HOME=/
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">01 * * * * root run-parts /etc/cron.hourly <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">01 * * * * root run-parts /etc/cron.hourly
</span></code><div onclick="copied(this)" data-code="01 * * * * root run-parts /etc/cron.hourly </span></code><div onclick="copied(this)" data-code="01 * * * * root run-parts /etc/cron.hourly
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -285,31 +285,31 @@ MAILTO=&#x22;&#x22;HOME=/
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -343,7 +343,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729131"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402799"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729131"></script> <script type="text/javascript" src="../js/index.js?v=1661420402799"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,csplit,将一个大文件分割成小的碎片文件"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,csplit,将一个大文件分割成小的碎片文件">
<title>csplit 命令Linux csplit 命令详解:将一个大文件分割成小的碎片文件 - Linux 命令搜索引擎</title> <title>csplit 命令Linux csplit 命令详解:将一个大文件分割成小的碎片文件 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729150"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402815">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -186,10 +186,10 @@ server01.log server02.log server03.log server.log
<p><strong>命令详细说明:</strong></p> <p><strong>命令详细说明:</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">/<span class="token punctuation">[</span>正则表达式<span class="token punctuation">]</span>/ <span class="token comment">#匹配文本样式,比如/SERVER/从第一行到包含SERVER的匹配行。</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">/<span class="token punctuation">[</span>正则表达式<span class="token punctuation">]</span>/ <span class="token comment">#匹配文本样式,比如/SERVER/从第一行到包含SERVER的匹配行。</span>
</span><span class="code-line line-number" line="2"><span class="token punctuation">{</span>*<span class="token punctuation">}</span> <span class="token comment">#表示根据匹配重复执行分割,直到文件尾停止,使用{整数}的形式指定分割执行的次数。</span> </span><span class="code-line line-number" line="2"><span class="token punctuation">{</span>*<span class="token punctuation">}</span> <span class="token comment">#表示根据匹配重复执行分割,直到文件尾停止,使用{整数}的形式指定分割执行的次数。</span>
</span><span class="code-line line-number" line="3">-s <span class="token comment">#静默模式,不打印其他信息。</span> </span><span class="code-line line-number" line="3"><span class="token parameter variable">-s</span> <span class="token comment">#静默模式,不打印其他信息。</span>
</span><span class="code-line line-number" line="4">-n <span class="token comment">#指定分割后的文件名后缀的数字个数。比如01、02、03等。</span> </span><span class="code-line line-number" line="4"><span class="token parameter variable">-n</span> <span class="token comment">#指定分割后的文件名后缀的数字个数。比如01、02、03等。</span>
</span><span class="code-line line-number" line="5">-f <span class="token comment">#指定分割后的文件名前缀。</span> </span><span class="code-line line-number" line="5"><span class="token parameter variable">-f</span> <span class="token comment">#指定分割后的文件名前缀。</span>
</span><span class="code-line line-number" line="6">-b <span class="token comment">#指定后缀格式。比如%02d.log类似于C语言中的printf参数格式。</span> </span><span class="code-line line-number" line="6"><span class="token parameter variable">-b</span> <span class="token comment">#指定后缀格式。比如%02d.log类似于C语言中的printf参数格式。</span>
</span><span class="code-line line-number" line="7"><span class="token function">rm</span> server00.log <span class="token comment">#是删除第一个文件,因为分割后的的第一个文件没有内容,匹配的单词就位于文件的第一行中。</span> </span><span class="code-line line-number" line="7"><span class="token function">rm</span> server00.log <span class="token comment">#是删除第一个文件,因为分割后的的第一个文件没有内容,匹配的单词就位于文件的第一行中。</span>
</span></code><div onclick="copied(this)" data-code="/[正则表达式]/ #匹配文本样式比如/SERVER/从第一行到包含SERVER的匹配行 </span></code><div onclick="copied(this)" data-code="/[正则表达式]/ #匹配文本样式比如/SERVER/从第一行到包含SERVER的匹配行
{*} #表示根据匹配重复执行分割,直到文件尾停止,使用{整数}的形式指定分割执行的次数。 {*} #表示根据匹配重复执行分割,直到文件尾停止,使用{整数}的形式指定分割执行的次数。
@ -199,7 +199,7 @@ server01.log server02.log server03.log server.log
-b #指定后缀格式。比如%02d.log类似于C语言中的printf参数格式。 -b #指定后缀格式。比如%02d.log类似于C语言中的printf参数格式。
rm server00.log #是删除第一个文件,因为分割后的的第一个文件没有内容,匹配的单词就位于文件的第一行中。 rm server00.log #是删除第一个文件,因为分割后的的第一个文件没有内容,匹配的单词就位于文件的第一行中。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -212,31 +212,31 @@ rm server00.log #是删除第一个文件,因为分割后的的第一个文
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -270,7 +270,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729151"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402816"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729151"></script> <script type="text/javascript" src="../js/index.js?v=1661420402816"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cu,用于连接另一个系统主机"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cu,用于连接另一个系统主机">
<title>cu 命令Linux cu 命令详解:用于连接另一个系统主机 - Linux 命令搜索引擎</title> <title>cu 命令Linux cu 命令详解:用于连接另一个系统主机 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729165"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402828">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -126,7 +126,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-a<span class="token operator">&#x3C;</span>通信端口<span class="token operator">></span>或-p<span class="token operator">&#x3C;</span>通信端口<span class="token operator">></span>或--port<span class="token operator">&#x3C;</span>通信端口<span class="token operator">></span> 使用指定的通信端口进行连线。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-a<span class="token operator">&#x3C;</span>通信端口<span class="token operator">></span>或-p<span class="token operator">&#x3C;</span>通信端口<span class="token operator">></span>或--port<span class="token operator">&#x3C;</span>通信端口<span class="token operator">></span> 使用指定的通信端口进行连线。
</span><span class="code-line line-number" line="2">-c<span class="token operator">&#x3C;</span>电话号码<span class="token operator">></span>或--phone<span class="token operator">&#x3C;</span>电话号码<span class="token operator">></span> 拨打该电话号码。 </span><span class="code-line line-number" line="2">-c<span class="token operator">&#x3C;</span>电话号码<span class="token operator">></span>或--phone<span class="token operator">&#x3C;</span>电话号码<span class="token operator">></span> 拨打该电话号码。
</span><span class="code-line line-number" line="3">-d 进入排错模式。 </span><span class="code-line line-number" line="3"><span class="token parameter variable">-d</span> 进入排错模式。
</span><span class="code-line line-number" line="4">-e或--parity<span class="token operator">=</span>even 使用双同位检查。 </span><span class="code-line line-number" line="4">-e或--parity<span class="token operator">=</span>even 使用双同位检查。
</span><span class="code-line line-number" line="5">-E<span class="token operator">&#x3C;</span>脱离字符<span class="token operator">></span>或--escape<span class="token operator">&#x3C;</span>脱离字符<span class="token operator">></span> 设置脱离字符。 </span><span class="code-line line-number" line="5">-E<span class="token operator">&#x3C;</span>脱离字符<span class="token operator">></span>或--escape<span class="token operator">&#x3C;</span>脱离字符<span class="token operator">></span> 设置脱离字符。
</span><span class="code-line line-number" line="6">-h或--halfduple 使用半双工模式。 </span><span class="code-line line-number" line="6">-h或--halfduple 使用半双工模式。
@ -139,9 +139,9 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="13">-v或--version 显示版本信息。 </span><span class="code-line line-number" line="13">-v或--version 显示版本信息。
</span><span class="code-line line-number" line="14">-x<span class="token operator">&#x3C;</span>排错模式<span class="token operator">></span>或--debug<span class="token operator">&#x3C;</span>排错模式<span class="token operator">></span> 使用排错模式。 </span><span class="code-line line-number" line="14">-x<span class="token operator">&#x3C;</span>排错模式<span class="token operator">></span>或--debug<span class="token operator">&#x3C;</span>排错模式<span class="token operator">></span> 使用排错模式。
</span><span class="code-line line-number" line="15">-z<span class="token operator">&#x3C;</span>系统主机<span class="token operator">></span>或--system<span class="token operator">&#x3C;</span>系统主机<span class="token operator">></span> 连接该系统主机。 </span><span class="code-line line-number" line="15">-z<span class="token operator">&#x3C;</span>系统主机<span class="token operator">></span>或--system<span class="token operator">&#x3C;</span>系统主机<span class="token operator">></span> 连接该系统主机。
</span><span class="code-line line-number" line="16">--help 在线帮助。 </span><span class="code-line line-number" line="16"><span class="token parameter variable">--help</span> 在线帮助。
</span><span class="code-line line-number" line="17">--nostop 关闭Xon/Xoff软件流量控制。 </span><span class="code-line line-number" line="17"><span class="token parameter variable">--nostop</span> 关闭Xon/Xoff软件流量控制。
</span><span class="code-line line-number" line="18">--parity<span class="token operator">=</span>none 不使用同位检查。 </span><span class="code-line line-number" line="18"><span class="token parameter variable">--parity</span><span class="token operator">=</span>none 不使用同位检查。
</span></code><div onclick="copied(this)" data-code="-a<通信端口>或-p<通信端口>或--port<通信端口> 使用指定的通信端口进行连线。 </span></code><div onclick="copied(this)" data-code="-a<通信端口>或-p<通信端口>或--port<通信端口> 使用指定的通信端口进行连线。
-c<电话号码>或--phone<电话号码> 拨打该电话号码。 -c<电话号码>或--phone<电话号码> 拨打该电话号码。
-d 进入排错模式。 -d 进入排错模式。
@ -163,12 +163,12 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p>与远程主机连接</p> <p>与远程主机连接</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cu -c 0102377765 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">cu <span class="token parameter variable">-c</span> 0102377765
</span><span class="code-line line-number" line="2">cu -s <span class="token number">38400</span> <span class="token assign-left variable">9</span><span class="token operator">=</span><span class="token number">12015551234</span> </span><span class="code-line line-number" line="2">cu <span class="token parameter variable">-s</span> <span class="token number">38400</span> <span class="token assign-left variable">9</span><span class="token operator">=</span><span class="token number">12015551234</span>
</span></code><div onclick="copied(this)" data-code="cu -c 0102377765 </span></code><div onclick="copied(this)" data-code="cu -c 0102377765
cu -s 38400 9=12015551234 cu -s 38400 9=12015551234
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -181,31 +181,31 @@ cu -s 38400 9=12015551234
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -239,7 +239,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729166"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402829"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729166"></script> <script type="text/javascript" src="../js/index.js?v=1661420402829"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cupsdisable,停止指定的打印机"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cupsdisable,停止指定的打印机">
<title>cupsdisable 命令Linux cupsdisable 命令详解:停止指定的打印机 - Linux 命令搜索引擎</title> <title>cupsdisable 命令Linux cupsdisable 命令详解:停止指定的打印机 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729173"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402834">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -137,7 +137,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>目标:指定目标打印机。</p> <p>目标:指定目标打印机。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -150,31 +150,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -208,7 +208,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729174"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402834"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729174"></script> <script type="text/javascript" src="../js/index.js?v=1661420402834"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cupsenable,启动指定的打印机"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cupsenable,启动指定的打印机">
<title>cupsenable 命令Linux cupsenable 命令详解:启动指定的打印机 - Linux 命令搜索引擎</title> <title>cupsenable 命令Linux cupsenable 命令详解:启动指定的打印机 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729179"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402949">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -133,7 +133,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>目标:指定目标打印机。</p> <p>目标:指定目标打印机。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -146,31 +146,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -204,7 +204,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729180"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402949"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729180"></script> <script type="text/javascript" src="../js/index.js?v=1661420402949"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,curl,利用URL规则在命令行下工作的文件传输工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,curl,利用URL规则在命令行下工作的文件传输工具">
<title>curl 命令Linux curl 命令详解利用URL规则在命令行下工作的文件传输工具 - Linux 命令搜索引擎</title> <title>curl 命令Linux curl 命令详解利用URL规则在命令行下工作的文件传输工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729309"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402944">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -124,17 +124,17 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">-a/--append <span class="token comment"># 上传文件时,附加到目标文件 </span> <pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">-a/--append <span class="token comment"># 上传文件时,附加到目标文件 </span>
</span><span class="code-line line-number" line="2">-A/--user-agent <span class="token comment"># 设置用户代理发送给服务器 </span> </span><span class="code-line line-number" line="2">-A/--user-agent <span class="token comment"># 设置用户代理发送给服务器 </span>
</span><span class="code-line line-number" line="3">-anyauth <span class="token comment"># 可以使用“任何”身份验证方法 </span> </span><span class="code-line line-number" line="3"><span class="token parameter variable">-anyauth</span> <span class="token comment"># 可以使用“任何”身份验证方法 </span>
</span><span class="code-line line-number" line="4">-b/--cookie <span class="token comment"># cookie字符串或文件读取位置 </span> </span><span class="code-line line-number" line="4">-b/--cookie <span class="token comment"># cookie字符串或文件读取位置 </span>
</span><span class="code-line line-number" line="5">     --basic <span class="token comment"># 使用HTTP基本验证 </span> </span><span class="code-line line-number" line="5">     <span class="token parameter variable">--basic</span> <span class="token comment"># 使用HTTP基本验证 </span>
</span><span class="code-line line-number" line="6">-B/--use-ascii <span class="token comment"># 使用ASCII /文本传输 </span> </span><span class="code-line line-number" line="6">-B/--use-ascii <span class="token comment"># 使用ASCII /文本传输 </span>
</span><span class="code-line line-number" line="7">-c/--cookie-jar <span class="token comment"># 操作结束后把cookie写入到这个文件中 </span> </span><span class="code-line line-number" line="7">-c/--cookie-jar <span class="token comment"># 操作结束后把cookie写入到这个文件中 </span>
</span><span class="code-line line-number" line="8">-C/--continue-at <span class="token comment"># 断点续传 </span> </span><span class="code-line line-number" line="8">-C/--continue-at <span class="token comment"># 断点续传 </span>
</span><span class="code-line line-number" line="9">-d/--data <span class="token comment"># HTTP POST方式传送数据 </span> </span><span class="code-line line-number" line="9">-d/--data <span class="token comment"># HTTP POST方式传送数据 </span>
</span><span class="code-line line-number" line="10">     --data-ascii <span class="token comment"># 以ascii的方式post数据 </span> </span><span class="code-line line-number" line="10">     --data-ascii <span class="token comment"># 以ascii的方式post数据 </span>
</span><span class="code-line line-number" line="11">     --data-binary <span class="token comment"># 以二进制的方式post数据 </span> </span><span class="code-line line-number" line="11">     --data-binary <span class="token comment"># 以二进制的方式post数据 </span>
</span><span class="code-line line-number" line="12">     --negotiate <span class="token comment"># 使用HTTP身份验证 </span> </span><span class="code-line line-number" line="12">     <span class="token parameter variable">--negotiate</span> <span class="token comment"># 使用HTTP身份验证 </span>
</span><span class="code-line line-number" line="13">     --digest <span class="token comment"># 使用数字身份验证 </span> </span><span class="code-line line-number" line="13">     <span class="token parameter variable">--digest</span> <span class="token comment"># 使用数字身份验证 </span>
</span><span class="code-line line-number" line="14">     --disable-eprt <span class="token comment"># 禁止使用EPRT或LPRT </span> </span><span class="code-line line-number" line="14">     --disable-eprt <span class="token comment"># 禁止使用EPRT或LPRT </span>
</span><span class="code-line line-number" line="15">     --disable-epsv <span class="token comment"># 禁止使用EPSV </span> </span><span class="code-line line-number" line="15">     --disable-epsv <span class="token comment"># 禁止使用EPSV </span>
</span><span class="code-line line-number" line="16">-D/--dump-header <span class="token comment"># 把header信息写入到该文件中 </span> </span><span class="code-line line-number" line="16">-D/--dump-header <span class="token comment"># 把header信息写入到该文件中 </span>
@ -143,17 +143,17 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="19">-e/--referer <span class="token comment"># 来源网址 </span> </span><span class="code-line line-number" line="19">-e/--referer <span class="token comment"># 来源网址 </span>
</span><span class="code-line line-number" line="20">-E/--cert <span class="token comment"># 客户端证书文件和密码 (SSL)</span> </span><span class="code-line line-number" line="20">-E/--cert <span class="token comment"># 客户端证书文件和密码 (SSL)</span>
</span><span class="code-line line-number" line="21">     --cert-type <span class="token comment"># 证书文件类型 (DER/PEM/ENG) (SSL)</span> </span><span class="code-line line-number" line="21">     --cert-type <span class="token comment"># 证书文件类型 (DER/PEM/ENG) (SSL)</span>
</span><span class="code-line line-number" line="22">     --key <span class="token comment"># 私钥文件名 (SSL)</span> </span><span class="code-line line-number" line="22">     <span class="token parameter variable">--key</span> <span class="token comment"># 私钥文件名 (SSL)</span>
</span><span class="code-line line-number" line="23">     --key-type <span class="token comment"># 私钥文件类型 (DER/PEM/ENG) (SSL)</span> </span><span class="code-line line-number" line="23">     --key-type <span class="token comment"># 私钥文件类型 (DER/PEM/ENG) (SSL)</span>
</span><span class="code-line line-number" line="24">     --pass <span class="token comment"># 私钥密码 (SSL)</span> </span><span class="code-line line-number" line="24">     <span class="token parameter variable">--pass</span> <span class="token comment"># 私钥密码 (SSL)</span>
</span><span class="code-line line-number" line="25">     --engine <span class="token comment"># 加密引擎使用 (SSL). "--engine list" for list </span> </span><span class="code-line line-number" line="25">     <span class="token parameter variable">--engine</span> <span class="token comment"># 加密引擎使用 (SSL). "--engine list" for list </span>
</span><span class="code-line line-number" line="26">     --cacert <span class="token comment"># CA证书 (SSL)</span> </span><span class="code-line line-number" line="26">     <span class="token parameter variable">--cacert</span> <span class="token comment"># CA证书 (SSL)</span>
</span><span class="code-line line-number" line="27">     --capath <span class="token comment"># CA目录 (made using c\_rehash) to verify peer against (SSL)</span> </span><span class="code-line line-number" line="27">     <span class="token parameter variable">--capath</span> <span class="token comment"># CA目录 (made using c\_rehash) to verify peer against (SSL)</span>
</span><span class="code-line line-number" line="28">     --ciphers <span class="token comment"># SSL密码 </span> </span><span class="code-line line-number" line="28">     <span class="token parameter variable">--ciphers</span> <span class="token comment"># SSL密码 </span>
</span><span class="code-line line-number" line="29">     --compressed <span class="token comment"># 要求返回是压缩的形势 (using deflate or gzip)</span> </span><span class="code-line line-number" line="29">     <span class="token parameter variable">--compressed</span> <span class="token comment"># 要求返回是压缩的形势 (using deflate or gzip)</span>
</span><span class="code-line line-number" line="30">     --connect-timeout <span class="token comment"># 设置最大请求时间 </span> </span><span class="code-line line-number" line="30">     --connect-timeout <span class="token comment"># 设置最大请求时间 </span>
</span><span class="code-line line-number" line="31">     --create-dirs <span class="token comment"># 建立本地目录的目录层次结构 </span> </span><span class="code-line line-number" line="31">     --create-dirs <span class="token comment"># 建立本地目录的目录层次结构 </span>
</span><span class="code-line line-number" line="32">     --crlf <span class="token comment"># 上传是把LF转变成CRLF </span> </span><span class="code-line line-number" line="32">     <span class="token parameter variable">--crlf</span> <span class="token comment"># 上传是把LF转变成CRLF </span>
</span><span class="code-line line-number" line="33">-f/--fail <span class="token comment"># 连接失败时不显示http错误 </span> </span><span class="code-line line-number" line="33">-f/--fail <span class="token comment"># 连接失败时不显示http错误 </span>
</span><span class="code-line line-number" line="34">     --ftp-create-dirs <span class="token comment"># 如果远程目录不存在,创建远程目录 </span> </span><span class="code-line line-number" line="34">     --ftp-create-dirs <span class="token comment"># 如果远程目录不存在,创建远程目录 </span>
</span><span class="code-line line-number" line="35">     --ftp-method <span class="token punctuation">\</span><span class="token punctuation">[</span>multicwd/nocwd/singlecwd<span class="token punctuation">]</span> <span class="token comment"># 控制CWD的使用 </span> </span><span class="code-line line-number" line="35">     --ftp-method <span class="token punctuation">\</span><span class="token punctuation">[</span>multicwd/nocwd/singlecwd<span class="token punctuation">]</span> <span class="token comment"># 控制CWD的使用 </span>
@ -170,8 +170,8 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="46">-i/--include <span class="token comment"># 输出时包括protocol头信息 </span> </span><span class="code-line line-number" line="46">-i/--include <span class="token comment"># 输出时包括protocol头信息 </span>
</span><span class="code-line line-number" line="47">-I/--head <span class="token comment"># 只显示请求头信息 </span> </span><span class="code-line line-number" line="47">-I/--head <span class="token comment"># 只显示请求头信息 </span>
</span><span class="code-line line-number" line="48">-j/--junk-session-cookies <span class="token comment"># 读取文件进忽略session cookie </span> </span><span class="code-line line-number" line="48">-j/--junk-session-cookies <span class="token comment"># 读取文件进忽略session cookie </span>
</span><span class="code-line line-number" line="49">     --interface <span class="token comment"># 使用指定网络接口/地址 </span> </span><span class="code-line line-number" line="49">     <span class="token parameter variable">--interface</span> <span class="token comment"># 使用指定网络接口/地址 </span>
</span><span class="code-line line-number" line="50">     --krb4 <span class="token comment"># 使用指定安全级别的krb4 </span> </span><span class="code-line line-number" line="50">     <span class="token parameter variable">--krb4</span> <span class="token comment"># 使用指定安全级别的krb4 </span>
</span><span class="code-line line-number" line="51">-k/--insecure <span class="token comment"># 允许不使用证书到SSL站点 </span> </span><span class="code-line line-number" line="51">-k/--insecure <span class="token comment"># 允许不使用证书到SSL站点 </span>
</span><span class="code-line line-number" line="52">-K/--config <span class="token comment"># 指定的配置文件读取 </span> </span><span class="code-line line-number" line="52">-K/--config <span class="token comment"># 指定的配置文件读取 </span>
</span><span class="code-line line-number" line="53">-l/--list-only <span class="token comment"># 列出ftp目录下的文件名称 </span> </span><span class="code-line line-number" line="53">-l/--list-only <span class="token comment"># 列出ftp目录下的文件名称 </span>
@ -183,7 +183,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="59">-M/--manual <span class="token comment"># 显示全手动 </span> </span><span class="code-line line-number" line="59">-M/--manual <span class="token comment"># 显示全手动 </span>
</span><span class="code-line line-number" line="60">-n/--netrc <span class="token comment"># 从netrc文件中读取用户名和密码 </span> </span><span class="code-line line-number" line="60">-n/--netrc <span class="token comment"># 从netrc文件中读取用户名和密码 </span>
</span><span class="code-line line-number" line="61">     --netrc-optional <span class="token comment"># 使用 .netrc 或者 URL来覆盖-n </span> </span><span class="code-line line-number" line="61">     --netrc-optional <span class="token comment"># 使用 .netrc 或者 URL来覆盖-n </span>
</span><span class="code-line line-number" line="62">     --ntlm <span class="token comment"># 使用 HTTP NTLM 身份验证 </span> </span><span class="code-line line-number" line="62">     <span class="token parameter variable">--ntlm</span> <span class="token comment"># 使用 HTTP NTLM 身份验证 </span>
</span><span class="code-line line-number" line="63">-N/--no-buffer <span class="token comment"># 禁用缓冲输出 </span> </span><span class="code-line line-number" line="63">-N/--no-buffer <span class="token comment"># 禁用缓冲输出 </span>
</span><span class="code-line line-number" line="64">-o/--output <span class="token comment"># 把输出写到该文件中 </span> </span><span class="code-line line-number" line="64">-o/--output <span class="token comment"># 把输出写到该文件中 </span>
</span><span class="code-line line-number" line="65">-O/--remote-name <span class="token comment"># 把输出写到该文件中,保留远程文件的文件名 </span> </span><span class="code-line line-number" line="65">-O/--remote-name <span class="token comment"># 把输出写到该文件中,保留远程文件的文件名 </span>
@ -193,25 +193,25 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="69">     --proxy-digest <span class="token comment"># 在代理上使用数字身份验证 </span> </span><span class="code-line line-number" line="69">     --proxy-digest <span class="token comment"># 在代理上使用数字身份验证 </span>
</span><span class="code-line line-number" line="70">     --proxy-ntlm <span class="token comment"># 在代理上使用ntlm身份验证 </span> </span><span class="code-line line-number" line="70">     --proxy-ntlm <span class="token comment"># 在代理上使用ntlm身份验证 </span>
</span><span class="code-line line-number" line="71">-P/--ftp-port <span class="token comment"># 使用端口地址而不是使用PASV </span> </span><span class="code-line line-number" line="71">-P/--ftp-port <span class="token comment"># 使用端口地址而不是使用PASV </span>
</span><span class="code-line line-number" line="72">-q <span class="token comment"># 作为第一个参数,关闭 .curlrc </span> </span><span class="code-line line-number" line="72"><span class="token parameter variable">-q</span> <span class="token comment"># 作为第一个参数,关闭 .curlrc </span>
</span><span class="code-line line-number" line="73">-Q/--quote <span class="token comment"># 文件传输前,发送命令到服务器 </span> </span><span class="code-line line-number" line="73">-Q/--quote <span class="token comment"># 文件传输前,发送命令到服务器 </span>
</span><span class="code-line line-number" line="74">-r/--range <span class="token comment"># 检索来自HTTP/1.1或FTP服务器字节范围 </span> </span><span class="code-line line-number" line="74">-r/--range <span class="token comment"># 检索来自HTTP/1.1或FTP服务器字节范围 </span>
</span><span class="code-line line-number" line="75">--range-file <span class="token comment"># 读取SSL的随机文件 </span> </span><span class="code-line line-number" line="75">--range-file <span class="token comment"># 读取SSL的随机文件 </span>
</span><span class="code-line line-number" line="76">-R/--remote-time <span class="token comment"># 在本地生成文件时,保留远程文件时间 </span> </span><span class="code-line line-number" line="76">-R/--remote-time <span class="token comment"># 在本地生成文件时,保留远程文件时间 </span>
</span><span class="code-line line-number" line="77">     --retry <span class="token comment"># 传输出现问题时,重试的次数 </span> </span><span class="code-line line-number" line="77">     <span class="token parameter variable">--retry</span> <span class="token comment"># 传输出现问题时,重试的次数 </span>
</span><span class="code-line line-number" line="78">     --retry-delay <span class="token comment"># 传输出现问题时,设置重试间隔时间 </span> </span><span class="code-line line-number" line="78">     --retry-delay <span class="token comment"># 传输出现问题时,设置重试间隔时间 </span>
</span><span class="code-line line-number" line="79">     --retry-max-time <span class="token comment"># 传输出现问题时,设置最大重试时间 </span> </span><span class="code-line line-number" line="79">     --retry-max-time <span class="token comment"># 传输出现问题时,设置最大重试时间 </span>
</span><span class="code-line line-number" line="80">-s/--silent <span class="token comment"># 静默模式。不输出任何东西 </span> </span><span class="code-line line-number" line="80">-s/--silent <span class="token comment"># 静默模式。不输出任何东西 </span>
</span><span class="code-line line-number" line="81">-S/--show-error <span class="token comment"># 显示错误 </span> </span><span class="code-line line-number" line="81">-S/--show-error <span class="token comment"># 显示错误 </span>
</span><span class="code-line line-number" line="82">     --socks4 <span class="token comment"># 用socks4代理给定主机和端口 </span> </span><span class="code-line line-number" line="82">     <span class="token parameter variable">--socks4</span> <span class="token comment"># 用socks4代理给定主机和端口 </span>
</span><span class="code-line line-number" line="83">     --socks5 <span class="token comment"># 用socks5代理给定主机和端口 </span> </span><span class="code-line line-number" line="83">     <span class="token parameter variable">--socks5</span> <span class="token comment"># 用socks5代理给定主机和端口 </span>
</span><span class="code-line line-number" line="84">     --stderr <span class="token comment">#   </span> </span><span class="code-line line-number" line="84">     <span class="token parameter variable">--stderr</span> <span class="token comment">#   </span>
</span><span class="code-line line-number" line="85">-t/--telnet-option <span class="token comment"># Telnet选项设置 </span> </span><span class="code-line line-number" line="85">-t/--telnet-option <span class="token comment"># Telnet选项设置 </span>
</span><span class="code-line line-number" line="86">     --trace <span class="token comment"># 对指定文件进行debug </span> </span><span class="code-line line-number" line="86">     <span class="token parameter variable">--trace</span> <span class="token comment"># 对指定文件进行debug </span>
</span><span class="code-line line-number" line="87">     --trace-ascii <span class="token comment"># Like --跟踪但没有hex输出 </span> </span><span class="code-line line-number" line="87">     --trace-ascii <span class="token comment"># Like --跟踪但没有hex输出 </span>
</span><span class="code-line line-number" line="88">     --trace-time <span class="token comment"># 跟踪/详细输出时,添加时间戳 </span> </span><span class="code-line line-number" line="88">     --trace-time <span class="token comment"># 跟踪/详细输出时,添加时间戳 </span>
</span><span class="code-line line-number" line="89">-T/--upload-file <span class="token comment"># 上传文件 </span> </span><span class="code-line line-number" line="89">-T/--upload-file <span class="token comment"># 上传文件 </span>
</span><span class="code-line line-number" line="90">     --url <span class="token comment"># Spet URL to work with </span> </span><span class="code-line line-number" line="90">     <span class="token parameter variable">--url</span> <span class="token comment"># Spet URL to work with </span>
</span><span class="code-line line-number" line="91">-u/--user <span class="token comment"># 设置服务器的用户和密码 </span> </span><span class="code-line line-number" line="91">-u/--user <span class="token comment"># 设置服务器的用户和密码 </span>
</span><span class="code-line line-number" line="92">-U/--proxy-user <span class="token comment"># 设置代理用户名和密码 </span> </span><span class="code-line line-number" line="92">-U/--proxy-user <span class="token comment"># 设置代理用户名和密码 </span>
</span><span class="code-line line-number" line="93">-w/--write-out <span class="token punctuation">\</span><span class="token punctuation">[</span>format<span class="token punctuation">]</span> <span class="token comment"># 什么输出完成后 </span> </span><span class="code-line line-number" line="93">-w/--write-out <span class="token punctuation">\</span><span class="token punctuation">[</span>format<span class="token punctuation">]</span> <span class="token comment"># 什么输出完成后 </span>
@ -322,37 +322,37 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<p><strong>文件下载</strong></p> <p><strong>文件下载</strong></p>
<p>curl命令可以用来执行下载、发送各种HTTP请求指定HTTP头部等操作。如果系统没有curl可以使用<code>yum install curl</code>安装也可以下载安装。curl是将下载文件输出到stdout将进度信息输出到stderr不显示进度信息使用<code>--silent</code>选项。</p> <p>curl命令可以用来执行下载、发送各种HTTP请求指定HTTP头部等操作。如果系统没有curl可以使用<code>yum install curl</code>安装也可以下载安装。curl是将下载文件输出到stdout将进度信息输出到stderr不显示进度信息使用<code>--silent</code>选项。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> URL --silent <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> URL <span class="token parameter variable">--silent</span>
</span></code><div onclick="copied(this)" data-code="curl URL --silent </span></code><div onclick="copied(this)" data-code="curl URL --silent
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>这条命令是将下载文件输出到终端所有下载的数据都被写入到stdout。</p> <p>这条命令是将下载文件输出到终端所有下载的数据都被写入到stdout。</p>
<p>使用选项<code>-O</code>将下载的数据写入到文件,必须使用文件的绝对地址:</p> <p>使用选项<code>-O</code>将下载的数据写入到文件,必须使用文件的绝对地址:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> http://example.com/text.iso --silent -O <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> http://example.com/text.iso <span class="token parameter variable">--silent</span> <span class="token parameter variable">-O</span>
</span></code><div onclick="copied(this)" data-code="curl http://example.com/text.iso --silent -O </span></code><div onclick="copied(this)" data-code="curl http://example.com/text.iso --silent -O
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>选项<code>-o</code>将下载数据写入到指定名称的文件中,并使用<code>--progress</code>显示进度条:</p> <p>选项<code>-o</code>将下载数据写入到指定名称的文件中,并使用<code>--progress</code>显示进度条:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> http://example.com/test.iso -o filename.iso --progress <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> http://example.com/test.iso <span class="token parameter variable">-o</span> filename.iso <span class="token parameter variable">--progress</span>
</span><span class="code-line line-number" line="2"><span class="token comment">######################################### 100.0%</span> </span><span class="code-line line-number" line="2"><span class="token comment">######################################### 100.0%</span>
</span></code><div onclick="copied(this)" data-code="curl http://example.com/test.iso -o filename.iso --progress </span></code><div onclick="copied(this)" data-code="curl http://example.com/test.iso -o filename.iso --progress
######################################### 100.0% ######################################### 100.0%
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>不输出错误和进度信息</strong></p> <p><strong>不输出错误和进度信息</strong></p>
<p><code>-s</code> 参数将不输出错误和进度信息。</p> <p><code>-s</code> 参数将不输出错误和进度信息。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -s https://www.example.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-s</span> https://www.example.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令一旦发生错误,不会显示错误信息。不发生错误的话,会正常显示运行结果。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令一旦发生错误,不会显示错误信息。不发生错误的话,会正常显示运行结果。</span>
</span></code><div onclick="copied(this)" data-code="curl -s https://www.example.com </span></code><div onclick="copied(this)" data-code="curl -s https://www.example.com
# 上面命令一旦发生错误,不会显示错误信息。不发生错误的话,会正常显示运行结果。 # 上面命令一旦发生错误,不会显示错误信息。不发生错误的话,会正常显示运行结果。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>如果想让 curl 不产生任何输出,可以使用下面的命令。</p> <p>如果想让 curl 不产生任何输出,可以使用下面的命令。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -s -o /dev/null https://google.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-s</span> <span class="token parameter variable">-o</span> /dev/null https://google.com
</span></code><div onclick="copied(this)" data-code="curl -s -o /dev/null https://google.com </span></code><div onclick="copied(this)" data-code="curl -s -o /dev/null https://google.com
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>断点续传</strong></p> <p><strong>断点续传</strong></p>
<p>curl能够从特定的文件偏移处继续下载它可以通过指定一个便宜量来下载部分文件</p> <p>curl能够从特定的文件偏移处继续下载它可以通过指定一个便宜量来下载部分文件</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> URL/File -C 偏移量 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> URL/File <span class="token parameter variable">-C</span> 偏移量
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3"><span class="token comment">#偏移量是以字节为单位的整数如果让curl自动推断出正确的续传位置使用-C -</span> </span><span class="code-line line-number" line="3"><span class="token comment">#偏移量是以字节为单位的整数如果让curl自动推断出正确的续传位置使用-C -</span>
</span><span class="code-line line-number" line="4"><span class="token function">curl</span> -C -URL </span><span class="code-line line-number" line="4"><span class="token function">curl</span> <span class="token parameter variable">-C</span> <span class="token parameter variable">-URL</span>
</span></code><div onclick="copied(this)" data-code="curl URL/File -C 偏移量 </span></code><div onclick="copied(this)" data-code="curl URL/File -C 偏移量
#偏移量是以字节为单位的整数如果让curl自动推断出正确的续传位置使用-C - #偏移量是以字节为单位的整数如果让curl自动推断出正确的续传位置使用-C -
@ -361,18 +361,18 @@ curl -C -URL
<p><strong>使用curl设置参照页字符串</strong></p> <p><strong>使用curl设置参照页字符串</strong></p>
<p>参照页是位于HTTP头部中的一个字符串用来表示用户是从哪个页面到达当前页面的如果用户点击网页A中的某个连接那么用户就会跳转到B网页网页B头部的参照页字符串就包含网页A的URL。</p> <p>参照页是位于HTTP头部中的一个字符串用来表示用户是从哪个页面到达当前页面的如果用户点击网页A中的某个连接那么用户就会跳转到B网页网页B头部的参照页字符串就包含网页A的URL。</p>
<p>使用<code>--referer</code>选项指定参照页字符串:</p> <p>使用<code>--referer</code>选项指定参照页字符串:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> --referer http://www.google.com http://wangchujiang.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">--referer</span> http://www.google.com http://wangchujiang.com
</span></code><div onclick="copied(this)" data-code="curl --referer http://www.google.com http://wangchujiang.com </span></code><div onclick="copied(this)" data-code="curl --referer http://www.google.com http://wangchujiang.com
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>用curl设置用户代理字符串</strong></p> <p><strong>用curl设置用户代理字符串</strong></p>
<p>有些网站访问会提示只能使用IE浏览器来访问这是因为这些网站设置了检查用户代理可以使用curl把用户代理设置为IE这样就可以访问了。使用<code>--user-agent</code>或者<code>-A</code>选项:</p> <p>有些网站访问会提示只能使用IE浏览器来访问这是因为这些网站设置了检查用户代理可以使用curl把用户代理设置为IE这样就可以访问了。使用<code>--user-agent</code>或者<code>-A</code>选项:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> URL --user-agent <span class="token string">"Mozilla/5.0"</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> URL --user-agent <span class="token string">"Mozilla/5.0"</span>
</span><span class="code-line line-number" line="2"><span class="token function">curl</span> URL -A <span class="token string">"Mozilla/5.0"</span> </span><span class="code-line line-number" line="2"><span class="token function">curl</span> URL <span class="token parameter variable">-A</span> <span class="token string">"Mozilla/5.0"</span>
</span></code><div onclick="copied(this)" data-code="curl URL --user-agent &#x22;Mozilla/5.0&#x22; </span></code><div onclick="copied(this)" data-code="curl URL --user-agent &#x22;Mozilla/5.0&#x22;
curl URL -A &#x22;Mozilla/5.0&#x22; curl URL -A &#x22;Mozilla/5.0&#x22;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>其他HTTP头部信息也可以使用curl来发送使用<code>-H</code>"头部信息" 传递多个头部信息,例如:</p> <p>其他HTTP头部信息也可以使用curl来发送使用<code>-H</code>"头部信息" 传递多个头部信息,例如:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -H <span class="token string">"Host:wangchujiang.com"</span> -H <span class="token string">"accept-language:zh-cn"</span> URL <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-H</span> <span class="token string">"Host:wangchujiang.com"</span> <span class="token parameter variable">-H</span> <span class="token string">"accept-language:zh-cn"</span> URL
</span></code><div onclick="copied(this)" data-code="curl -H &#x22;Host:wangchujiang.com&#x22; -H &#x22;accept-language:zh-cn&#x22; URL </span></code><div onclick="copied(this)" data-code="curl -H &#x22;Host:wangchujiang.com&#x22; -H &#x22;accept-language:zh-cn&#x22; URL
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>curl的带宽控制和下载配额</strong></p> <p><strong>curl的带宽控制和下载配额</strong></p>
@ -393,8 +393,8 @@ curl URL -A &#x22;Mozilla/5.0&#x22;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>用curl进行认证</strong></p> <p><strong>用curl进行认证</strong></p>
<p>使用curl选项 -u 可以完成HTTP或者FTP的认证可以指定密码也可以不指定密码在后续操作中输入密码</p> <p>使用curl选项 -u 可以完成HTTP或者FTP的认证可以指定密码也可以不指定密码在后续操作中输入密码</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -u user:pwd http://wangchujiang.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-u</span> user:pwd http://wangchujiang.com
</span><span class="code-line line-number" line="2"><span class="token function">curl</span> -u user http://wangchujiang.com </span><span class="code-line line-number" line="2"><span class="token function">curl</span> <span class="token parameter variable">-u</span> user http://wangchujiang.com
</span></code><div onclick="copied(this)" data-code="curl -u user:pwd http://wangchujiang.com </span></code><div onclick="copied(this)" data-code="curl -u user:pwd http://wangchujiang.com
curl -u user http://wangchujiang.com curl -u user http://wangchujiang.com
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
@ -419,20 +419,20 @@ X-Pingback: http://wangchujiang.com/xmlrpc.php
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>get请求</strong></p> <p><strong>get请求</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地</span>
</span><span class="code-line line-number" line="2"><span class="token function">curl</span> -i <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 显示全部信息</span> </span><span class="code-line line-number" line="2"><span class="token function">curl</span> <span class="token parameter variable">-i</span> <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 显示全部信息</span>
</span><span class="code-line line-number" line="3"><span class="token function">curl</span> -l <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 显示页面内容</span> </span><span class="code-line line-number" line="3"><span class="token function">curl</span> <span class="token parameter variable">-l</span> <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 显示页面内容</span>
</span><span class="code-line line-number" line="4"><span class="token function">curl</span> -v <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 显示get请求全过程解析</span> </span><span class="code-line line-number" line="4"><span class="token function">curl</span> <span class="token parameter variable">-v</span> <span class="token string">"http://www.wangchujiang.com"</span> <span class="token comment"># 显示get请求全过程解析</span>
</span></code><div onclick="copied(this)" data-code="curl &#x22;http://www.wangchujiang.com&#x22; # 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地 </span></code><div onclick="copied(this)" data-code="curl &#x22;http://www.wangchujiang.com&#x22; # 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地
curl -i &#x22;http://www.wangchujiang.com&#x22; # 显示全部信息 curl -i &#x22;http://www.wangchujiang.com&#x22; # 显示全部信息
curl -l &#x22;http://www.wangchujiang.com&#x22; # 显示页面内容 curl -l &#x22;http://www.wangchujiang.com&#x22; # 显示页面内容
curl -v &#x22;http://www.wangchujiang.com&#x22; # 显示get请求全过程解析 curl -v &#x22;http://www.wangchujiang.com&#x22; # 显示get请求全过程解析
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>post请求</strong></p> <p><strong>post请求</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">curl</span> -d <span class="token string">"param1=value1&#x26;param2=value2"</span> <span class="token string">"http://www.wangchujiang.com/login"</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">curl</span> <span class="token parameter variable">-d</span> <span class="token string">"param1=value1&#x26;param2=value2"</span> <span class="token string">"http://www.wangchujiang.com/login"</span>
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3"><span class="token function">curl</span> -d<span class="token string">'login=emmapassword=123'</span> -X POST https://wangchujiang.com/login </span><span class="code-line line-number" line="3"><span class="token function">curl</span> -d<span class="token string">'login=emmapassword=123'</span> <span class="token parameter variable">-X</span> POST https://wangchujiang.com/login
</span><span class="code-line line-number" line="4"><span class="token comment"># 或者</span> </span><span class="code-line line-number" line="4"><span class="token comment"># 或者</span>
</span><span class="code-line line-number" line="5">$ <span class="token function">curl</span> -d <span class="token string">'login=emma'</span> -d <span class="token string">'password=123'</span> -X POST https://wangchujiang.com/login </span><span class="code-line line-number" line="5">$ <span class="token function">curl</span> <span class="token parameter variable">-d</span> <span class="token string">'login=emma'</span> <span class="token parameter variable">-d</span> <span class="token string">'password=123'</span> <span class="token parameter variable">-X</span> POST https://wangchujiang.com/login
</span></code><div onclick="copied(this)" data-code="$ curl -d &#x22;param1=value1&#x26;param2=value2&#x22; &#x22;http://www.wangchujiang.com/login&#x22; </span></code><div onclick="copied(this)" data-code="$ curl -d &#x22;param1=value1&#x26;param2=value2&#x22; &#x22;http://www.wangchujiang.com/login&#x22;
curl -d&#x27;login=emmapassword=123&#x27; -X POST https://wangchujiang.com/login curl -d&#x27;login=emmapassword=123&#x27; -X POST https://wangchujiang.com/login
@ -446,18 +446,18 @@ $ curl -d &#x27;login=emma&#x27; -d &#x27;password=123&#x27; -X POST https://wa
# 上面代码中发送的数据hello world之间有一个空格需要进行 URL 编码。 # 上面代码中发送的数据hello world之间有一个空格需要进行 URL 编码。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>读取本地文本文件的数据,向服务器发送</strong></p> <p><strong>读取本地文本文件的数据,向服务器发送</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -d <span class="token string">'@data.txt'</span> https://wangchujiang.com/upload <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-d</span> <span class="token string">'@data.txt'</span> https://wangchujiang.com/upload
</span><span class="code-line line-number" line="2"><span class="token comment"># 读取data.txt文件的内容作为数据体向服务器发送。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 读取data.txt文件的内容作为数据体向服务器发送。</span>
</span></code><div onclick="copied(this)" data-code="curl -d &#x27;@data.txt&#x27; https://wangchujiang.com/upload </span></code><div onclick="copied(this)" data-code="curl -d &#x27;@data.txt&#x27; https://wangchujiang.com/upload
# 读取data.txt文件的内容作为数据体向服务器发送。 # 读取data.txt文件的内容作为数据体向服务器发送。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>json格式的post请求</strong></p> <p><strong>json格式的post请求</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -l -H <span class="token string">"Content-type: application/json"</span> -X POST -d <span class="token string">'{"phone":"13521389587","password":"test"}'</span> http://wangchujiang.com/apis/users.json <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-l</span> <span class="token parameter variable">-H</span> <span class="token string">"Content-type: application/json"</span> <span class="token parameter variable">-X</span> POST <span class="token parameter variable">-d</span> <span class="token string">'{"phone":"13521389587","password":"test"}'</span> http://wangchujiang.com/apis/users.json
</span></code><div onclick="copied(this)" data-code="curl -l -H &#x22;Content-type: application/json&#x22; -X POST -d &#x27;{&#x22;phone&#x22;:&#x22;13521389587&#x22;,&#x22;password&#x22;:&#x22;test&#x22;}&#x27; http://wangchujiang.com/apis/users.json </span></code><div onclick="copied(this)" data-code="curl -l -H &#x22;Content-type: application/json&#x22; -X POST -d &#x27;{&#x22;phone&#x22;:&#x22;13521389587&#x22;,&#x22;password&#x22;:&#x22;test&#x22;}&#x27; http://wangchujiang.com/apis/users.json
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>向服务器发送 Cookie</strong></p> <p><strong>向服务器发送 Cookie</strong></p>
<p>使用<code>--cookie "COKKIES"</code>选项来指定cookie多个cookie使用分号分隔</p> <p>使用<code>--cookie "COKKIES"</code>选项来指定cookie多个cookie使用分号分隔</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> http://wangchujiang.com --cookie <span class="token string">"user=root;pass=123456"</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> http://wangchujiang.com <span class="token parameter variable">--cookie</span> <span class="token string">"user=root;pass=123456"</span>
</span></code><div onclick="copied(this)" data-code="curl http://wangchujiang.com --cookie &#x22;user=root;pass=123456&#x22; </span></code><div onclick="copied(this)" data-code="curl http://wangchujiang.com --cookie &#x22;user=root;pass=123456&#x22;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>将cookie另存为一个文件使用<code>--cookie-jar</code>选项:</p> <p>将cookie另存为一个文件使用<code>--cookie-jar</code>选项:</p>
@ -465,16 +465,16 @@ $ curl -d &#x27;login=emma&#x27; -d &#x27;password=123&#x27; -X POST https://wa
</span></code><div onclick="copied(this)" data-code="curl URL --cookie-jar cookie_file </span></code><div onclick="copied(this)" data-code="curl URL --cookie-jar cookie_file
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><code>-b</code> 参数用来向服务器发送 Cookie。</p> <p><code>-b</code> 参数用来向服务器发送 Cookie。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -b <span class="token string">'foo=bar'</span> https://taobao.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-b</span> <span class="token string">'foo=bar'</span> https://taobao.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令会生成一个标头Cookie: foo=bar向服务器发送一个名为foo、值为bar的 Cookie。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令会生成一个标头Cookie: foo=bar向服务器发送一个名为foo、值为bar的 Cookie。</span>
</span></code><div onclick="copied(this)" data-code="curl -b &#x27;foo=bar&#x27; https://taobao.com </span></code><div onclick="copied(this)" data-code="curl -b &#x27;foo=bar&#x27; https://taobao.com
# 上面命令会生成一个标头Cookie: foo=bar向服务器发送一个名为foo、值为bar的 Cookie。 # 上面命令会生成一个标头Cookie: foo=bar向服务器发送一个名为foo、值为bar的 Cookie。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -b <span class="token string">'foo1=bar'</span> -b <span class="token string">'foo2=baz'</span> https://taobao.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-b</span> <span class="token string">'foo1=bar'</span> <span class="token parameter variable">-b</span> <span class="token string">'foo2=baz'</span> https://taobao.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令发送两个 Cookie。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令发送两个 Cookie。</span>
</span><span class="code-line line-number" line="3"> </span><span class="code-line line-number" line="3">
</span><span class="code-line line-number" line="4">```shell </span><span class="code-line line-number" line="4">```shell
</span><span class="code-line line-number" line="5"><span class="token function">curl</span> -b cookies.txt https://www.taobao.com </span><span class="code-line line-number" line="5"><span class="token function">curl</span> <span class="token parameter variable">-b</span> cookies.txt https://www.taobao.com
</span><span class="code-line line-number" line="6"><span class="token comment"># 上面命令读取本地文件 cookies.txt里面是服务器设置的 Cookie参见-c参数将其发送到服务器。</span> </span><span class="code-line line-number" line="6"><span class="token comment"># 上面命令读取本地文件 cookies.txt里面是服务器设置的 Cookie参见-c参数将其发送到服务器。</span>
</span></code><div onclick="copied(this)" data-code="curl -b &#x27;foo1=bar&#x27; -b &#x27;foo2=baz&#x27; https://taobao.com </span></code><div onclick="copied(this)" data-code="curl -b &#x27;foo1=bar&#x27; -b &#x27;foo2=baz&#x27; https://taobao.com
# 上面命令发送两个 Cookie。 # 上面命令发送两个 Cookie。
@ -484,77 +484,77 @@ curl -b cookies.txt https://www.taobao.com
# 上面命令读取本地文件 cookies.txt里面是服务器设置的 Cookie参见-c参数将其发送到服务器。 # 上面命令读取本地文件 cookies.txt里面是服务器设置的 Cookie参见-c参数将其发送到服务器。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>Cookie 写入一个文件</strong></p> <p><strong>Cookie 写入一个文件</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -c cookies.txt https://www.taobao.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-c</span> cookies.txt https://www.taobao.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令将服务器的 HTTP 回应所设置 Cookie 写入文本文件cookies.txt。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令将服务器的 HTTP 回应所设置 Cookie 写入文本文件cookies.txt。</span>
</span></code><div onclick="copied(this)" data-code="curl -c cookies.txt https://www.taobao.com </span></code><div onclick="copied(this)" data-code="curl -c cookies.txt https://www.taobao.com
# 上面命令将服务器的 HTTP 回应所设置 Cookie 写入文本文件cookies.txt。 # 上面命令将服务器的 HTTP 回应所设置 Cookie 写入文本文件cookies.txt。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>请求的来源</strong></p> <p><strong>请求的来源</strong></p>
<p><code>-e</code> 参数用来设置 <code>HTTP</code> 的标头 <code>Referer</code>,表示请求的来源。</p> <p><code>-e</code> 参数用来设置 <code>HTTP</code> 的标头 <code>Referer</code>,表示请求的来源。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -e <span class="token string">'https://taobao.com?q=example'</span> https://www.example.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-e</span> <span class="token string">'https://taobao.com?q=example'</span> https://www.example.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令将Referer标头设为 https://taobao.com?q=example。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令将Referer标头设为 https://taobao.com?q=example。</span>
</span></code><div onclick="copied(this)" data-code="curl -e &#x27;https://taobao.com?q=example&#x27; https://www.example.com </span></code><div onclick="copied(this)" data-code="curl -e &#x27;https://taobao.com?q=example&#x27; https://www.example.com
# 上面命令将Referer标头设为 https://taobao.com?q=example。 # 上面命令将Referer标头设为 https://taobao.com?q=example。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><code>-H</code> 参数可以通过直接添加标头 <code>Referer</code>,达到同样效果。</p> <p><code>-H</code> 参数可以通过直接添加标头 <code>Referer</code>,达到同样效果。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -H <span class="token string">'Referer: https://taobao.com?q=example'</span> https://www.example.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-H</span> <span class="token string">'Referer: https://taobao.com?q=example'</span> https://www.example.com
</span></code><div onclick="copied(this)" data-code="curl -H &#x27;Referer: https://taobao.com?q=example&#x27; https://www.example.com </span></code><div onclick="copied(this)" data-code="curl -H &#x27;Referer: https://taobao.com?q=example&#x27; https://www.example.com
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>上传二进制文件</strong></p> <p><strong>上传二进制文件</strong></p>
<p><code>-F</code> 参数用来向服务器上传二进制文件。</p> <p><code>-F</code> 参数用来向服务器上传二进制文件。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -F <span class="token string">'file=@photo.png'</span> https://taobao.com/profile <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-F</span> <span class="token string">'file=@photo.png'</span> https://taobao.com/profile
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令会给 HTTP 请求加上标头 Content-Type: multipart/form-data 然后将文件photo.png作为file字段上传。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令会给 HTTP 请求加上标头 Content-Type: multipart/form-data 然后将文件photo.png作为file字段上传。</span>
</span></code><div onclick="copied(this)" data-code="curl -F &#x27;file=@photo.png&#x27; https://taobao.com/profile </span></code><div onclick="copied(this)" data-code="curl -F &#x27;file=@photo.png&#x27; https://taobao.com/profile
# 上面命令会给 HTTP 请求加上标头 Content-Type: multipart/form-data 然后将文件photo.png作为file字段上传。 # 上面命令会给 HTTP 请求加上标头 Content-Type: multipart/form-data 然后将文件photo.png作为file字段上传。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><code>-F</code> 参数可以指定 <code>MIME</code> 类型。</p> <p><code>-F</code> 参数可以指定 <code>MIME</code> 类型。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -F <span class="token string">'file=@photo.png;type=image/png'</span> https://taobao.com/profile <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-F</span> <span class="token string">'file=@photo.png;type=image/png'</span> https://taobao.com/profile
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令指定 MIME 类型为image/png否则 curl 会把 MIME 类型设为 application/octet-stream。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令指定 MIME 类型为image/png否则 curl 会把 MIME 类型设为 application/octet-stream。</span>
</span></code><div onclick="copied(this)" data-code="curl -F &#x27;file=@photo.png;type=image/png&#x27; https://taobao.com/profile </span></code><div onclick="copied(this)" data-code="curl -F &#x27;file=@photo.png;type=image/png&#x27; https://taobao.com/profile
# 上面命令指定 MIME 类型为image/png否则 curl 会把 MIME 类型设为 application/octet-stream。 # 上面命令指定 MIME 类型为image/png否则 curl 会把 MIME 类型设为 application/octet-stream。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><code>-F</code> 参数也可以指定文件名。</p> <p><code>-F</code> 参数也可以指定文件名。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -F <span class="token string">'file=@photo.png;filename=me.png'</span> https://taobao.com/profile <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-F</span> <span class="token string">'file=@photo.png;filename=me.png'</span> https://taobao.com/profile
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令中原始文件名为photo.png但是服务器接收到的文件名为me.png。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令中原始文件名为photo.png但是服务器接收到的文件名为me.png。</span>
</span></code><div onclick="copied(this)" data-code="curl -F &#x27;file=@photo.png;filename=me.png&#x27; https://taobao.com/profile </span></code><div onclick="copied(this)" data-code="curl -F &#x27;file=@photo.png;filename=me.png&#x27; https://taobao.com/profile
# 上面命令中原始文件名为photo.png但是服务器接收到的文件名为me.png。 # 上面命令中原始文件名为photo.png但是服务器接收到的文件名为me.png。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>设置请求头</strong></p> <p><strong>设置请求头</strong></p>
<p><code>-H</code> 参数添加 <code>HTTP</code> 请求的标头。</p> <p><code>-H</code> 参数添加 <code>HTTP</code> 请求的标头。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -H <span class="token string">'Accept-Language: en-US'</span> https://google.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-H</span> <span class="token string">'Accept-Language: en-US'</span> https://google.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令添加 HTTP 标头 Accept-Language: en-US。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令添加 HTTP 标头 Accept-Language: en-US。</span>
</span></code><div onclick="copied(this)" data-code="curl -H &#x27;Accept-Language: en-US&#x27; https://google.com </span></code><div onclick="copied(this)" data-code="curl -H &#x27;Accept-Language: en-US&#x27; https://google.com
# 上面命令添加 HTTP 标头 Accept-Language: en-US。 # 上面命令添加 HTTP 标头 Accept-Language: en-US。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -H <span class="token string">'Accept-Language: en-US'</span> -H <span class="token string">'Secret-Message: xyzzy'</span> https://google.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-H</span> <span class="token string">'Accept-Language: en-US'</span> <span class="token parameter variable">-H</span> <span class="token string">'Secret-Message: xyzzy'</span> https://google.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令添加两个 HTTP 标头。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令添加两个 HTTP 标头。</span>
</span></code><div onclick="copied(this)" data-code="curl -H &#x27;Accept-Language: en-US&#x27; -H &#x27;Secret-Message: xyzzy&#x27; https://google.com </span></code><div onclick="copied(this)" data-code="curl -H &#x27;Accept-Language: en-US&#x27; -H &#x27;Secret-Message: xyzzy&#x27; https://google.com
# 上面命令添加两个 HTTP 标头。 # 上面命令添加两个 HTTP 标头。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -d <span class="token string">'{"login": "emma", "pass": "123"}'</span> -H <span class="token string">'Content-Type: application/json'</span> https://google.com/login <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-d</span> <span class="token string">'{"login": "emma", "pass": "123"}'</span> <span class="token parameter variable">-H</span> <span class="token string">'Content-Type: application/json'</span> https://google.com/login
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令添加 HTTP 请求的标头是 Content-Type: application/json然后用 -d 参数发送 JSON 数据。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令添加 HTTP 请求的标头是 Content-Type: application/json然后用 -d 参数发送 JSON 数据。</span>
</span></code><div onclick="copied(this)" data-code="curl -d &#x27;{&#x22;login&#x22;: &#x22;emma&#x22;, &#x22;pass&#x22;: &#x22;123&#x22;}&#x27; -H &#x27;Content-Type: application/json&#x27; https://google.com/login </span></code><div onclick="copied(this)" data-code="curl -d &#x27;{&#x22;login&#x22;: &#x22;emma&#x22;, &#x22;pass&#x22;: &#x22;123&#x22;}&#x27; -H &#x27;Content-Type: application/json&#x27; https://google.com/login
# 上面命令添加 HTTP 请求的标头是 Content-Type: application/json然后用 -d 参数发送 JSON 数据。 # 上面命令添加 HTTP 请求的标头是 Content-Type: application/json然后用 -d 参数发送 JSON 数据。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>跳过 SSL 检测</strong></p> <p><strong>跳过 SSL 检测</strong></p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -k https://www.example.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-k</span> https://www.example.com
</span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令不会检查服务器的 SSL 证书是否正确。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># 上面命令不会检查服务器的 SSL 证书是否正确。</span>
</span></code><div onclick="copied(this)" data-code="curl -k https://www.example.com </span></code><div onclick="copied(this)" data-code="curl -k https://www.example.com
# 上面命令不会检查服务器的 SSL 证书是否正确。 # 上面命令不会检查服务器的 SSL 证书是否正确。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>请求跟随服务器的重定向</strong></p> <p><strong>请求跟随服务器的重定向</strong></p>
<p><code>-L</code> 参数会让 <code>HTTP</code> 请求跟随服务器的重定向。<code>curl</code> 默认不跟随重定向。</p> <p><code>-L</code> 参数会让 <code>HTTP</code> 请求跟随服务器的重定向。<code>curl</code> 默认不跟随重定向。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -L -d <span class="token string">'tweet=hi'</span> https://api.example.com/tweet <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-L</span> <span class="token parameter variable">-d</span> <span class="token string">'tweet=hi'</span> https://api.example.com/tweet
</span></code><div onclick="copied(this)" data-code="curl -L -d &#x27;tweet=hi&#x27; https://api.example.com/tweet </span></code><div onclick="copied(this)" data-code="curl -L -d &#x27;tweet=hi&#x27; https://api.example.com/tweet
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>调试参数</strong></p> <p><strong>调试参数</strong></p>
<p><code>-v</code> 参数输出通信的整个过程,用于调试。</p> <p><code>-v</code> 参数输出通信的整个过程,用于调试。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> -v https://www.example.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">-v</span> https://www.example.com
</span><span class="code-line line-number" line="2"><span class="token comment"># --trace参数也可以用于调试还会输出原始的二进制数据。</span> </span><span class="code-line line-number" line="2"><span class="token comment"># --trace参数也可以用于调试还会输出原始的二进制数据。</span>
</span></code><div onclick="copied(this)" data-code="curl -v https://www.example.com </span></code><div onclick="copied(this)" data-code="curl -v https://www.example.com
# --trace参数也可以用于调试还会输出原始的二进制数据。 # --trace参数也可以用于调试还会输出原始的二进制数据。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">curl</span> --trace - https://www.example.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">curl</span> <span class="token parameter variable">--trace</span> - https://www.example.com
</span></code><div onclick="copied(this)" data-code="$ curl --trace - https://www.example.com </span></code><div onclick="copied(this)" data-code="$ curl --trace - https://www.example.com
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p><strong>获取本机外网ip</strong></p> <p><strong>获取本机外网ip</strong></p>
@ -595,7 +595,7 @@ Total Time:\t\t\t%{time_total}s\n
<li><code>time_total</code>: 完整耗时。</li> <li><code>time_total</code>: 完整耗时。</li>
</ul> </ul>
<p>然后执行请求,通过 @filename 指定保存了格式化字符串的文件:</p> <p>然后执行请求,通过 @filename 指定保存了格式化字符串的文件:</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">curl</span> -L -s -w @fmt.txt -o /dev/null http://www.google.com <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">curl</span> <span class="token parameter variable">-L</span> <span class="token parameter variable">-s</span> <span class="token parameter variable">-w</span> @fmt.txt <span class="token parameter variable">-o</span> /dev/null http://www.google.com
</span></code><div onclick="copied(this)" data-code="$ curl -L -s -w @fmt.txt -o /dev/null http://www.google.com </span></code><div onclick="copied(this)" data-code="$ curl -L -s -w @fmt.txt -o /dev/null http://www.google.com
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>输出:</p> <p>输出:</p>
@ -621,7 +621,7 @@ Start-transfer Time: 0.260115s
Total Time: 0.467691s Total Time: 0.467691s
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="要求返回是压缩的状态"><a class="anchor" aria-hidden="true" tabindex="-1" href="#要求返回是压缩的状态"><span class="octicon octicon-link"></span></a>要求返回是压缩的状态</h3> <h3 id="要求返回是压缩的状态"><a class="anchor" aria-hidden="true" tabindex="-1" href="#要求返回是压缩的状态"><span class="octicon octicon-link"></span></a>要求返回是压缩的状态</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> --compressed -o- -L https://yarnpkg.com/install.sh <span class="token operator">|</span> <span class="token function">bash</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">curl</span> <span class="token parameter variable">--compressed</span> -o- <span class="token parameter variable">-L</span> https://yarnpkg.com/install.sh <span class="token operator">|</span> <span class="token function">bash</span>
</span><span class="code-line line-number" line="2"> % Total % Received % Xferd Average Speed Time Time Time Current </span><span class="code-line line-number" line="2"> % Total % Received % Xferd Average Speed Time Time Time Current
</span><span class="code-line line-number" line="3"> Dload Upload Total Spent Left Speed </span><span class="code-line line-number" line="3"> Dload Upload Total Spent Left Speed
</span><span class="code-line line-number" line="4"><span class="token number">100</span> <span class="token number">54</span> <span class="token number">100</span> <span class="token number">54</span> <span class="token number">0</span> <span class="token number">0</span> <span class="token number">42</span> <span class="token number">0</span> <span class="token number">0</span>:00:01 <span class="token number">0</span>:00:01 --:--:-- <span class="token number">42</span> </span><span class="code-line line-number" line="4"><span class="token number">100</span> <span class="token number">54</span> <span class="token number">100</span> <span class="token number">54</span> <span class="token number">0</span> <span class="token number">0</span> <span class="token number">42</span> <span class="token number">0</span> <span class="token number">0</span>:00:01 <span class="token number">0</span>:00:01 --:--:-- <span class="token number">42</span>
@ -664,7 +664,7 @@ Installing Yarn!
100 647 100 647 0 0 1283 0 --:--:-- --:--:-- --:--:-- 1283 100 647 100 647 0 0 1283 0 --:--:-- --:--:-- --:--:-- 1283
100 832 100 832 0 0 1107 0 --:--:-- --:--:-- --:--:-- 812k 100 832 100 832 0 0 1107 0 --:--:-- --:--:-- --:--:-- 812k
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -677,31 +677,31 @@ Installing Yarn!
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -735,7 +735,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729310"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402944"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729310"></script> <script type="text/javascript" src="../js/index.js?v=1661420402944"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cut,连接文件并打印到标准输出设备上"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,cut,连接文件并打印到标准输出设备上">
<title>cut 命令Linux cut 命令详解:连接文件并打印到标准输出设备上 - Linux 命令搜索引擎</title> <title>cut 命令Linux cut 命令详解:连接文件并打印到标准输出设备上 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729341"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420402973">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -297,7 +297,7 @@ efghijklmnopqrstuvwxyz
efghijklmnopqrstuvwxyz efghijklmnopqrstuvwxyz
efghijklmnopqrstuvwxyz efghijklmnopqrstuvwxyz
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre><!-- Linux 命令行搜索引擎https://jaywcjlove.github.io/linux-command/ --> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre><!-- Linux 命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -310,31 +310,31 @@ efghijklmnopqrstuvwxyz
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -368,7 +368,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729341"></script> <script type="text/javascript" src="../js/dt.js?v=1661420402974"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729341"></script> <script type="text/javascript" src="../js/index.js?v=1661420402974"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,date,显示或设置系统时间与日期"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,date,显示或设置系统时间与日期">
<title>date 命令Linux date 命令详解:显示或设置系统时间与日期 - Linux 命令搜索引擎</title> <title>date 命令Linux date 命令详解:显示或设置系统时间与日期 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729423"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403014">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -252,19 +252,19 @@ _ (下划线) 使用空格填充相应的字段。
<h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2> <h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">长选项与短选项等价 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">长选项与短选项等价
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">-d, --date<span class="token operator">=</span>STRING 解析字符串并按照指定格式输出,字符串不能是<span class="token string">'now'</span> </span><span class="code-line line-number" line="3">-d, <span class="token parameter variable">--date</span><span class="token operator">=</span>STRING 解析字符串并按照指定格式输出,字符串不能是<span class="token string">'now'</span>
</span><span class="code-line line-number" line="4">--debug 注释已解析的日期,并将有疑问的用法发送到标准错误。 </span><span class="code-line line-number" line="4"><span class="token parameter variable">--debug</span> 注释已解析的日期,并将有疑问的用法发送到标准错误。
</span><span class="code-line line-number" line="5">-f, --file<span class="token operator">=</span>DATEFILE 类似于--date<span class="token punctuation">;</span> 一次从DATEFILE处理一行。 </span><span class="code-line line-number" line="5">-f, <span class="token parameter variable">--file</span><span class="token operator">=</span>DATEFILE 类似于--date<span class="token punctuation">;</span> 一次从DATEFILE处理一行。
</span><span class="code-line line-number" line="6">-I<span class="token punctuation">[</span>FMT<span class="token punctuation">]</span>, --iso-8601<span class="token punctuation">[</span><span class="token operator">=</span>FMT<span class="token punctuation">]</span> 按照ISO <span class="token number">8601</span>格式输出FMT可以为<span class="token string">'date'</span><span class="token punctuation">(</span>默认<span class="token punctuation">)</span><span class="token string">'hours'</span><span class="token string">'minutes'</span><span class="token string">'seconds'</span><span class="token string">'ns'</span> </span><span class="code-line line-number" line="6">-I<span class="token punctuation">[</span>FMT<span class="token punctuation">]</span>, --iso-8601<span class="token punctuation">[</span><span class="token operator">=</span>FMT<span class="token punctuation">]</span> 按照ISO <span class="token number">8601</span>格式输出FMT可以为<span class="token string">'date'</span><span class="token punctuation">(</span>默认<span class="token punctuation">)</span><span class="token string">'hours'</span><span class="token string">'minutes'</span><span class="token string">'seconds'</span><span class="token string">'ns'</span>
</span><span class="code-line line-number" line="7"> 例如2006-08-14T02:34:56-06:00 </span><span class="code-line line-number" line="7"> 例如2006-08-14T02:34:56-06:00
</span><span class="code-line line-number" line="8">-R, --rfc-email 按照RFC <span class="token number">5322</span>格式输出,例如: Mon, <span class="token number">14</span> Aug <span class="token number">2006</span> 02:34:56 -0600 </span><span class="code-line line-number" line="8">-R, --rfc-email 按照RFC <span class="token number">5322</span>格式输出,例如: Mon, <span class="token number">14</span> Aug <span class="token number">2006</span> 02:34:56 <span class="token parameter variable">-0600</span>
</span><span class="code-line line-number" line="9">--rfc-3339<span class="token operator">=</span>FMT 按照RFC <span class="token number">3339</span>格式输出FMT可以为<span class="token string">'date'</span>, <span class="token string">'seconds'</span>,<span class="token string">'ns'</span>中的一个, </span><span class="code-line line-number" line="9">--rfc-3339<span class="token operator">=</span>FMT 按照RFC <span class="token number">3339</span>格式输出FMT可以为<span class="token string">'date'</span>, <span class="token string">'seconds'</span>,<span class="token string">'ns'</span>中的一个,
</span><span class="code-line line-number" line="10"> 例如2006-08-14 02:34:56-06:00 </span><span class="code-line line-number" line="10"> 例如2006-08-14 02:34:56-06:00
</span><span class="code-line line-number" line="11">-r, --reference<span class="token operator">=</span>FILE 显示文件的上次修改时间。 </span><span class="code-line line-number" line="11">-r, <span class="token parameter variable">--reference</span><span class="token operator">=</span>FILE 显示文件的上次修改时间。
</span><span class="code-line line-number" line="12">-s, --set<span class="token operator">=</span>STRING 根据字符串设置系统时间。 </span><span class="code-line line-number" line="12">-s, <span class="token parameter variable">--set</span><span class="token operator">=</span>STRING 根据字符串设置系统时间。
</span><span class="code-line line-number" line="13">-u, --utc, --universal 显示或设置世界协调时<span class="token punctuation">(</span>UTC<span class="token punctuation">)</span> </span><span class="code-line line-number" line="13">-u, --utc, <span class="token parameter variable">--universal</span> 显示或设置世界协调时<span class="token punctuation">(</span>UTC<span class="token punctuation">)</span>
</span><span class="code-line line-number" line="14">--help 显示帮助信息并退出。 </span><span class="code-line line-number" line="14"><span class="token parameter variable">--help</span> 显示帮助信息并退出。
</span><span class="code-line line-number" line="15">--version 显示版本信息并退出。 </span><span class="code-line line-number" line="15"><span class="token parameter variable">--version</span> 显示版本信息并退出。
</span></code><div onclick="copied(this)" data-code="长选项与短选项等价 </span></code><div onclick="copied(this)" data-code="长选项与短选项等价
-d, --date=STRING 解析字符串并按照指定格式输出,字符串不能是&#x27;now&#x27; -d, --date=STRING 解析字符串并按照指定格式输出,字符串不能是&#x27;now&#x27;
@ -289,52 +289,52 @@ _ (下划线) 使用空格填充相应的字段。
</span><span class="code-line line-number" line="3"><span class="token number">2009</span>-12-07 </span><span class="code-line line-number" line="3"><span class="token number">2009</span>-12-07
</span><span class="code-line line-number" line="4"> </span><span class="code-line line-number" line="4">
</span><span class="code-line line-number" line="5"><span class="token comment"># 输出昨天日期:</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 输出昨天日期:</span>
</span><span class="code-line line-number" line="6"><span class="token function">date</span> -d <span class="token string">"1 day ago"</span> +<span class="token string">"%Y-%m-%d"</span> </span><span class="code-line line-number" line="6"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"1 day ago"</span> +<span class="token string">"%Y-%m-%d"</span>
</span><span class="code-line line-number" line="7"><span class="token number">2012</span>-11-19 </span><span class="code-line line-number" line="7"><span class="token number">2012</span>-11-19
</span><span class="code-line line-number" line="8"> </span><span class="code-line line-number" line="8">
</span><span class="code-line line-number" line="9"><span class="token comment"># 2秒后输出</span> </span><span class="code-line line-number" line="9"><span class="token comment"># 2秒后输出</span>
</span><span class="code-line line-number" line="10"><span class="token function">date</span> -d <span class="token string">"2 second"</span> +<span class="token string">"%Y-%m-%d %H:%M.%S"</span> </span><span class="code-line line-number" line="10"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"2 second"</span> +<span class="token string">"%Y-%m-%d %H:%M.%S"</span>
</span><span class="code-line line-number" line="11"><span class="token number">2012</span>-11-20 <span class="token number">14</span>:21.31 </span><span class="code-line line-number" line="11"><span class="token number">2012</span>-11-20 <span class="token number">14</span>:21.31
</span><span class="code-line line-number" line="12"> </span><span class="code-line line-number" line="12">
</span><span class="code-line line-number" line="13"><span class="token comment"># 传说中的 1234567890 秒:</span> </span><span class="code-line line-number" line="13"><span class="token comment"># 传说中的 1234567890 秒:</span>
</span><span class="code-line line-number" line="14"><span class="token function">date</span> -d <span class="token string">"1970-01-01 1234567890 seconds"</span> +<span class="token string">"%Y-%m-%d %H:%M:%S"</span> </span><span class="code-line line-number" line="14"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"1970-01-01 1234567890 seconds"</span> +<span class="token string">"%Y-%m-%d %H:%M:%S"</span>
</span><span class="code-line line-number" line="15"><span class="token comment"># 或者</span> </span><span class="code-line line-number" line="15"><span class="token comment"># 或者</span>
</span><span class="code-line line-number" line="16"><span class="token function">date</span> -d@1234567890 +<span class="token string">"%F %T"</span> </span><span class="code-line line-number" line="16"><span class="token function">date</span> -d@1234567890 +<span class="token string">"%F %T"</span>
</span><span class="code-line line-number" line="17"><span class="token comment"># 输出结果</span> </span><span class="code-line line-number" line="17"><span class="token comment"># 输出结果</span>
</span><span class="code-line line-number" line="18"><span class="token number">2009</span>-02-13 <span class="token number">23</span>:02:30 </span><span class="code-line line-number" line="18"><span class="token number">2009</span>-02-13 <span class="token number">23</span>:02:30
</span><span class="code-line line-number" line="19"> </span><span class="code-line line-number" line="19">
</span><span class="code-line line-number" line="20"><span class="token comment"># 时间格式转换:</span> </span><span class="code-line line-number" line="20"><span class="token comment"># 时间格式转换:</span>
</span><span class="code-line line-number" line="21"><span class="token function">date</span> -d <span class="token string">"2009-12-12"</span> +<span class="token string">"%Y/%m/%d %H:%M.%S"</span> </span><span class="code-line line-number" line="21"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"2009-12-12"</span> +<span class="token string">"%Y/%m/%d %H:%M.%S"</span>
</span><span class="code-line line-number" line="22"><span class="token comment"># 输出结果</span> </span><span class="code-line line-number" line="22"><span class="token comment"># 输出结果</span>
</span><span class="code-line line-number" line="23"><span class="token number">2009</span>/12/12 00:00.00 </span><span class="code-line line-number" line="23"><span class="token number">2009</span>/12/12 00:00.00
</span><span class="code-line line-number" line="24"> </span><span class="code-line line-number" line="24">
</span><span class="code-line line-number" line="25"><span class="token comment"># apache格式转换</span> </span><span class="code-line line-number" line="25"><span class="token comment"># apache格式转换</span>
</span><span class="code-line line-number" line="26"><span class="token function">date</span> -d <span class="token string">"Dec 5, 2009 12:00:37 AM"</span> +<span class="token string">"%Y-%m-%d %H:%M.%S"</span> </span><span class="code-line line-number" line="26"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"Dec 5, 2009 12:00:37 AM"</span> +<span class="token string">"%Y-%m-%d %H:%M.%S"</span>
</span><span class="code-line line-number" line="27"><span class="token comment"># 输出结果</span> </span><span class="code-line line-number" line="27"><span class="token comment"># 输出结果</span>
</span><span class="code-line line-number" line="28"><span class="token number">2009</span>-12-05 00:00.37 </span><span class="code-line line-number" line="28"><span class="token number">2009</span>-12-05 00:00.37
</span><span class="code-line line-number" line="29"> </span><span class="code-line line-number" line="29">
</span><span class="code-line line-number" line="30"><span class="token comment"># 格式转换后时间游走:</span> </span><span class="code-line line-number" line="30"><span class="token comment"># 格式转换后时间游走:</span>
</span><span class="code-line line-number" line="31"><span class="token function">date</span> -d <span class="token string">"Dec 5, 2009 12:00:37 AM 2 year ago"</span> +<span class="token string">"%Y-%m-%d %H:%M.%S"</span> </span><span class="code-line line-number" line="31"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"Dec 5, 2009 12:00:37 AM 2 year ago"</span> +<span class="token string">"%Y-%m-%d %H:%M.%S"</span>
</span><span class="code-line line-number" line="32"><span class="token comment"># 输出结果</span> </span><span class="code-line line-number" line="32"><span class="token comment"># 输出结果</span>
</span><span class="code-line line-number" line="33"><span class="token number">2007</span>-12-05 00:00.37 </span><span class="code-line line-number" line="33"><span class="token number">2007</span>-12-05 00:00.37
</span><span class="code-line line-number" line="34"> </span><span class="code-line line-number" line="34">
</span><span class="code-line line-number" line="35"><span class="token comment"># 时间加减操作:</span> </span><span class="code-line line-number" line="35"><span class="token comment"># 时间加减操作:</span>
</span><span class="code-line line-number" line="36"><span class="token function">date</span> +%Y%m%d <span class="token comment"># 显示年月日</span> </span><span class="code-line line-number" line="36"><span class="token function">date</span> +%Y%m%d <span class="token comment"># 显示年月日</span>
</span><span class="code-line line-number" line="37"><span class="token function">date</span> -d <span class="token string">"+1 day"</span> +%Y%m%d <span class="token comment"># 显示前一天的日期</span> </span><span class="code-line line-number" line="37"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"+1 day"</span> +%Y%m%d <span class="token comment"># 显示前一天的日期</span>
</span><span class="code-line line-number" line="38"><span class="token function">date</span> -d <span class="token string">"-1 day"</span> +%Y%m%d <span class="token comment"># 显示后一天的日期</span> </span><span class="code-line line-number" line="38"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"-1 day"</span> +%Y%m%d <span class="token comment"># 显示后一天的日期</span>
</span><span class="code-line line-number" line="39"><span class="token function">date</span> -d <span class="token string">"-1 month"</span> +%Y%m%d <span class="token comment"># 显示上一月的日期</span> </span><span class="code-line line-number" line="39"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"-1 month"</span> +%Y%m%d <span class="token comment"># 显示上一月的日期</span>
</span><span class="code-line line-number" line="40"><span class="token function">date</span> -d <span class="token string">"+1 month"</span> +%Y%m%d <span class="token comment"># 显示下一月的日期</span> </span><span class="code-line line-number" line="40"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"+1 month"</span> +%Y%m%d <span class="token comment"># 显示下一月的日期</span>
</span><span class="code-line line-number" line="41"><span class="token function">date</span> -d <span class="token string">"-1 year"</span> +%Y%m%d <span class="token comment"># 显示前一年的日期</span> </span><span class="code-line line-number" line="41"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"-1 year"</span> +%Y%m%d <span class="token comment"># 显示前一年的日期</span>
</span><span class="code-line line-number" line="42"><span class="token function">date</span> -d <span class="token string">"+1 year"</span> +%Y%m%d <span class="token comment"># 显示下一年的日期</span> </span><span class="code-line line-number" line="42"><span class="token function">date</span> <span class="token parameter variable">-d</span> <span class="token string">"+1 year"</span> +%Y%m%d <span class="token comment"># 显示下一年的日期</span>
</span><span class="code-line line-number" line="43"> </span><span class="code-line line-number" line="43">
</span><span class="code-line line-number" line="44"><span class="token comment"># 设定时间:</span> </span><span class="code-line line-number" line="44"><span class="token comment"># 设定时间:</span>
</span><span class="code-line line-number" line="45"><span class="token function">date</span> -s <span class="token comment"># 设置当前时间只有root权限才能设置其他只能查看</span> </span><span class="code-line line-number" line="45"><span class="token function">date</span> <span class="token parameter variable">-s</span> <span class="token comment"># 设置当前时间只有root权限才能设置其他只能查看</span>
</span><span class="code-line line-number" line="46"><span class="token function">date</span> -s <span class="token number">20120523</span> <span class="token comment"># 设置成20120523这样会把具体时间设置成00:00:00</span> </span><span class="code-line line-number" line="46"><span class="token function">date</span> <span class="token parameter variable">-s</span> <span class="token number">20120523</span> <span class="token comment"># 设置成20120523这样会把具体时间设置成00:00:00</span>
</span><span class="code-line line-number" line="47"><span class="token function">date</span> -s 01:01:01 <span class="token comment"># 设置具体时间,不会对日期做更改</span> </span><span class="code-line line-number" line="47"><span class="token function">date</span> <span class="token parameter variable">-s</span> 01:01:01 <span class="token comment"># 设置具体时间,不会对日期做更改</span>
</span><span class="code-line line-number" line="48"><span class="token function">date</span> -s <span class="token string">"01:01:01 2012-05-23"</span> <span class="token comment"># 这样可以设置全部时间</span> </span><span class="code-line line-number" line="48"><span class="token function">date</span> <span class="token parameter variable">-s</span> <span class="token string">"01:01:01 2012-05-23"</span> <span class="token comment"># 这样可以设置全部时间</span>
</span><span class="code-line line-number" line="49"><span class="token function">date</span> -s <span class="token string">"01:01:01 20120523"</span> <span class="token comment"># 这样可以设置全部时间</span> </span><span class="code-line line-number" line="49"><span class="token function">date</span> <span class="token parameter variable">-s</span> <span class="token string">"01:01:01 20120523"</span> <span class="token comment"># 这样可以设置全部时间</span>
</span><span class="code-line line-number" line="50"><span class="token function">date</span> -s <span class="token string">"2012-05-23 01:01:01"</span> <span class="token comment"># 这样可以设置全部时间</span> </span><span class="code-line line-number" line="50"><span class="token function">date</span> <span class="token parameter variable">-s</span> <span class="token string">"2012-05-23 01:01:01"</span> <span class="token comment"># 这样可以设置全部时间</span>
</span><span class="code-line line-number" line="51"><span class="token function">date</span> -s <span class="token string">"20120523 01:01:01"</span> <span class="token comment"># 这样可以设置全部时间</span> </span><span class="code-line line-number" line="51"><span class="token function">date</span> <span class="token parameter variable">-s</span> <span class="token string">"20120523 01:01:01"</span> <span class="token comment"># 这样可以设置全部时间</span>
</span><span class="code-line line-number" line="52"> </span><span class="code-line line-number" line="52">
</span><span class="code-line line-number" line="53"><span class="token comment"># 有时需要检查一组命令花费的时间:</span> </span><span class="code-line line-number" line="53"><span class="token comment"># 有时需要检查一组命令花费的时间:</span>
</span><span class="code-line line-number" line="54"><span class="token assign-left variable">start</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token function">date</span> +%s<span class="token variable">)</span></span> </span><span class="code-line line-number" line="54"><span class="token assign-left variable">start</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token function">date</span> +%s<span class="token variable">)</span></span>
@ -423,7 +423,7 @@ date +&#x22;${suffix} %Y/%m/%d&#x22;
<ol> <ol>
<li>该命令是<code>GNU coreutils</code>包中的命令,相关的帮助信息请查看<code>man -s 1 date</code><code>info coreutils 'date invocation'</code></li> <li>该命令是<code>GNU coreutils</code>包中的命令,相关的帮助信息请查看<code>man -s 1 date</code><code>info coreutils 'date invocation'</code></li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -436,31 +436,31 @@ date +&#x22;${suffix} %Y/%m/%d&#x22;
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -494,7 +494,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729424"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403014"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729424"></script> <script type="text/javascript" src="../js/index.js?v=1661420403014"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dc,任意精度计算器"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dc,任意精度计算器">
<title>dc 命令Linux dc 命令详解:任意精度计算器 - Linux 命令搜索引擎</title> <title>dc 命令Linux dc 命令详解:任意精度计算器 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729448"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403026">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -122,10 +122,10 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="dc [选项] [文件...] </span></code><div onclick="copied(this)" data-code="dc [选项] [文件...]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-e, --expression<span class="token operator">=</span>EXPR <span class="token comment"># 评估表达式</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-e, <span class="token parameter variable">--expression</span><span class="token operator">=</span>EXPR <span class="token comment"># 评估表达式</span>
</span><span class="code-line line-number" line="2">-f, --file<span class="token operator">=</span>FILE <span class="token comment"># 评估文件内容</span> </span><span class="code-line line-number" line="2">-f, <span class="token parameter variable">--file</span><span class="token operator">=</span>FILE <span class="token comment"># 评估文件内容</span>
</span><span class="code-line line-number" line="3">-h, --help <span class="token comment"># 显示此帮助并退出</span> </span><span class="code-line line-number" line="3">-h, <span class="token parameter variable">--help</span> <span class="token comment"># 显示此帮助并退出</span>
</span><span class="code-line line-number" line="4">-V, --version <span class="token comment"># 输出版本信息并退出</span> </span><span class="code-line line-number" line="4">-V, <span class="token parameter variable">--version</span> <span class="token comment"># 输出版本信息并退出</span>
</span></code><div onclick="copied(this)" data-code="-e, --expression=EXPR # 评估表达式 </span></code><div onclick="copied(this)" data-code="-e, --expression=EXPR # 评估表达式
-f, --file=FILE # 评估文件内容 -f, --file=FILE # 评估文件内容
-h, --help # 显示此帮助并退出 -h, --help # 显示此帮助并退出
@ -184,7 +184,7 @@ p # 4. 输入p得到计算结果
q # 5. 输入 q 退出 dc q # 5. 输入 q 退出 dc
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>示例显示在命令行结果 <code>509</code></p> <p>示例显示在命令行结果 <code>509</code></p>
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">dc</span> --expression<span class="token operator">=</span><span class="token string">"50 10 * 9 + p"</span> <pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">dc</span> <span class="token parameter variable">--expression</span><span class="token operator">=</span><span class="token string">"50 10 * 9 + p"</span>
</span><span class="code-line line-number" line="2"><span class="token number">509</span> </span><span class="code-line line-number" line="2"><span class="token number">509</span>
</span></code><div onclick="copied(this)" data-code="$ dc --expression=&#x22;50 10 * 9 + p&#x22; </span></code><div onclick="copied(this)" data-code="$ dc --expression=&#x22;50 10 * 9 + p&#x22;
509 509
@ -200,7 +200,7 @@ q # 5. 输入 q 退出 dc
<p><code>^</code> 使用弹出的第一个值作为指数,第二个值作为基数,弹出两个值并进行幂运算。忽略指数的分数部分。</p> <p><code>^</code> 使用弹出的第一个值作为指数,第二个值作为基数,弹出两个值并进行幂运算。忽略指数的分数部分。</p>
<p><code>|</code> 弹出三个值并计算模幂。 弹出的第一个值用作约简模数; 这个值必须是一个非零数字,并且应该是一个整数。 弹出的第二个用作指数; 该值必须是非负数,并且该指数的任何小数部分都将被忽略。 弹出的第三个值是取幂的基数,它应该是一个整数。 对于小整数,这类似于序列 Sm^Lm%,但与 ^ 不同的是,此命令适用于任意大的指数。</p> <p><code>|</code> 弹出三个值并计算模幂。 弹出的第一个值用作约简模数; 这个值必须是一个非零数字,并且应该是一个整数。 弹出的第二个用作指数; 该值必须是非负数,并且该指数的任何小数部分都将被忽略。 弹出的第三个值是取幂的基数,它应该是一个整数。 对于小整数,这类似于序列 Sm^Lm%,但与 ^ 不同的是,此命令适用于任意大的指数。</p>
<p><code>v</code> 弹出一个值,计算其平方根,然后压栈它。精度值的最大值和参数的精度用于确定结果中的小数位数。</p> <p><code>v</code> 弹出一个值,计算其平方根,然后压栈它。精度值的最大值和参数的精度用于确定结果中的小数位数。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -213,31 +213,31 @@ q # 5. 输入 q 退出 dc
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -271,7 +271,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729448"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403027"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729448"></script> <script type="text/javascript" src="../js/index.js?v=1661420403027"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dd,复制文件并对原文件的内容进行转换和格式化处理"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dd,复制文件并对原文件的内容进行转换和格式化处理">
<title>dd 命令Linux dd 命令详解:复制文件并对原文件的内容进行转换和格式化处理 - Linux 命令搜索引擎</title> <title>dd 命令Linux dd 命令详解:复制文件并对原文件的内容进行转换和格式化处理 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729475"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403045">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -222,7 +222,7 @@ skip=<区块数>:一开始读取时,跳过指定的区块数;
15 bytes (15 B) copied, 0.000111993 s, 134 kB/s 15 bytes (15 B) copied, 0.000111993 s, 134 kB/s
wFRAnlkXeBXmWs1MyGEs wFRAnlkXeBXmWs1MyGEs
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -235,31 +235,31 @@ wFRAnlkXeBXmWs1MyGEs
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -293,7 +293,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729476"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403045"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729476"></script> <script type="text/javascript" src="../js/index.js?v=1661420403045"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,declare,声明变量,设置或显示变量的值和属性。"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,declare,声明变量,设置或显示变量的值和属性。">
<title>declare 命令Linux declare 命令详解:声明变量,设置或显示变量的值和属性。 - Linux 命令搜索引擎</title> <title>declare 命令Linux declare 命令详解:声明变量,设置或显示变量的值和属性。 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729539"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403104">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -136,26 +136,26 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>增加、删除变量的属性(可选:赋值)</li> <li>增加、删除变量的属性(可选:赋值)</li>
</ul> </ul>
<h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2> <h2 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h2>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-f 将操作或显示限制为函数名及函数定义。 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-f</span> 将操作或显示限制为函数名及函数定义。
</span><span class="code-line line-number" line="2">-F 只显示函数名(调试时附加行号和源文件)。 </span><span class="code-line line-number" line="2"><span class="token parameter variable">-F</span> 只显示函数名(调试时附加行号和源文件)。
</span><span class="code-line line-number" line="3">-g 在shell函数中使用时创建全局变量其他情况下忽略。 </span><span class="code-line line-number" line="3"><span class="token parameter variable">-g</span> 在shell函数中使用时创建全局变量其他情况下忽略。
</span><span class="code-line line-number" line="4">-p 显示每个名称的属性和值。 </span><span class="code-line line-number" line="4"><span class="token parameter variable">-p</span> 显示每个名称的属性和值。
</span><span class="code-line line-number" line="5"> </span><span class="code-line line-number" line="5">
</span><span class="code-line line-number" line="6">*设置属性的选项: </span><span class="code-line line-number" line="6">*设置属性的选项:
</span><span class="code-line line-number" line="7">-a 创建数组(如果支持)。 </span><span class="code-line line-number" line="7"><span class="token parameter variable">-a</span> 创建数组(如果支持)。
</span><span class="code-line line-number" line="8">-A 创建关联数组(如果支持)。 </span><span class="code-line line-number" line="8"><span class="token parameter variable">-A</span> 创建关联数组(如果支持)。
</span><span class="code-line line-number" line="9">-i 增加整型属性。 </span><span class="code-line line-number" line="9"><span class="token parameter variable">-i</span> 增加整型属性。
</span><span class="code-line line-number" line="10">+i 删除整型属性。 </span><span class="code-line line-number" line="10">+i 删除整型属性。
</span><span class="code-line line-number" line="11">-l 增加小写属性,变量的值将转换为小写。 </span><span class="code-line line-number" line="11"><span class="token parameter variable">-l</span> 增加小写属性,变量的值将转换为小写。
</span><span class="code-line line-number" line="12">+l 删除小写属性。 </span><span class="code-line line-number" line="12">+l 删除小写属性。
</span><span class="code-line line-number" line="13">-n 增加引用属性(如果该选项存在)。 </span><span class="code-line line-number" line="13"><span class="token parameter variable">-n</span> 增加引用属性(如果该选项存在)。
</span><span class="code-line line-number" line="14">+n 删除引用属性(如果该选项存在)。 </span><span class="code-line line-number" line="14">+n 删除引用属性(如果该选项存在)。
</span><span class="code-line line-number" line="15">-r 增加只读属性。 </span><span class="code-line line-number" line="15"><span class="token parameter variable">-r</span> 增加只读属性。
</span><span class="code-line line-number" line="16">-t 增加追踪属性。 </span><span class="code-line line-number" line="16"><span class="token parameter variable">-t</span> 增加追踪属性。
</span><span class="code-line line-number" line="17">+t 删除追踪属性。 </span><span class="code-line line-number" line="17">+t 删除追踪属性。
</span><span class="code-line line-number" line="18">-u 增加大写属性,变量的值将转换为大写。 </span><span class="code-line line-number" line="18"><span class="token parameter variable">-u</span> 增加大写属性,变量的值将转换为大写。
</span><span class="code-line line-number" line="19">+u 删除大写属性。 </span><span class="code-line line-number" line="19">+u 删除大写属性。
</span><span class="code-line line-number" line="20">-x 增加导出属性。 </span><span class="code-line line-number" line="20"><span class="token parameter variable">-x</span> 增加导出属性。
</span><span class="code-line line-number" line="21">+x 删除导出属性。 </span><span class="code-line line-number" line="21">+x 删除导出属性。
</span></code><div onclick="copied(this)" data-code="-f 将操作或显示限制为函数名及函数定义 </span></code><div onclick="copied(this)" data-code="-f 将操作或显示限制为函数名及函数定义
-F 只显示函数名(调试时附加行号和源文件)。 -F 只显示函数名(调试时附加行号和源文件)。
@ -192,18 +192,18 @@ value可选变量的值。
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">declare</span> <span class="token assign-left variable">reference_website</span><span class="token operator">=</span><span class="token string">'https://wangchujiang.com/linux-command/'</span> </span><span class="code-line line-number" line="2"><span class="token builtin class-name">declare</span> <span class="token assign-left variable">reference_website</span><span class="token operator">=</span><span class="token string">'https://wangchujiang.com/linux-command/'</span>
</span><span class="code-line line-number" line="3"> </span><span class="code-line line-number" line="3">
</span><span class="code-line line-number" line="4"><span class="token comment"># 显示所有包含整型属性的变量和值。</span> </span><span class="code-line line-number" line="4"><span class="token comment"># 显示所有包含整型属性的变量和值。</span>
</span><span class="code-line line-number" line="5"><span class="token builtin class-name">declare</span> -i </span><span class="code-line line-number" line="5"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-i</span>
</span><span class="code-line line-number" line="6"><span class="token comment"># 定义变量b并赋值为3具有整型属性。</span> </span><span class="code-line line-number" line="6"><span class="token comment"># 定义变量b并赋值为3具有整型属性。</span>
</span><span class="code-line line-number" line="7"><span class="token builtin class-name">declare</span> -i <span class="token assign-left variable">b</span><span class="token operator">=</span><span class="token number">5</span> </span><span class="code-line line-number" line="7"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-i</span> <span class="token assign-left variable">b</span><span class="token operator">=</span><span class="token number">5</span>
</span><span class="code-line line-number" line="8"><span class="token comment"># 显示属性,返回 declare -i b="5"。</span> </span><span class="code-line line-number" line="8"><span class="token comment"># 显示属性,返回 declare -i b="5"。</span>
</span><span class="code-line line-number" line="9"><span class="token builtin class-name">declare</span> -p b </span><span class="code-line line-number" line="9"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-p</span> b
</span><span class="code-line line-number" line="10"><span class="token comment"># 删除整型属性。</span> </span><span class="code-line line-number" line="10"><span class="token comment"># 删除整型属性。</span>
</span><span class="code-line line-number" line="11"><span class="token builtin class-name">declare</span> +i b </span><span class="code-line line-number" line="11"><span class="token builtin class-name">declare</span> +i b
</span><span class="code-line line-number" line="12"><span class="token comment"># 显示属性,返回 declare -- b="5"。</span> </span><span class="code-line line-number" line="12"><span class="token comment"># 显示属性,返回 declare -- b="5"。</span>
</span><span class="code-line line-number" line="13"><span class="token builtin class-name">declare</span> -p b </span><span class="code-line line-number" line="13"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-p</span> b
</span><span class="code-line line-number" line="14"><span class="token comment"># 根据变量属性强制转换值的英文大小写。</span> </span><span class="code-line line-number" line="14"><span class="token comment"># 根据变量属性强制转换值的英文大小写。</span>
</span><span class="code-line line-number" line="15"><span class="token builtin class-name">declare</span> -u <span class="token assign-left variable">uc_var</span><span class="token operator">=</span><span class="token string">'abc'</span> </span><span class="code-line line-number" line="15"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-u</span> <span class="token assign-left variable">uc_var</span><span class="token operator">=</span><span class="token string">'abc'</span>
</span><span class="code-line line-number" line="16"><span class="token builtin class-name">declare</span> -l <span class="token assign-left variable">lc_var</span><span class="token operator">=</span><span class="token string">'ABC'</span> </span><span class="code-line line-number" line="16"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-l</span> <span class="token assign-left variable">lc_var</span><span class="token operator">=</span><span class="token string">'ABC'</span>
</span><span class="code-line line-number" line="17"><span class="token comment"># 显示'ABC abc';</span> </span><span class="code-line line-number" line="17"><span class="token comment"># 显示'ABC abc';</span>
</span><span class="code-line line-number" line="18"><span class="token builtin class-name">echo</span> <span class="token string">"<span class="token variable">${uc_var}</span> <span class="token variable">${lc_var}</span>"</span> </span><span class="code-line line-number" line="18"><span class="token builtin class-name">echo</span> <span class="token string">"<span class="token variable">${uc_var}</span> <span class="token variable">${lc_var}</span>"</span>
</span></code><div onclick="copied(this)" data-code="# 声明变量当然也欢迎您在这个网站感谢本项目发起人 @jaywcjlove查询linux命令 </span></code><div onclick="copied(this)" data-code="# 声明变量当然也欢迎您在这个网站感谢本项目发起人 @jaywcjlove查询linux命令
@ -227,13 +227,13 @@ echo &#x22;${uc_var} ${lc_var}&#x22;
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 定义函数内的全局变量</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 定义函数内的全局变量</span>
</span><span class="code-line line-number" line="2"><span class="token keyword">function</span> <span class="token function-name function">test</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> </span><span class="code-line line-number" line="2"><span class="token keyword">function</span> <span class="token function-name function">test</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
</span><span class="code-line line-number" line="3"> <span class="token builtin class-name">declare</span> -g <span class="token assign-left variable">a</span><span class="token operator">=</span><span class="token number">3</span> </span><span class="code-line line-number" line="3"> <span class="token builtin class-name">declare</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">a</span><span class="token operator">=</span><span class="token number">3</span>
</span><span class="code-line line-number" line="4"> <span class="token comment"># 或者</span> </span><span class="code-line line-number" line="4"> <span class="token comment"># 或者</span>
</span><span class="code-line line-number" line="5"> <span class="token builtin class-name">local</span> -g <span class="token assign-left variable">b</span><span class="token operator">=</span><span class="token number">3</span> </span><span class="code-line line-number" line="5"> <span class="token builtin class-name">local</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">b</span><span class="token operator">=</span><span class="token number">3</span>
</span><span class="code-line line-number" line="6"> <span class="token comment"># 或者</span> </span><span class="code-line line-number" line="6"> <span class="token comment"># 或者</span>
</span><span class="code-line line-number" line="7"> <span class="token assign-left variable">c</span><span class="token operator">=</span><span class="token number">3</span> </span><span class="code-line line-number" line="7"> <span class="token assign-left variable">c</span><span class="token operator">=</span><span class="token number">3</span>
</span><span class="code-line line-number" line="8"> <span class="token comment"># 让我们查看它们的属性。</span> </span><span class="code-line line-number" line="8"> <span class="token comment"># 让我们查看它们的属性。</span>
</span><span class="code-line line-number" line="9"> <span class="token builtin class-name">declare</span> -p a b c </span><span class="code-line line-number" line="9"> <span class="token builtin class-name">declare</span> <span class="token parameter variable">-p</span> a b c
</span><span class="code-line line-number" line="10"><span class="token punctuation">}</span> </span><span class="code-line line-number" line="10"><span class="token punctuation">}</span>
</span><span class="code-line line-number" line="11"><span class="token comment"># 执行函数。</span> </span><span class="code-line line-number" line="11"><span class="token comment"># 执行函数。</span>
</span><span class="code-line line-number" line="12"><span class="token builtin class-name">test</span> </span><span class="code-line line-number" line="12"><span class="token builtin class-name">test</span>
@ -252,8 +252,8 @@ echo &#x22;${uc_var} ${lc_var}&#x22;
</span><span class="code-line line-number" line="25"> </span><span class="code-line line-number" line="25">
</span><span class="code-line line-number" line="26"><span class="token comment"># 定义局部变量</span> </span><span class="code-line line-number" line="26"><span class="token comment"># 定义局部变量</span>
</span><span class="code-line line-number" line="27"><span class="token keyword">function</span> <span class="token function-name function">test2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> </span><span class="code-line line-number" line="27"><span class="token keyword">function</span> <span class="token function-name function">test2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
</span><span class="code-line line-number" line="28"> <span class="token builtin class-name">local</span> -i <span class="token assign-left variable">a</span><span class="token operator">=</span><span class="token number">3</span> </span><span class="code-line line-number" line="28"> <span class="token builtin class-name">local</span> <span class="token parameter variable">-i</span> <span class="token assign-left variable">a</span><span class="token operator">=</span><span class="token number">3</span>
</span><span class="code-line line-number" line="29"> <span class="token builtin class-name">declare</span> -i <span class="token assign-left variable">b</span><span class="token operator">=</span><span class="token number">3</span> </span><span class="code-line line-number" line="29"> <span class="token builtin class-name">declare</span> <span class="token parameter variable">-i</span> <span class="token assign-left variable">b</span><span class="token operator">=</span><span class="token number">3</span>
</span><span class="code-line line-number" line="30"><span class="token punctuation">}</span> </span><span class="code-line line-number" line="30"><span class="token punctuation">}</span>
</span><span class="code-line line-number" line="31">test2 </span><span class="code-line line-number" line="31">test2
</span><span class="code-line line-number" line="32"><span class="token comment"># 没有该变量(已经被销毁了)</span> </span><span class="code-line line-number" line="32"><span class="token comment"># 没有该变量(已经被销毁了)</span>
@ -299,17 +299,17 @@ echo &#x22;${a} ${b}&#x22;
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 注意,不能使用 `+a` 或 `+A` 取消数组,也不能使用 `+r` 取消只读属性。</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 注意,不能使用 `+a` 或 `+A` 取消数组,也不能使用 `+r` 取消只读属性。</span>
</span><span class="code-line line-number" line="2"> </span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3"><span class="token comment"># 定义只读数组,设置属性的同时定义赋值。</span> </span><span class="code-line line-number" line="3"><span class="token comment"># 定义只读数组,设置属性的同时定义赋值。</span>
</span><span class="code-line line-number" line="4"><span class="token builtin class-name">declare</span> -ar <span class="token assign-left variable">season</span><span class="token operator">=</span><span class="token punctuation">(</span><span class="token string">'Spring'</span> <span class="token string">'Summer'</span> <span class="token string">'Autumn'</span> <span class="token string">'Winter'</span><span class="token punctuation">)</span> </span><span class="code-line line-number" line="4"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-ar</span> <span class="token assign-left variable">season</span><span class="token operator">=</span><span class="token punctuation">(</span><span class="token string">'Spring'</span> <span class="token string">'Summer'</span> <span class="token string">'Autumn'</span> <span class="token string">'Winter'</span><span class="token punctuation">)</span>
</span><span class="code-line line-number" line="5"><span class="token comment"># 或者这样。</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 或者这样。</span>
</span><span class="code-line line-number" line="6"><span class="token assign-left variable">season</span><span class="token operator">=</span><span class="token punctuation">(</span><span class="token string">'Spring'</span> <span class="token string">'Summer'</span> <span class="token string">'Autumn'</span> <span class="token string">'Winter'</span><span class="token punctuation">)</span> </span><span class="code-line line-number" line="6"><span class="token assign-left variable">season</span><span class="token operator">=</span><span class="token punctuation">(</span><span class="token string">'Spring'</span> <span class="token string">'Summer'</span> <span class="token string">'Autumn'</span> <span class="token string">'Winter'</span><span class="token punctuation">)</span>
</span><span class="code-line line-number" line="7"><span class="token builtin class-name">declare</span> -ar season </span><span class="code-line line-number" line="7"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-ar</span> season
</span><span class="code-line line-number" line="8"><span class="token comment"># 显示所有数组。</span> </span><span class="code-line line-number" line="8"><span class="token comment"># 显示所有数组。</span>
</span><span class="code-line line-number" line="9"><span class="token builtin class-name">declare</span> -a </span><span class="code-line line-number" line="9"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-a</span>
</span><span class="code-line line-number" line="10"><span class="token comment"># 定义关联数组。</span> </span><span class="code-line line-number" line="10"><span class="token comment"># 定义关联数组。</span>
</span><span class="code-line line-number" line="11"> </span><span class="code-line line-number" line="11">
</span><span class="code-line line-number" line="12"><span class="token builtin class-name">declare</span> -A <span class="token assign-left variable">fruits</span><span class="token operator">=</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'apple'</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token string">'red'</span> <span class="token punctuation">[</span><span class="token string">'banana'</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token string">'yellow'</span><span class="token punctuation">)</span> </span><span class="code-line line-number" line="12"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-A</span> <span class="token assign-left variable">fruits</span><span class="token operator">=</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'apple'</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token string">'red'</span> <span class="token punctuation">[</span><span class="token string">'banana'</span><span class="token punctuation">]</span><span class="token operator">=</span><span class="token string">'yellow'</span><span class="token punctuation">)</span>
</span><span class="code-line line-number" line="13"><span class="token comment"># 显示所有关联数组。</span> </span><span class="code-line line-number" line="13"><span class="token comment"># 显示所有关联数组。</span>
</span><span class="code-line line-number" line="14"><span class="token builtin class-name">declare</span> -A </span><span class="code-line line-number" line="14"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-A</span>
</span></code><div onclick="copied(this)" data-code="# 注意不能使用 &#x60;+a&#x60; &#x60;+A&#x60; 取消数组也不能使用 &#x60;+r&#x60; 取消只读属性 </span></code><div onclick="copied(this)" data-code="# 注意不能使用 &#x60;+a&#x60; &#x60;+A&#x60; 取消数组也不能使用 &#x60;+r&#x60; 取消只读属性
# 定义只读数组,设置属性的同时定义赋值。 # 定义只读数组,设置属性的同时定义赋值。
@ -328,9 +328,9 @@ declare -A
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 显示所有变量的属性和值并显示函数的定义,输出很长。</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 显示所有变量的属性和值并显示函数的定义,输出很长。</span>
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">declare</span> </span><span class="code-line line-number" line="2"><span class="token builtin class-name">declare</span>
</span><span class="code-line line-number" line="3"><span class="token comment"># 显示所有变量的属性和值。</span> </span><span class="code-line line-number" line="3"><span class="token comment"># 显示所有变量的属性和值。</span>
</span><span class="code-line line-number" line="4"><span class="token builtin class-name">declare</span> -p </span><span class="code-line line-number" line="4"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-p</span>
</span><span class="code-line line-number" line="5"><span class="token comment"># 显示所有全局变量的属性和值。</span> </span><span class="code-line line-number" line="5"><span class="token comment"># 显示所有全局变量的属性和值。</span>
</span><span class="code-line line-number" line="6"><span class="token builtin class-name">declare</span> -g </span><span class="code-line line-number" line="6"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-g</span>
</span></code><div onclick="copied(this)" data-code="# 显示所有变量的属性和值并显示函数的定义输出很长 </span></code><div onclick="copied(this)" data-code="# 显示所有变量的属性和值并显示函数的定义输出很长
declare declare
# 显示所有变量的属性和值。 # 显示所有变量的属性和值。
@ -339,17 +339,17 @@ declare -p
declare -g declare -g
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 显示全部函数名和函数定义。</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 显示全部函数名和函数定义。</span>
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">declare</span> -f </span><span class="code-line line-number" line="2"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-f</span>
</span><span class="code-line line-number" line="3"><span class="token comment"># 只显示全部函数名。</span> </span><span class="code-line line-number" line="3"><span class="token comment"># 只显示全部函数名。</span>
</span><span class="code-line line-number" line="4"><span class="token builtin class-name">declare</span> -F </span><span class="code-line line-number" line="4"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-F</span>
</span><span class="code-line line-number" line="5"> </span><span class="code-line line-number" line="5">
</span><span class="code-line line-number" line="6"><span class="token comment"># 定义两个函数。</span> </span><span class="code-line line-number" line="6"><span class="token comment"># 定义两个函数。</span>
</span><span class="code-line line-number" line="7"><span class="token keyword">function</span> <span class="token function-name function">func_a</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token builtin class-name">echo</span> <span class="token variable"><span class="token variable">$(</span><span class="token function">date</span> +<span class="token string">"%F %T"</span><span class="token variable">)</span></span><span class="token punctuation">;</span> <span class="token punctuation">}</span> </span><span class="code-line line-number" line="7"><span class="token keyword">function</span> <span class="token function-name function">func_a</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token builtin class-name">echo</span> <span class="token variable"><span class="token variable">$(</span><span class="token function">date</span> +<span class="token string">"%F %T"</span><span class="token variable">)</span></span><span class="token punctuation">;</span> <span class="token punctuation">}</span>
</span><span class="code-line line-number" line="8"><span class="token keyword">function</span> <span class="token function-name function">func_b</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token builtin class-name">cd</span> /<span class="token punctuation">;</span> <span class="token function">ls</span> -lh --sort<span class="token operator">=</span>time<span class="token punctuation">;</span> <span class="token punctuation">}</span> </span><span class="code-line line-number" line="8"><span class="token keyword">function</span> <span class="token function-name function">func_b</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span> <span class="token builtin class-name">cd</span> /<span class="token punctuation">;</span> <span class="token function">ls</span> <span class="token parameter variable">-lh</span> <span class="token parameter variable">--sort</span><span class="token operator">=</span>time<span class="token punctuation">;</span> <span class="token punctuation">}</span>
</span><span class="code-line line-number" line="9"><span class="token comment"># 显示一到多个函数名和函数定义。</span> </span><span class="code-line line-number" line="9"><span class="token comment"># 显示一到多个函数名和函数定义。</span>
</span><span class="code-line line-number" line="10"><span class="token builtin class-name">declare</span> -f func_a func_b </span><span class="code-line line-number" line="10"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-f</span> func_a func_b
</span><span class="code-line line-number" line="11"><span class="token comment"># 只显示一到多个函数名,验证某个名称是否已经定义为函数时有用。</span> </span><span class="code-line line-number" line="11"><span class="token comment"># 只显示一到多个函数名,验证某个名称是否已经定义为函数时有用。</span>
</span><span class="code-line line-number" line="12"><span class="token builtin class-name">declare</span> -F func_a func_b </span><span class="code-line line-number" line="12"><span class="token builtin class-name">declare</span> <span class="token parameter variable">-F</span> func_a func_b
</span><span class="code-line line-number" line="13"><span class="token comment"># 最好不要让函数名和变量名相同。</span> </span><span class="code-line line-number" line="13"><span class="token comment"># 最好不要让函数名和变量名相同。</span>
</span></code><div onclick="copied(this)" data-code="# 显示全部函数名和函数定义 </span></code><div onclick="copied(this)" data-code="# 显示全部函数名和函数定义
declare -f declare -f
@ -414,7 +414,7 @@ declare -F func_a func_b
<li>只读属性的相关介绍请查看'readonly'命令。</li> <li>只读属性的相关介绍请查看'readonly'命令。</li>
<li>引用属性的相关介绍请查看'unset'命令的例子部分。</li> <li>引用属性的相关介绍请查看'unset'命令的例子部分。</li>
</ol> </ol>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -427,31 +427,31 @@ declare -F func_a func_b
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -485,7 +485,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729540"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403105"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729540"></script> <script type="text/javascript" src="../js/index.js?v=1661420403105"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,depmod,分析可载入模块的相依性"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,depmod,分析可载入模块的相依性">
<title>depmod 命令Linux depmod 命令详解:分析可载入模块的相依性 - Linux 命令搜索引擎</title> <title>depmod 命令Linux depmod 命令详解:分析可载入模块的相依性 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729557"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403117">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -142,7 +142,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
--help显示帮助。 --help显示帮助。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">depmod -b /home/windsome/EMMA3PF-KernelSource-20080626/install_pos -e -F ./boot/System.map -v <span class="token number">2.6</span>.18_pro500-bcm91250-mips2_fp_be -A -a <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">depmod <span class="token parameter variable">-b</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos <span class="token parameter variable">-e</span> <span class="token parameter variable">-F</span> ./boot/System.map <span class="token parameter variable">-v</span> <span class="token number">2.6</span>.18_pro500-bcm91250-mips2_fp_be <span class="token parameter variable">-A</span> <span class="token parameter variable">-a</span>
</span></code><div onclick="copied(this)" data-code="depmod -b /home/windsome/EMMA3PF-KernelSource-20080626/install_pos -e -F ./boot/System.map -v 2.6.18_pro500-bcm91250-mips2_fp_be -A -a </span></code><div onclick="copied(this)" data-code="depmod -b /home/windsome/EMMA3PF-KernelSource-20080626/install_pos -e -F ./boot/System.map -v 2.6.18_pro500-bcm91250-mips2_fp_be -A -a
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<ul> <ul>
@ -155,14 +155,14 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span><span class="code-line line-number" line="2"><span class="token comment">#######</span> </span><span class="code-line line-number" line="2"><span class="token comment">#######</span>
</span><span class="code-line line-number" line="3"><span class="token builtin class-name">export</span> <span class="token assign-left variable">INSTALL_ROOT_EMMA3PF</span><span class="token operator">=</span><span class="token string">"/home/windsome/EMMA3PF-KernelSource-20080626/install_pos"</span> </span><span class="code-line line-number" line="3"><span class="token builtin class-name">export</span> <span class="token assign-left variable">INSTALL_ROOT_EMMA3PF</span><span class="token operator">=</span><span class="token string">"/home/windsome/EMMA3PF-KernelSource-20080626/install_pos"</span>
</span><span class="code-line line-number" line="4"><span class="token builtin class-name">export</span> <span class="token assign-left variable">INSTALL_MOD_EMMA3PF</span><span class="token operator">=</span><span class="token string">"/home/windsome/EMMA3PF-KernelSource-20080626/install_pos"</span> </span><span class="code-line line-number" line="4"><span class="token builtin class-name">export</span> <span class="token assign-left variable">INSTALL_MOD_EMMA3PF</span><span class="token operator">=</span><span class="token string">"/home/windsome/EMMA3PF-KernelSource-20080626/install_pos"</span>
</span><span class="code-line line-number" line="5"><span class="token function">rm</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos/lib -rf </span><span class="code-line line-number" line="5"><span class="token function">rm</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos/lib <span class="token parameter variable">-rf</span>
</span><span class="code-line line-number" line="6"><span class="token function">rm</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos/boot/* -rf </span><span class="code-line line-number" line="6"><span class="token function">rm</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos/boot/* <span class="token parameter variable">-rf</span>
</span><span class="code-line line-number" line="7"><span class="token builtin class-name">cd</span> <span class="token operator">&#x3C;</span>linux_src_dir<span class="token operator">></span> </span><span class="code-line line-number" line="7"><span class="token builtin class-name">cd</span> <span class="token operator">&#x3C;</span>linux_src_dir<span class="token operator">></span>
</span><span class="code-line line-number" line="8"><span class="token function">make</span> </span><span class="code-line line-number" line="8"><span class="token function">make</span>
</span><span class="code-line line-number" line="9"><span class="token function">make</span> modules_install </span><span class="code-line line-number" line="9"><span class="token function">make</span> modules_install
</span><span class="code-line line-number" line="10"><span class="token function">cp</span> vmlinux System.map /home/windsome/EMMA3PF-KernelSource-20080626/install_pos/boot/ -p </span><span class="code-line line-number" line="10"><span class="token function">cp</span> vmlinux System.map /home/windsome/EMMA3PF-KernelSource-20080626/install_pos/boot/ <span class="token parameter variable">-p</span>
</span><span class="code-line line-number" line="11"><span class="token builtin class-name">cd</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos </span><span class="code-line line-number" line="11"><span class="token builtin class-name">cd</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos
</span><span class="code-line line-number" line="12">depmod -b /home/windsome/EMMA3PF-KernelSource-20080626/install_pos -e -F ./boot/System.map -v <span class="token number">2.6</span>.18_pro500-bcm91250-mips2_fp_be -A -a </span><span class="code-line line-number" line="12">depmod <span class="token parameter variable">-b</span> /home/windsome/EMMA3PF-KernelSource-20080626/install_pos <span class="token parameter variable">-e</span> <span class="token parameter variable">-F</span> ./boot/System.map <span class="token parameter variable">-v</span> <span class="token number">2.6</span>.18_pro500-bcm91250-mips2_fp_be <span class="token parameter variable">-A</span> <span class="token parameter variable">-a</span>
</span></code><div onclick="copied(this)" data-code="genkernel.sh (at linux-2.6.18_pro500) </span></code><div onclick="copied(this)" data-code="genkernel.sh (at linux-2.6.18_pro500)
####### #######
export INSTALL_ROOT_EMMA3PF=&#x22;/home/windsome/EMMA3PF-KernelSource-20080626/install_pos&#x22; export INSTALL_ROOT_EMMA3PF=&#x22;/home/windsome/EMMA3PF-KernelSource-20080626/install_pos&#x22;
@ -179,7 +179,7 @@ depmod -b /home/windsome/EMMA3PF-KernelSource-20080626/install_pos -e -F ./boot/
<p>其他用法:</p> <p>其他用法:</p>
<p>在linux桌面系统中当你编译了新的驱动为了能够用<code>modprobe ***</code>加载模块, 你需要先将模块拷贝到<code>/lib/modules /2.6.31-20-generic</code>目录下,然后运行<code>sudo depmod -a</code>将模块信息写入modules.dep、modules.dep.bin、modules.alias.bin、modules.alias和modules.pcimap文件中。</p> <p>在linux桌面系统中当你编译了新的驱动为了能够用<code>modprobe ***</code>加载模块, 你需要先将模块拷贝到<code>/lib/modules /2.6.31-20-generic</code>目录下,然后运行<code>sudo depmod -a</code>将模块信息写入modules.dep、modules.dep.bin、modules.alias.bin、modules.alias和modules.pcimap文件中。</p>
<p>我编译了一个新的wifi驱动r8192se_pci.ko将其拷贝到<code>/lib/modules/2.6.31-20-generic/wireless</code>下,然后到<code>/lib/modules/2.6.31-20-generic</code>运行<code>depmod -a</code>之后可以在任意目录运行modprobe r8192se_pci。</p> <p>我编译了一个新的wifi驱动r8192se_pci.ko将其拷贝到<code>/lib/modules/2.6.31-20-generic/wireless</code>下,然后到<code>/lib/modules/2.6.31-20-generic</code>运行<code>depmod -a</code>之后可以在任意目录运行modprobe r8192se_pci。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -192,31 +192,31 @@ depmod -b /home/windsome/EMMA3PF-KernelSource-20080626/install_pos -e -F ./boot/
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -250,7 +250,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729558"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403118"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729558"></script> <script type="text/javascript" src="../js/index.js?v=1661420403118"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,df,显示磁盘的相关信息"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,df,显示磁盘的相关信息">
<title>df 命令Linux df 命令详解:显示磁盘的相关信息 - Linux 命令搜索引擎</title> <title>df 命令Linux df 命令详解:显示磁盘的相关信息 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729579"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403136">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -219,7 +219,7 @@ none 0 0 0 - /proc/sys/fs/binfmt_misc
# Filesystem 1K-blocks Used Available Use% Mounted on # Filesystem 1K-blocks Used Available Use% Mounted on
# /dev/loop0 18761008 15246924 2554392 86% /d Avail # /dev/loop0 18761008 15246924 2554392 86% /d Avail
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -232,31 +232,31 @@ none 0 0 0 - /proc/sys/fs/binfmt_misc
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -290,7 +290,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729580"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403137"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729580"></script> <script type="text/javascript" src="../js/index.js?v=1661420403137"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dhclient,动态获取或释放IP地址"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dhclient,动态获取或释放IP地址">
<title>dhclient 命令Linux dhclient 命令详解动态获取或释放IP地址 - Linux 命令搜索引擎</title> <title>dhclient 命令Linux dhclient 命令详解动态获取或释放IP地址 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729590"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403156">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -134,12 +134,12 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3> <h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>网络接口:操作的网络接口。</p> <p>网络接口:操作的网络接口。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3> <h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">dhclient -r <span class="token comment">#释放IP</span> <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">dhclient <span class="token parameter variable">-r</span> <span class="token comment">#释放IP</span>
</span><span class="code-line line-number" line="2">dhclient <span class="token comment">#获取IP</span> </span><span class="code-line line-number" line="2">dhclient <span class="token comment">#获取IP</span>
</span></code><div onclick="copied(this)" data-code="dhclient -r #释放IP </span></code><div onclick="copied(this)" data-code="dhclient -r #释放IP
dhclient #获取IP dhclient #获取IP
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -152,31 +152,31 @@ dhclient #获取IP
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -210,7 +210,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729590"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403157"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729590"></script> <script type="text/javascript" src="../js/index.js?v=1661420403157"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dhcpd,运行DHCP服务器"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dhcpd,运行DHCP服务器">
<title>dhcpd 命令Linux dhcpd 命令详解运行DHCP服务器 - Linux 命令搜索引擎</title> <title>dhcpd 命令Linux dhcpd 命令详解运行DHCP服务器 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729606"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403147">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -120,19 +120,19 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="dhcpd [选项] [网络接口] </span></code><div onclick="copied(this)" data-code="dhcpd [选项] [网络接口]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-p <span class="token operator">&#x3C;</span>端口<span class="token operator">></span> 指定dhcpd监听的端口 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-p</span> <span class="token operator">&#x3C;</span>端口<span class="token operator">></span> 指定dhcpd监听的端口
</span><span class="code-line line-number" line="2">-f 作为前台进程运行dhcpd </span><span class="code-line line-number" line="2"><span class="token parameter variable">-f</span> 作为前台进程运行dhcpd
</span><span class="code-line line-number" line="3">-d 启用调试模式 </span><span class="code-line line-number" line="3"><span class="token parameter variable">-d</span> 启用调试模式
</span><span class="code-line line-number" line="4">-q 在启动时不显示版权信息 </span><span class="code-line line-number" line="4"><span class="token parameter variable">-q</span> 在启动时不显示版权信息
</span><span class="code-line line-number" line="5">-t 简单地测试配置文件的语法是否正确的,但不会尝试执行任何网络操作 </span><span class="code-line line-number" line="5"><span class="token parameter variable">-t</span> 简单地测试配置文件的语法是否正确的,但不会尝试执行任何网络操作
</span><span class="code-line line-number" line="6">-T 可以用来测试租约数据库文件 </span><span class="code-line line-number" line="6"><span class="token parameter variable">-T</span> 可以用来测试租约数据库文件
</span><span class="code-line line-number" line="7">-4 运行DHCP服务器 </span><span class="code-line line-number" line="7"><span class="token parameter variable">-4</span> 运行DHCP服务器
</span><span class="code-line line-number" line="8">-6 运行DHCPv6服务器 </span><span class="code-line line-number" line="8"><span class="token parameter variable">-6</span> 运行DHCPv6服务器
</span><span class="code-line line-number" line="9">-s <span class="token operator">&#x3C;</span>服务器<span class="token operator">></span> 指定发送回复的服务器 </span><span class="code-line line-number" line="9"><span class="token parameter variable">-s</span> <span class="token operator">&#x3C;</span>服务器<span class="token operator">></span> 指定发送回复的服务器
</span><span class="code-line line-number" line="10">-cf <span class="token operator">&#x3C;</span>配置文件<span class="token operator">></span> 指定配置文件 </span><span class="code-line line-number" line="10"><span class="token parameter variable">-cf</span> <span class="token operator">&#x3C;</span>配置文件<span class="token operator">></span> 指定配置文件
</span><span class="code-line line-number" line="11">-lf <span class="token operator">&#x3C;</span>租约文件<span class="token operator">></span> 指定租约文件 </span><span class="code-line line-number" line="11"><span class="token parameter variable">-lf</span> <span class="token operator">&#x3C;</span>租约文件<span class="token operator">></span> 指定租约文件
</span><span class="code-line line-number" line="12">-pf <span class="token operator">&#x3C;</span>PID文件<span class="token operator">></span> 指定PID文件 </span><span class="code-line line-number" line="12"><span class="token parameter variable">-pf</span> <span class="token operator">&#x3C;</span>PID文件<span class="token operator">></span> 指定PID文件
</span><span class="code-line line-number" line="13">-tf <span class="token operator">&#x3C;</span>跟踪输出文件<span class="token operator">></span> 指定文件记录DHCP服务器的整个启动状态 </span><span class="code-line line-number" line="13"><span class="token parameter variable">-tf</span> <span class="token operator">&#x3C;</span>跟踪输出文件<span class="token operator">></span> 指定文件记录DHCP服务器的整个启动状态
</span></code><div onclick="copied(this)" data-code="-p <端口> 指定dhcpd监听的端口 </span></code><div onclick="copied(this)" data-code="-p <端口> 指定dhcpd监听的端口
-f 作为前台进程运行dhcpd -f 作为前台进程运行dhcpd
-d 启用调试模式 -d 启用调试模式
@ -190,7 +190,7 @@ it workbetter with this distribution.
exiting. exiting.
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -203,31 +203,31 @@ exiting.
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -261,7 +261,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729607"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403148"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729607"></script> <script type="text/javascript" src="../js/index.js?v=1661420403148"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dhcrelay,使用dhcrelay命令可以提供中继DHCP和BOOTP请求"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dhcrelay,使用dhcrelay命令可以提供中继DHCP和BOOTP请求">
<title>dhcrelay 命令Linux dhcrelay 命令详解使用dhcrelay命令可以提供中继DHCP和BOOTP请求 - Linux 命令搜索引擎</title> <title>dhcrelay 命令Linux dhcrelay 命令详解使用dhcrelay命令可以提供中继DHCP和BOOTP请求 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729616"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403164">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -122,13 +122,13 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="dhcrelay [选项] [DHCP服务器] </span></code><div onclick="copied(this)" data-code="dhcrelay [选项] [DHCP服务器]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3> <h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">-c <span class="token operator">&#x3C;</span>跳数<span class="token operator">></span> 当转发数据包时dhcrelay丢弃已经达到一个最大跳数的数据包。默认值是10最大值是255 <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-c</span> <span class="token operator">&#x3C;</span>跳数<span class="token operator">></span> 当转发数据包时dhcrelay丢弃已经达到一个最大跳数的数据包。默认值是10最大值是255
</span><span class="code-line line-number" line="2">-4 运行dhcrelay命令作为DHCPv4/BOOTP中继代理。这是默认操作模式 </span><span class="code-line line-number" line="2"><span class="token parameter variable">-4</span> 运行dhcrelay命令作为DHCPv4/BOOTP中继代理。这是默认操作模式
</span><span class="code-line line-number" line="3">-6 运行dhcrelay命令作为DHCPv6中继代理 </span><span class="code-line line-number" line="3"><span class="token parameter variable">-6</span> 运行dhcrelay命令作为DHCPv6中继代理
</span><span class="code-line line-number" line="4">-q 安静模式 </span><span class="code-line line-number" line="4"><span class="token parameter variable">-q</span> 安静模式
</span><span class="code-line line-number" line="5">-p <span class="token operator">&#x3C;</span>端口<span class="token operator">></span> 监听和发送端口。DHCPv4/BOOTP默认端口是67DHCPv6默认端口是547 </span><span class="code-line line-number" line="5"><span class="token parameter variable">-p</span> <span class="token operator">&#x3C;</span>端口<span class="token operator">></span> 监听和发送端口。DHCPv4/BOOTP默认端口是67DHCPv6默认端口是547
</span><span class="code-line line-number" line="6">-A <span class="token operator">&#x3C;</span>长度<span class="token operator">></span> 指定发送到DHCP服务器的最大数据包大小 </span><span class="code-line line-number" line="6"><span class="token parameter variable">-A</span> <span class="token operator">&#x3C;</span>长度<span class="token operator">></span> 指定发送到DHCP服务器的最大数据包大小
</span><span class="code-line line-number" line="7">-d 强制dhcrelay命令作为前台进程运行 </span><span class="code-line line-number" line="7"><span class="token parameter variable">-d</span> 强制dhcrelay命令作为前台进程运行
</span></code><div onclick="copied(this)" data-code="-c <跳数> 当转发数据包时dhcrelay丢弃已经达到一个最大跳数的数据包。默认值是10最大值是255 </span></code><div onclick="copied(this)" data-code="-c <跳数> 当转发数据包时dhcrelay丢弃已经达到一个最大跳数的数据包。默认值是10最大值是255
-4 运行dhcrelay命令作为DHCPv4/BOOTP中继代理。这是默认操作模式 -4 运行dhcrelay命令作为DHCPv4/BOOTP中继代理。这是默认操作模式
-6 运行dhcrelay命令作为DHCPv6中继代理 -6 运行dhcrelay命令作为DHCPv6中继代理
@ -160,7 +160,7 @@ Listening on LPF/eth0/00:0c:27:fc:25:ec
Sending on LPF/eth0/00:0c:27:fc:25:ec Sending on LPF/eth0/00:0c:27:fc:25:ec
Sending on Socket/fallback Sending on Socket/fallback
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -173,31 +173,31 @@ Sending on Socket/fallback
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -231,7 +231,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729617"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403164"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729617"></script> <script type="text/javascript" src="../js/index.js?v=1661420403164"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,diff,比较给定的两个文件的不同"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,diff,比较给定的两个文件的不同">
<title>diff 命令Linux diff 命令详解:比较给定的两个文件的不同 - Linux 命令搜索引擎</title> <title>diff 命令Linux diff 命令详解:比较给定的两个文件的不同 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729644"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403188">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -202,7 +202,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
</span></code><div onclick="copied(this)" data-code="diff a.txt b.txt </span></code><div onclick="copied(this)" data-code="diff a.txt b.txt
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h4 id="以上下文-context-模式比较差异"><a class="anchor" aria-hidden="true" tabindex="-1" href="#以上下文-context-模式比较差异"><span class="octicon octicon-link"></span></a>以上下文 (context) 模式比较差异</h4> <h4 id="以上下文-context-模式比较差异"><a class="anchor" aria-hidden="true" tabindex="-1" href="#以上下文-context-模式比较差异"><span class="octicon octicon-link"></span></a>以上下文 (context) 模式比较差异</h4>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">diff</span> -c a.txt b.txt <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">diff</span> <span class="token parameter variable">-c</span> a.txt b.txt
</span></code><div onclick="copied(this)" data-code="diff -c a.txt b.txt </span></code><div onclick="copied(this)" data-code="diff -c a.txt b.txt
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre><code class="code-highlight"><span class="code-line line-number" line="1">  *** a1.txt 2012-08-29 16:45:41.000000000 +0800 <pre><code class="code-highlight"><span class="code-line line-number" line="1">  *** a1.txt 2012-08-29 16:45:41.000000000 +0800
@ -245,7 +245,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
   a    a
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h4 id="以联合-unified-模式比较差异"><a class="anchor" aria-hidden="true" tabindex="-1" href="#以联合-unified-模式比较差异"><span class="octicon octicon-link"></span></a>以联合 (unified) 模式比较差异</h4> <h4 id="以联合-unified-模式比较差异"><a class="anchor" aria-hidden="true" tabindex="-1" href="#以联合-unified-模式比较差异"><span class="octicon octicon-link"></span></a>以联合 (unified) 模式比较差异</h4>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">diff</span> -u a.txt b.txt <pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">diff</span> <span class="token parameter variable">-u</span> a.txt b.txt
</span></code><div onclick="copied(this)" data-code="diff -u a.txt b.txt </span></code><div onclick="copied(this)" data-code="diff -u a.txt b.txt
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<pre><code class="code-highlight"><span class="code-line line-number" line="1">  --- a.txt 2012-08-29 16:45:41.000000000 +0800 <pre><code class="code-highlight"><span class="code-line line-number" line="1">  --- a.txt 2012-08-29 16:45:41.000000000 +0800
@ -286,7 +286,7 @@ n1,n2 c n3,n4
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>其中,字母"a"、"d"、"c"分别表示添加、删除及修改操作。而"n1"、"n2"表示在文件1中的行号"n3"、"n4"表示在文件2中的行号。</p> <p>其中,字母"a"、"d"、"c"分别表示添加、删除及修改操作。而"n1"、"n2"表示在文件1中的行号"n3"、"n4"表示在文件2中的行号。</p>
<p>注意:以上说明指定了两个文件中不同处的行号及其相应的操作。在输出形式中,每一行后面将跟随受到影响的若干行。其中,以&#x3C;开始的行属于文件1以>开始的行属于文件2。</p> <p>注意:以上说明指定了两个文件中不同处的行号及其相应的操作。在输出形式中,每一行后面将跟随受到影响的若干行。其中,以&#x3C;开始的行属于文件1以>开始的行属于文件2。</p>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -299,31 +299,31 @@ n1,n2 c n3,n4
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -357,7 +357,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729645"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403189"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729645"></script> <script type="text/javascript" src="../js/index.js?v=1661420403189"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,diff3,比较3个文件不同的地方"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,diff3,比较3个文件不同的地方">
<title>diff3 命令Linux diff3 命令详解比较3个文件不同的地方 - Linux 命令搜索引擎</title> <title>diff3 命令Linux diff3 命令详解比较3个文件不同的地方 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729653"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403170">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -143,7 +143,7 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
<li>文件2指定要比较的第2个文件</li> <li>文件2指定要比较的第2个文件</li>
<li>文件3指定要比较的第3个文件。</li> <li>文件3指定要比较的第3个文件。</li>
</ul> </ul>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -156,31 +156,31 @@ customElements.define('markdown-style', MarkdownStyle);</script><markdown-style
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -214,7 +214,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729654"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403171"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729654"></script> <script type="text/javascript" src="../js/index.js?v=1661420403171"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,diffstat,显示diff命令输出信息的柱状图"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,diffstat,显示diff命令输出信息的柱状图">
<title>diffstat 命令Linux diffstat 命令详解显示diff命令输出信息的柱状图 - Linux 命令搜索引擎</title> <title>diffstat 命令Linux diffstat 命令详解显示diff命令输出信息的柱状图 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729667"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403197">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -179,7 +179,7 @@ mno
</span></code><div onclick="copied(this)" data-code="testfile | 2 +- #统计信息输出显示 </span></code><div onclick="copied(this)" data-code="testfile | 2 +- #统计信息输出显示
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -192,31 +192,31 @@ mno
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -250,7 +250,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729668"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403198"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729668"></script> <script type="text/javascript" src="../js/index.js?v=1661420403198"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dig,域名查询工具"> <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,dig,域名查询工具">
<title>dig 命令Linux dig 命令详解:域名查询工具 - Linux 命令搜索引擎</title> <title>dig 命令Linux dig 命令详解:域名查询工具 - Linux 命令搜索引擎</title>
<link rel="shortcut icon" href="../img/favicon.ico"> <link rel="shortcut icon" href="../img/favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/index.css?v=1661181729689"> <link rel="stylesheet" type="text/css" href="../css/index.css?v=1661420403213">
<script src="../js/dark-mode.min.js"></script> <script src="../js/dark-mode.min.js"></script>
<script type="module" src="../js/github-corners.js"></script> <script type="module" src="../js/github-corners.js"></script>
</head> </head>
@ -196,7 +196,7 @@ jsdig.com. 8 IN NS f1g1ns1.dnspod.net.
;; WHEN: Thu Dec 26 11:14:37 2013 ;; WHEN: Thu Dec 26 11:14:37 2013
;; MSG SIZE rcvd: 121 ;; MSG SIZE rcvd: 121
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre> " class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<style>.markdown-body pre .copied { <style>markdown-style pre .copied {
display: flex; display: flex;
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
@ -209,31 +209,31 @@ jsdig.com. 8 IN NS f1g1ns1.dnspod.net.
font-size: 12px; font-size: 12px;
transition: all .3s; transition: all .3s;
} }
.markdown-body pre .copied:not(.active) { markdown-style pre .copied:not(.active) {
visibility: hidden; visibility: hidden;
} }
.markdown-body pre:hover .copied { markdown-style pre:hover .copied {
visibility: visible; visibility: visible;
} }
.markdown-body pre:hover .copied:hover { markdown-style pre:hover .copied:hover {
background: #4caf50; background: #4caf50;
color: #fff; color: #fff;
} }
.markdown-body pre:hover .copied:active, markdown-style pre:hover .copied:active,
.markdown-body pre .copied.active { markdown-style pre .copied.active {
background: #2e9b33; background: #2e9b33;
color: #fff; color: #fff;
} }
.markdown-body pre .copied .octicon-copy { markdown-style pre .copied .octicon-copy {
display: block; display: block;
} }
.markdown-body pre .copied .octicon-check { markdown-style pre .copied .octicon-check {
display: none; display: none;
} }
.markdown-body pre .active .octicon-copy { markdown-style pre .active .octicon-copy {
display: none; display: none;
} }
.markdown-body pre .active .octicon-check { markdown-style pre .active .octicon-check {
display: block; display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */ }</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}})); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));
@ -267,7 +267,7 @@ function copied(target, str) {
581 581
</span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者 </span> 个Linux命令超过 <a href="../contributors.html">50+</a> 贡献者
</div> </div>
<script type="text/javascript" src="../js/dt.js?v=1661181729690"></script> <script type="text/javascript" src="../js/dt.js?v=1661420403214"></script>
<script type="text/javascript" src="../js/index.js?v=1661181729690"></script> <script type="text/javascript" src="../js/index.js?v=1661420403214"></script>
</body> </body>
</html> </html>

Some files were not shown because too many files have changed in this diff Show More