<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://tutorials.sdfcn.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gao66</id>
	<title>tutorials.sdfcn.org - sdf中文html教程 - 用户贡献 [zh-cn]</title>
	<link rel="self" type="application/atom+xml" href="https://tutorials.sdfcn.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gao66"/>
	<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E8%B4%A1%E7%8C%AE/Gao66"/>
	<updated>2026-06-06T04:37:19Z</updated>
	<subtitle>用户贡献</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9C%A8_SDF_%E4%B8%8A%E7%9A%84ASCII_%E6%B8%B8%E6%88%8F...&amp;diff=156</id>
		<title>在 SDF 上的ASCII 游戏...</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9C%A8_SDF_%E4%B8%8A%E7%9A%84ASCII_%E6%B8%B8%E6%88%8F...&amp;diff=156"/>
		<updated>2025-08-20T08:45:45Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;谁说你需要花500美元买一张显卡才能玩一款不错的游戏？&lt;br /&gt;
&lt;br /&gt;
== 简介 ==&lt;br /&gt;
在当今数百万种颜色调色板和3D渲染引擎出现之前，只有一种颜色和一台终端机（TTY）。&lt;br /&gt;
&lt;br /&gt;
这并不是说，文字游戏是“过时”或“陈旧”的，也不是说几十年前创作的游戏就不再有趣。事实上，一些较早的ASCII游戏至今仍具有极高的可玩性和趣味性，而且仍有许多ASCII游戏处于积极开发中，新作品也在不断涌现。&lt;br /&gt;
&lt;br /&gt;
SDF 提供了丰富多样的文字冒险游戏，涵盖多种类型供您选择。在这些类别中，您还能发现种类繁多的游戏。也许您想在编译代码的间隙快速玩一局《太空侵略者》。或许您想开始一局《NetHack》，这可能需要您花费数月时间，分多次游戏才能完成。如果您想独自一人玩《俄罗斯方块》，SDF 可以满足您的需求；如果您更喜欢与其他 SDF 用户在《迷宫战争》或《网络俄罗斯方块》中互动，这些选项也同样可用。无论您的偏好如何，无论您当前的心情如何，SDF 都有可能为您提供适合您的游戏。&lt;br /&gt;
&lt;br /&gt;
== 一般提示 ==&lt;br /&gt;
所有游戏均需在相应系统上通过在命令行输入游戏名称来启动。您可通过在SDF系统上输入 &amp;lt;code&amp;gt;man gamename&amp;lt;/code&amp;gt; 或在twenex.org(TOPS-20)系统上输入 &amp;lt;code&amp;gt;help gamename&amp;lt;/code&amp;gt; 来获取命令行选项及游戏玩法的相关信息。&lt;br /&gt;
&lt;br /&gt;
请注意，这些游戏中的许多都使用“vi”键进行方向移动。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
       k (up)&lt;br /&gt;
h (left)   l (right)&lt;br /&gt;
      j (down)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;此外，大多数游戏都包含某种形式的游戏内帮助。为了充分利用您的ASCII游戏体验，建议您在首次玩某款游戏时查阅此帮助内容。这对于文字冒险游戏和RPG/地牢游戏尤为有用，因为作者通常会撰写一个背景故事，该故事在游戏过程中既有趣又实用。&lt;br /&gt;
&lt;br /&gt;
你在SDF上玩过游戏并喜欢它吗？讨厌它吗？那么请使用SDF终端中的 &amp;quot;&amp;lt;code&amp;gt;game-review&amp;lt;/code&amp;gt;&amp;quot; 命令，为 [http://ascii-games.org/ ascii-games.org] 提交游戏评测。你的评测将帮助其他玩家找到符合他们游戏喜好的游戏。&lt;br /&gt;
&lt;br /&gt;
== 按类别浏览游戏 ==&lt;br /&gt;
以下是对SDF及SDF的TOPS-20系统上可用游戏的粗略分类。您可通过在终端提示符下输入 &amp;quot;games&amp;quot; 来获取SDF上所有游戏的完整列表。TOPS-20游戏可通过在twenex.org上输入 &amp;quot;help games&amp;quot; 进行查看。如需查看这些游戏的用户提交评测，请访问 [http://ascii-games.org/ ascii-games.org]。&lt;br /&gt;
&lt;br /&gt;
=== 文字冒险 ===&lt;br /&gt;
文字冒险游戏是一种互动式小说冒险游戏，玩家需要根据游戏中对玩家所处环境的文字描述来进行游戏操作。由于缺乏图形界面，文字冒险游戏即使在最初发布数十年后仍能保持新鲜感。&lt;br /&gt;
&lt;br /&gt;
* [telnet://mud.sdf.org:4000 SDFmud] - SDFmud 强势回归！&lt;br /&gt;
* phantasia - 一款跨终端的幻想游戏。通过击败怪物和其他玩家来获得经验值！&lt;br /&gt;
* advent - 430 pt. 巨大洞穴 (版本 II)。 (TOPS-20)&lt;br /&gt;
* dinkum - 澳大利亚的冒险。&lt;br /&gt;
* tess - 超越超立方体，一个抽象的冒险。&lt;br /&gt;
* crime - 基于 CRiME 的冒险游戏. (TOPS-20)&lt;br /&gt;
* haunt - 你能解开 Chez Moose 的谜团吗？BONG！(TOPS-20)&lt;br /&gt;
* mdl105 - 写你自己的冒险游戏！(TOPS-20)&lt;br /&gt;
* zork - 经典的地下迷宫/谜题。(TOPS-20)&lt;br /&gt;
&lt;br /&gt;
=== RPG / 地牢 ===&lt;br /&gt;
这些游戏涉及探索某种地牢或迷宫。与文字冒险游戏不同，这类游戏通常（但并非总是）包含某种ASCII图形界面。与文字版游戏相比，这类游戏通常具有更自由的玩法。许多这类游戏支持多人互动玩法。这类游戏标有(M)标记。&lt;br /&gt;
&lt;br /&gt;
* dopewars - 多用户虚拟都市生活。(M)&amp;lt;sup&amp;gt;[见下注]&amp;lt;/sup&amp;gt;&lt;br /&gt;
* mdg - John Gonnerman 的多用户地牢游戏。(M)&lt;br /&gt;
* nethack - 你能找到 Yendor 的护身符并生存下来吗？&lt;br /&gt;
* rogue - 在nethack出现之前，就有rogue了。&lt;br /&gt;
* [http://thxmoo.org/ thxmoo] - SDF 自家的 MOO！(M)&lt;br /&gt;
* hunt - 多用户迷宫/射击游戏。&lt;br /&gt;
* mazewar - 经典游戏的 System V UNIX 版本。(M)&amp;lt;small&amp;gt;&amp;lt;sup&amp;gt;[见下注]&amp;lt;/sup&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
* cave - 多人地牢游戏。(TOPS-20)(M)&lt;br /&gt;
&lt;br /&gt;
=== 解谜游戏 ===&lt;br /&gt;
解谜游戏依赖于玩家的批判性思维和解决问题的能力来完成。&lt;br /&gt;
&lt;br /&gt;
* greed - 你的贪婪能带你走多远？&lt;br /&gt;
* c4 - 屏风式四子棋（Connect Four）。&lt;br /&gt;
* life - jpf 为 SDF 开发的生命模拟器。&lt;br /&gt;
* othello - 类似围棋的策略游戏。&lt;br /&gt;
* 俄罗斯方块 - 一个有时间限制的二维解谜游戏&lt;br /&gt;
* netris - 双人俄罗斯方块。(M)&amp;lt;small&amp;gt;&amp;lt;sup&amp;gt;[见下注]&amp;lt;/sup&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
* tttt - 带环绕边缘的井字棋。&lt;br /&gt;
* robots - 机器人已被编程为对你发起攻击。&lt;br /&gt;
* torus - 更快、更智能的机器人已被编程为对你发起攻击。&lt;br /&gt;
* zombies - 僵尸已被编程为对你发起攻击。&lt;br /&gt;
* manhunt - 你能从 ARCTURUS IV 的 LUGIMEN 警察手中逃脱吗？（TOPS-20）&lt;br /&gt;
* wumpus - 你能杀死那有吸盘的 WUMPUS 吗？（TOPS-20）&lt;br /&gt;
&lt;br /&gt;
* sst - Super Star Trek. 超星际迷航。你能保护联邦免遭彻底毁灭吗？&lt;br /&gt;
&lt;br /&gt;
=== 街机/动作 ===&lt;br /&gt;
街机类游戏涉及实时互动。在这些游戏中，你需要闪避、腾跃、俯冲、潜行并闪避，才能取得胜利。&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9C%A8_SDF_%E4%B8%8A%E7%9A%84ASCII_%E6%B8%B8%E6%88%8F...&amp;diff=155</id>
		<title>在 SDF 上的ASCII 游戏...</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9C%A8_SDF_%E4%B8%8A%E7%9A%84ASCII_%E6%B8%B8%E6%88%8F...&amp;diff=155"/>
		<updated>2025-08-20T08:38:17Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;谁说你需要花500美元买一张显卡才能玩一款不错的游戏？&lt;br /&gt;
&lt;br /&gt;
== 简介 ==&lt;br /&gt;
在当今数百万种颜色调色板和3D渲染引擎出现之前，只有一种颜色和一台终端机（TTY）。&lt;br /&gt;
&lt;br /&gt;
这并不是说，文字游戏是“过时”或“陈旧”的，也不是说几十年前创作的游戏就不再有趣。事实上，一些较早的ASCII游戏至今仍具有极高的可玩性和趣味性，而且仍有许多ASCII游戏处于积极开发中，新作品也在不断涌现。&lt;br /&gt;
&lt;br /&gt;
SDF 提供了丰富多样的文字冒险游戏，涵盖多种类型供您选择。在这些类别中，您还能发现种类繁多的游戏。也许您想在编译代码的间隙快速玩一局《太空侵略者》。或许您想开始一局《NetHack》，这可能需要您花费数月时间，分多次游戏才能完成。如果您想独自一人玩《俄罗斯方块》，SDF 可以满足您的需求；如果您更喜欢与其他 SDF 用户在《迷宫战争》或《网络俄罗斯方块》中互动，这些选项也同样可用。无论您的偏好如何，无论您当前的心情如何，SDF 都有可能为您提供适合您的游戏。&lt;br /&gt;
&lt;br /&gt;
== 一般提示 ==&lt;br /&gt;
所有游戏均需在相应系统上通过在命令行输入游戏名称来启动。您可通过在SDF系统上输入 &amp;lt;code&amp;gt;man gamename&amp;lt;/code&amp;gt; 或在twenex.org(TOPS-20)系统上输入 &amp;lt;code&amp;gt;help gamename&amp;lt;/code&amp;gt; 来获取命令行选项及游戏玩法的相关信息。&lt;br /&gt;
&lt;br /&gt;
请注意，这些游戏中的许多都使用“vi”键进行方向移动。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
       k (up)&lt;br /&gt;
h (left)   l (right)&lt;br /&gt;
      j (down)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;此外，大多数游戏都包含某种形式的游戏内帮助。为了充分利用您的ASCII游戏体验，建议您在首次玩某款游戏时查阅此帮助内容。这对于文字冒险游戏和RPG/地牢游戏尤为有用，因为作者通常会撰写一个背景故事，该故事在游戏过程中既有趣又实用。&lt;br /&gt;
&lt;br /&gt;
你在SDF上玩过游戏并喜欢它吗？讨厌它吗？那么请使用SDF终端中的 &amp;quot;&amp;lt;code&amp;gt;game-review&amp;lt;/code&amp;gt;&amp;quot; 命令，为 [http://ascii-games.org/ ascii-games.org] 提交游戏评测。你的评测将帮助其他玩家找到符合他们游戏喜好的游戏。&lt;br /&gt;
&lt;br /&gt;
== 按类别浏览游戏 ==&lt;br /&gt;
以下是对SDF及SDF的TOPS-20系统上可用游戏的粗略分类。您可通过在终端提示符下输入 &amp;quot;games&amp;quot; 来获取SDF上所有游戏的完整列表。TOPS-20游戏可通过在twenex.org上输入 &amp;quot;help games&amp;quot; 进行查看。如需查看这些游戏的用户提交评测，请访问 [http://ascii-games.org/ ascii-games.org]。&lt;br /&gt;
&lt;br /&gt;
=== 文字冒险 ===&lt;br /&gt;
文字冒险游戏是一种互动式小说冒险游戏，玩家需要根据游戏中对玩家所处环境的文字描述来进行游戏操作。由于缺乏图形界面，文字冒险游戏即使在最初发布数十年后仍能保持新鲜感。&lt;br /&gt;
&lt;br /&gt;
* [telnet://mud.sdf.org:4000 SDFmud] - SDFmud 强势回归！&lt;br /&gt;
* phantasia - 一款跨终端的幻想游戏。通过击败怪物和其他玩家来获得经验值！&lt;br /&gt;
* advent - 430 pt. 巨大洞穴 (版本 II)。 (TOPS-20)&lt;br /&gt;
* dinkum - 澳大利亚的冒险。&lt;br /&gt;
* tess - 超越超立方体，一个抽象的冒险。&lt;br /&gt;
* crime - 基于 CRiME 的冒险游戏. (TOPS-20)&lt;br /&gt;
* haunt - 你能解开 Chez Moose 的谜团吗？BONG！(TOPS-20)&lt;br /&gt;
* mdl105 - 写你自己的冒险游戏！(TOPS-20)&lt;br /&gt;
* zork - 经典的地下迷宫/谜题。(TOPS-20)&lt;br /&gt;
&lt;br /&gt;
=== RPG / 地牢 ===&lt;br /&gt;
这些游戏涉及探索某种地牢或迷宫。与文字冒险游戏不同，这类游戏通常（但并非总是）包含某种ASCII图形界面。与文字版游戏相比，这类游戏通常具有更自由的玩法。许多这类游戏支持多人互动玩法。这类游戏标有(M)标记。&lt;br /&gt;
&lt;br /&gt;
* dopewars - 多用户虚拟都市生活。(M)&amp;lt;sup&amp;gt;[见下注]&amp;lt;/sup&amp;gt;&lt;br /&gt;
* mdg - John Gonnerman 的多用户地牢游戏。(M)&lt;br /&gt;
* nethack - 你能找到 Yendor 的护身符并生存下来吗？&lt;br /&gt;
* rogue - 在nethack出现之前，就有rogue了。&lt;br /&gt;
* [http://thxmoo.org/ thxmoo] - SDF 自家的 MOO！(M)&lt;br /&gt;
* hunt - 多用户迷宫/射击游戏。&lt;br /&gt;
* mazewar - 经典游戏的 System V UNIX 版本。(M)&amp;lt;small&amp;gt;&amp;lt;sup&amp;gt;[见下注]&amp;lt;/sup&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
* cave - 多人地牢游戏。(TOPS-20)(M)&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9C%A8_SDF_%E4%B8%8A%E7%9A%84ASCII_%E6%B8%B8%E6%88%8F...&amp;diff=154</id>
		<title>在 SDF 上的ASCII 游戏...</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9C%A8_SDF_%E4%B8%8A%E7%9A%84ASCII_%E6%B8%B8%E6%88%8F...&amp;diff=154"/>
		<updated>2025-08-20T08:21:57Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​创建页面，内容为“谁说你需要花500美元买一张显卡才能玩一款不错的游戏？  == 简介 == 在当今数百万种颜色调色板和3D渲染引擎出现之前，只有一种颜色和一台终端机（TTY）。  这并不是说，文字游戏是“过时”或“陈旧”的，也不是说几十年前创作的游戏就不再有趣。事实上，一些较早的ASCII游戏至今仍具有极高的可玩性和趣味性，而且仍有许多ASCII游戏处于积极开发…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;谁说你需要花500美元买一张显卡才能玩一款不错的游戏？&lt;br /&gt;
&lt;br /&gt;
== 简介 ==&lt;br /&gt;
在当今数百万种颜色调色板和3D渲染引擎出现之前，只有一种颜色和一台终端机（TTY）。&lt;br /&gt;
&lt;br /&gt;
这并不是说，文字游戏是“过时”或“陈旧”的，也不是说几十年前创作的游戏就不再有趣。事实上，一些较早的ASCII游戏至今仍具有极高的可玩性和趣味性，而且仍有许多ASCII游戏处于积极开发中，新作品也在不断涌现。&lt;br /&gt;
&lt;br /&gt;
SDF 提供了丰富多样的文字冒险游戏，涵盖多种类型供您选择。在这些类别中，您还能发现种类繁多的游戏。也许您想在编译代码的间隙快速玩一局《太空侵略者》。或许您想开始一局《NetHack》，这可能需要您花费数月时间，分多次游戏才能完成。如果您想独自一人玩《俄罗斯方块》，SDF 可以满足您的需求；如果您更喜欢与其他 SDF 用户在《迷宫战争》或《网络俄罗斯方块》中互动，这些选项也同样可用。无论您的偏好如何，无论您当前的心情如何，SDF 都有可能为您提供适合您的游戏。&lt;br /&gt;
&lt;br /&gt;
== 一般提示 ==&lt;br /&gt;
所有游戏均需在相应系统上通过在命令行输入游戏名称来启动。您可通过在SDF系统上输入 &amp;lt;code&amp;gt;man gamename&amp;lt;/code&amp;gt; 或在twenex.org(TOPS-20)系统上输入 &amp;lt;code&amp;gt;help gamename&amp;lt;/code&amp;gt; 来获取命令行选项及游戏玩法的相关信息。&lt;br /&gt;
&lt;br /&gt;
请注意，这些游戏中的许多都使用“vi”键进行方向移动。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
       k (up)&lt;br /&gt;
h (left)   l (right)&lt;br /&gt;
      j (down)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;此外，大多数游戏都包含某种形式的游戏内帮助。为了充分利用您的ASCII游戏体验，建议您在首次玩某款游戏时查阅此帮助内容。这对于文字冒险游戏和RPG/地牢游戏尤为有用，因为作者通常会撰写一个背景故事，该故事在游戏过程中既有趣又实用。&lt;br /&gt;
&lt;br /&gt;
你在SDF上玩过游戏并喜欢它吗？讨厌它吗？那么请使用SDF终端中的 &amp;quot;&amp;lt;code&amp;gt;game-review&amp;lt;/code&amp;gt;&amp;quot; 命令，为 [http://ascii-games.org/ ascii-games.org] 提交游戏评测。你的评测将帮助其他玩家找到符合他们游戏喜好的游戏。&lt;br /&gt;
&lt;br /&gt;
== 按类别浏览游戏 ==&lt;br /&gt;
以下是对SDF及SDF的TOPS-20系统上可用游戏的粗略分类。您可通过在终端提示符下输入 &amp;quot;games&amp;quot; 来获取SDF上所有游戏的完整列表。TOPS-20游戏可通过在twenex.org上输入 &amp;quot;help games&amp;quot; 进行查看。如需查看这些游戏的用户提交评测，请访问 [http://ascii-games.org/ ascii-games.org]。&lt;br /&gt;
&lt;br /&gt;
=== 文字冒险 ===&lt;br /&gt;
文字冒险游戏是一种互动式小说冒险游戏，玩家需要根据游戏中对玩家所处环境的文字描述来进行游戏操作。由于缺乏图形界面，文字冒险游戏即使在最初发布数十年后仍能保持新鲜感。&lt;br /&gt;
&lt;br /&gt;
* [telnet://mud.sdf.org:4000 SDFmud] - SDFmud 强势回归！&lt;br /&gt;
* phantasia - 一款跨终端的幻想游戏。通过击败怪物和其他玩家来获得经验值！&lt;br /&gt;
* advent - 430 pt. 巨大洞穴 (版本 II)。 (TOPS-20)&lt;br /&gt;
* dinkum - 澳大利亚的冒险。&lt;br /&gt;
* tess - 超越超立方体，一个抽象的冒险。&lt;br /&gt;
* crime - 基于 CRiME 的冒险游戏. (TOPS-20)&lt;br /&gt;
* haunt - 你能解开 Chez Moose 的谜团吗？BONG！(TOPS-20)&lt;br /&gt;
* mdl105 - 写你自己的冒险游戏！(TOPS-20)&lt;br /&gt;
* zork - 经典的地下迷宫/谜题。(TOPS-20)&lt;br /&gt;
&lt;br /&gt;
=== RPG / 地牢 ===&lt;br /&gt;
这些游戏涉及探索某种地牢或迷宫。与文字冒险游戏不同，这类游戏通常（但并非总是）包含某种ASCII图形界面。与文字版游戏相比，这类游戏通常具有更自由的玩法。许多这类游戏支持多人互动玩法。这类游戏标有(M)标记。&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=153</id>
		<title>首页</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=153"/>
		<updated>2025-08-20T07:39:53Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;tutorials.sdfcn.org - sdf中文html教程说明&amp;lt;/strong&amp;gt;&lt;br /&gt;
* 基于[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]翻译而来，只是转述[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]的内容，某些内容可能过时，不对其中观点负责。&lt;br /&gt;
* 此教程翻译自传统的[https://sdf.org/?tutorials html教程]，并非新[https://wiki.sdf.org sdf教程维基]，但是今后也会进行翻译。&lt;br /&gt;
&lt;br /&gt;
* 除非另有声明，本网站内容采用[https://creativecommons.org/licenses/by/4.0/ Creative Commons Attribution] (CC BY 4.0) 授权。&lt;br /&gt;
&lt;br /&gt;
* 此教程目前为个人维护项目，如果想加入翻译请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
&lt;br /&gt;
* 若教程内容出现问题（如翻译问题等），也请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
2023.6.19 gao66 on sdf&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF、UNIX和INTERNET教程&#039;&#039;&#039; ==&lt;br /&gt;
&#039;&#039;&#039;SDF成员贡献教程，是为了与INTERNET、UNIX操作系统和编程语言感兴趣的现有和潜在的SDF用户分享知识，并提供帮助。本项目的目的是通过实际且有用的示例，帮助用户充分利用 SDF 和 UNIX 的丰富功能。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;两个教程项目&#039;&#039;&#039; ==&lt;br /&gt;
目前有两个重叠的教程项目：&lt;br /&gt;
&lt;br /&gt;
* 新的[https://wiki.sdf.org SDF教程维基]，可在wiki.sdf.org找到。&amp;lt;ref&amp;gt;中文翻译版本会放在https://wiki.sdf.org，目前还没有。 --译者注&amp;lt;/ref&amp;gt;它包含下面列出的所有（或几乎所有）HTML教程的移植版本，以及新的内容。它还包括搜索功能，以及一个标准化的页面格式。&lt;br /&gt;
*传统的[[#HTML教程]]，即是以下内容。这些教程包含了许多由SDF用户多年来创建和更新的基础和高级教程。&lt;br /&gt;
&lt;br /&gt;
===有兴趣做出贡献吗？===&lt;br /&gt;
&lt;br /&gt;
*向教程维基做贡献：教程维基的建立是为了方便添加和维护教程的内容。要在教程维基上做贡献，你需要为自己建立一个账户。发送电子邮件至 [mailto:membership@sdf.org membership@sdf.org] （mailto link）以获得一个具有写入权限的账户，以便能够在维基上贡献编辑和新内容。 &amp;lt;br /&amp;gt;教程维基页面可以在你的浏览器中直接编辑，如果你担心把事情搞乱，它有内置的预览和版本控制。如果你有任何使用维基的经验，这对你来说很容易。更多细节作为Dokuwiki页面链接到了维基本身上，包括：&lt;br /&gt;
**[https://www.dokuwiki.org/wiki:syntax 维基语法]&lt;br /&gt;
**[https://www.dokuwiki.org/manual 维基用户手册]&lt;br /&gt;
*向HTML教程做贡献：传统的HTML教程项目包括本页面和下面链接的所有教程页面。为了能够对HTML教程做出贡献，请阅读[[SDF HTML教程编辑指南|HTML教程编辑指南]]，该指南也在[https://wiki.sdf.org/doku.php?id=sdf_tutorial_editing_guide 此处]的维基页面提供&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF教程维基&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki.sdfcn.org/ SDF教程维基]&amp;lt;ref&amp;gt; 目前还不存在，今后会进行翻译  --译者注 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;&amp;lt;span id=&amp;quot;HTML教程&amp;quot;&amp;gt;HTML教程：目录&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[[#SDF基础知识]]&lt;br /&gt;
#[[#电子邮件]]&lt;br /&gt;
#[[#网站设置和托管功能]]&lt;br /&gt;
#[[#高级专题]]&lt;br /&gt;
#[[#SDF的互联网聊天中继（IRC）]]&lt;br /&gt;
#[[#SDF VoIP电话服务]]&lt;br /&gt;
#[[#SDF 拨号（Dialup）和DSL互联网服务]]（适用于Dialup和DSL成员）&lt;br /&gt;
#[[#SDF电台！/ ANONRADIO服务]]&lt;br /&gt;
#[[#SDF VPS服务]]（适用于metaArpa成员）&lt;br /&gt;
#[[#Cheat Sheets (文本编辑器）]]&lt;br /&gt;
#[[#Dotfile（配置文件）资料库]]&lt;br /&gt;
#[[#twenex.org - SDF公共访问 TWENEX 操作系统]]&lt;br /&gt;
#[[#在线隐私]]&lt;br /&gt;
#[[#复古计算]]&lt;br /&gt;
#[[#贝尔实验室的Plan 9项目]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF基础知识&amp;quot;&amp;gt;1. SDF基础知识===&lt;br /&gt;
&lt;br /&gt;
*[[从Shell中寻找帮助|寻找帮助]] - 如何在shell中取得帮助&lt;br /&gt;
*[[COM不是IRC]]（互联网聊天中继）- 聊天程序 &amp;quot;COM&amp;quot; 的介绍&lt;br /&gt;
*[[bboard]] - 对论坛 &amp;quot;bboard&amp;quot; 的介绍&lt;br /&gt;
*[[SDF 多用户环境中的个人责任|多用户系统的责任]] - 关于SDF多用户环境下用户责任的声明&lt;br /&gt;
*[[SDF SSH 主机密钥|主机密钥]] - SDF的SSH主机密钥的列表&lt;br /&gt;
*[[SDF 中的即时信息|即时通讯]] - 如何在SDF上使用即时通讯服务&lt;br /&gt;
*[[文件传输教程|文件传输]] - 如何将文件移入或移出SDF&lt;br /&gt;
*[[UNIX® Shell之间的最终差异]] - 比较shell的差异/相似性&lt;br /&gt;
*[[权限|文件权限]] - 更改文件权限&lt;br /&gt;
*[[基本的文件和shell操作]] - 使用一些命令操作文件和目录&lt;br /&gt;
*[[在 SDF 上的ASCII 游戏...|ASCII游戏]] - 只工作不玩乐只会使你自己成为一个无趣的SDFer&lt;br /&gt;
*如何捐赠及原因 - 解释你的朋友和你的家人（或你）应该如何以及为什么要帮助资助SDF的一个页面。&lt;br /&gt;
*传播关于SDF的信息&lt;br /&gt;
*为盲人用户的SDF&lt;br /&gt;
*使用微软Windows™ 的 telnet&lt;br /&gt;
*SDF上的按类别排序的软件&lt;br /&gt;
*SDF特有命令 - SDF特有的命令、脚本和程序的列表。&lt;br /&gt;
*Jabber IM服务器 - 使用SDF Jabber XMPP即时通讯服务器&lt;br /&gt;
*SDF上的游戏服务器 - 在SDF上运行的多人游戏服务器列表&lt;br /&gt;
*Tiny Tiny RSS - 在SDF中托管的RSS阅读器&lt;br /&gt;
*MetaArray（元数组） - 存储以及为MetaArpa成员提供的一些服务&lt;br /&gt;
*GNU 社区 - SDF的微博&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;电子邮件&amp;quot;&amp;gt;2. 电子邮件 ===&lt;br /&gt;
&lt;br /&gt;
* 为初学者提供的电子邮件教程&lt;br /&gt;
* 电子邮件基础知识&lt;br /&gt;
* 电子邮件的黑名单问题 - 别人收到你的SDF邮件的问题&lt;br /&gt;
* SDF灰名单 - 减少垃圾邮件的系统政策&lt;br /&gt;
* Mutt邮件的用户代理（User Agent）&lt;br /&gt;
* 高级电子邮件主题 - 转发信息，打击垃圾邮件&lt;br /&gt;
* 设置一段假期 - 发送自动邮件回复&lt;br /&gt;
* POP3、IMAP和SMTP 验证 - 在流行的邮件客户端设置POP3、IMAP和SMTP认证&lt;br /&gt;
* SDF上的Procmail（邮件过滤工具）- 一般的配置说明&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;网站设置和托管功能&amp;quot;&amp;gt;3. 网站设置和托管功能 ===&lt;br /&gt;
&lt;br /&gt;
* 网站 - 在SDF上建立一个网站&lt;br /&gt;
* 为网站建设者提供的资源&lt;br /&gt;
* 自定义错误页面 - 使用.htaccess创建自定义错误页面&lt;br /&gt;
* SDF上的Ruby on Rails&lt;br /&gt;
** Ruby on Rails - SDF上的Ruby on Rails&lt;br /&gt;
** 构建一个基本的Ruby on Rails应用程序&lt;br /&gt;
* SDF上的Trac - 设置和使用Trac实例&lt;br /&gt;
* Gopher - 构建你自己的Gopher空间&lt;br /&gt;
* 用Jekyll写博客&lt;br /&gt;
* Htaccess - Apache HTTP服务器的有用的.htaccess技巧和窍门&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;高级专题&amp;quot;&amp;gt;4. 高级专题 ===&lt;br /&gt;
&lt;br /&gt;
* 编程语言、代码开发和编译器 - 在SDF编写你自己的代码&lt;br /&gt;
*使用skey - 通过不安全的协议安全地登录&lt;br /&gt;
*Emacs教程 - Emacs基础知识，使用Emacs作为工作环境&lt;br /&gt;
*SSH - 使用SDF时，通过SSH保证安全和路由客户端应用程序&lt;br /&gt;
*SSHFS - 使用SSHFS在linux本地机器上挂载SDF文件夹&lt;br /&gt;
*EncFS - 使用EncFS来管理加密的文件夹&lt;br /&gt;
*PSSHFS - 在NetBSD本地机器上挂载SDF文件夹&lt;br /&gt;
*VPN - 连接到SDF VPN（PPTP和OpenVPN）&lt;br /&gt;
*rsync - 使用rsync备份$HOME&lt;br /&gt;
*CVS - 在SDF上使用CVS&lt;br /&gt;
*GCI - SDF绿色计算倡议（Green Computing Initiative）&lt;br /&gt;
*MDNS（动态dns）- 自动MDNS示例(MetaARPA)&lt;br /&gt;
*SDF上的RubyGems - 设置 &amp;quot;gem&amp;quot; 命令&lt;br /&gt;
*scmgit - GIT源代码控制管理介绍&lt;br /&gt;
*SDFARC中继列表 - SDF业余无线电俱乐部（SDF Amateur Radio Club）使用的中继器列表&lt;br /&gt;
*toobnix.org - SDF的用户视频库&lt;br /&gt;
*X11转发 - 设置和运行X11应用程序（MetaARPA）&lt;br /&gt;
*$HOME/bin - 用户在SDF的多架构环境中编译的程序（ARPA）&lt;br /&gt;
*Screen - 复用你的终端（MetaARPA）&lt;br /&gt;
*Tmux - Screen的替代方案（MetaARPA）&lt;br /&gt;
*Minecraft - SDF自己的*私人*Minecraft（我的世界）服务器&lt;br /&gt;
*Chicken - Scheme编程语言的一种实现&lt;br /&gt;
*ECL - 可嵌入的通用编程语言&lt;br /&gt;
*移动应用 - 移动设备的应用&lt;br /&gt;
*端口分配 - MetaARPA成员的端口分配和使用信息&lt;br /&gt;
*UUCP（Unix-to-Unix Copy） - 通过轮询SDF获得UUCP新闻组新闻（USENET News）和网络邮件&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF的互联网聊天中继（IRC）&amp;quot;&amp;gt;5. SDF的互联网中继聊天（IRC） ===&lt;br /&gt;
&lt;br /&gt;
* SDF IRC可接受使用政策&lt;br /&gt;
* SDF IRC 频道&lt;br /&gt;
* 用Irssi自动连接IRC频道&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VoIP电话服务&amp;quot;&amp;gt;6. SDF VoIP电话服务 ===&lt;br /&gt;
&lt;br /&gt;
* 基本设置&lt;br /&gt;
* 扩展目录&lt;br /&gt;
* 高级功能和设置&lt;br /&gt;
* 配置FreePBX&lt;br /&gt;
* 配置思科（Cisco）7940G电话&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF 拨号（Dialup）和DSL互联网服务&amp;quot;&amp;gt;7. SDF 拨号（Dialup）和DSL互联网服务（适用于Dialup和DSL成员） ===&lt;br /&gt;
&lt;br /&gt;
* SDF 拨号 - 介绍和初始账户配置&lt;br /&gt;
** 设备升级 - SDF拨号所需的设备和服务&lt;br /&gt;
** 设置 - WinXP - 在Windows XP上配置拨号&lt;br /&gt;
** 设置 - Lucid - 在Ubuntu Linux上配置拨号&lt;br /&gt;
* SDF SDL - 配置和使用SDF DSL&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF电台！/ ANONRADIO服务&amp;quot;&amp;gt;8. SDF电台！/ ANONRADIO服务 ===&lt;br /&gt;
&lt;br /&gt;
* 如何收听ANONRADIO&lt;br /&gt;
* 如何在ANONRADIO上成为DJ&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VPS服务&amp;quot;&amp;gt;9. SDF VPS服务（适用于MetaARPA成员） ===&lt;br /&gt;
&lt;br /&gt;
* NetBSD的设置和配置&lt;br /&gt;
* 安装一个OpenLDAP服务器&lt;br /&gt;
* Debian的设置和配置&lt;br /&gt;
* Ubuntu的设置和配置（WIP）&lt;br /&gt;
* Plan9的设置和配置&lt;br /&gt;
* CentOS的设置和配置&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Cheat Sheets (文本编辑器）&amp;quot;&amp;gt;10. 小贴士  ===&lt;br /&gt;
&lt;br /&gt;
* 适用于Vi、awk、sed等的小贴士&lt;br /&gt;
* Emacs小贴士&lt;br /&gt;
* ed小贴士&lt;br /&gt;
* Pico小贴士&lt;br /&gt;
* 生存下来的TECO&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;Dotfile（配置文件）资料库&amp;quot;&amp;gt;11. Dotfile（配置文件）资料库 ===&lt;br /&gt;
&lt;br /&gt;
* 浏览含有注解的Dotfiles - 寻找工作示例，帮助你配置你最喜欢的程序。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;twenex.org - SDF公共访问 TWENEX 操作系统&amp;quot;&amp;gt;12. twenex.org - SDF公共访问 TWENEX 操作系统 ===&lt;br /&gt;
&lt;br /&gt;
* TOPS-20互动教程 - twenex.org的互动教程（@TOPS20）的日志和摘要&lt;br /&gt;
* 进入TWENEX - 为中级用户提供的twenex.org系统之旅&lt;br /&gt;
* 在TWENEX上使用多个互动程序 - 关于如何在同一登录中使用多个程序的教程&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;在线隐私&amp;quot;&amp;gt;13. 在线隐私 ===&lt;br /&gt;
&lt;br /&gt;
* 隐私保护&lt;br /&gt;
* SDF的隐私政策&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;复古计算&amp;quot;&amp;gt;14. 复古计算 ===&lt;br /&gt;
&lt;br /&gt;
* 歇斯底里的Unix指南 - 庆祝UNIX操作系统50周年&lt;br /&gt;
* CDC 6500生存指南&lt;br /&gt;
* 基本程序&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;贝尔实验室的Plan 9项目&amp;quot;&amp;gt;15. 贝尔实验室的Plan 9项目 ===&lt;br /&gt;
&#039;&#039;&#039;贝尔实验室的Plan 9&#039;&#039;&#039;是一个研究性的操作系统，被设计为超越Unix的操作系统进化的下一步。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDF&#039;&#039;&#039;赞助了一系列的训练营来介绍新用户使用&#039;&#039;&#039;Plan 9&#039;&#039;&#039;。本节教程收集了营员们的发现。&lt;br /&gt;
&lt;br /&gt;
* 为SDF VPS基本单位进行Plan9设置和配置&lt;br /&gt;
* Plan 9 C语言编程&lt;br /&gt;
* Plan 9 Rc 生存指南&lt;br /&gt;
* (在此添加你的Plan 9教程的链接)&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&amp;lt;small&amp;gt;&#039;&#039;$Id: index.html,v 1.195 2025/03/05 00:30:45 peteyboy Exp $&#039;&#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=152</id>
		<title>基本的文件和shell操作</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=152"/>
		<updated>2025-08-20T07:36:13Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在本教程中，我们将简要解释一些基本的文件和 Shell 操作，本教程使用以下命令：&lt;br /&gt;
&lt;br /&gt;
== 命令列表 ==&lt;br /&gt;
&lt;br /&gt;
# touch -- 创建文件&lt;br /&gt;
# pwd -- 打印当前工作目录&lt;br /&gt;
# ls -- 列出当前目录中的文件&lt;br /&gt;
# cp -- 复制文件&lt;br /&gt;
# mv -- 移动文件&lt;br /&gt;
# rm -- 删除文件&lt;br /&gt;
# file -- 检查文件类型&lt;br /&gt;
# less -- 阅读文件&lt;br /&gt;
# mkdir -- 创建目录&lt;br /&gt;
# cd -- 改变目录&lt;br /&gt;
# rmdir -- 删除目录&lt;br /&gt;
# clear -- 清屏&lt;br /&gt;
&lt;br /&gt;
请注意，上述每个命令都有相应的 man 手册页，其中会详细介绍每个命令的全部功能。在本教程中，我们仅提供简要概述，足以在命令行上完成基本操作。如需了解更多关于 man 手册页的信息，请参阅《[[从Shell中寻找帮助]]》教程。&lt;br /&gt;
&lt;br /&gt;
=== 首先，关于以下几点的说明： ===&lt;br /&gt;
&lt;br /&gt;
* 命令选项&lt;br /&gt;
* 文件命名&lt;br /&gt;
&lt;br /&gt;
==== 1. 命令选项 ====&lt;br /&gt;
上述所有命令以及你在终端中发现和使用的许多命令都可以通过使用选项进行修改。请查阅手册页以获取每个命令可用选项的详细信息。选项通常以 ls -l 的形式出现，即你输入命令后，空格一次，输入一个连字符和所需选项的字母。&lt;br /&gt;
&lt;br /&gt;
SDF 服务器的一大特色是，它现在同时提供了带有 BSD 风格选项的命令和带有 GNU 风格选项的命令。例如，ls 命令为用户提供了带有 BSD 风格选项的命令。而以 “g” 开头的 gls 命令则表示带有 GNU 风格选项的 ls 命令。这一点非常值得注意，因为大多数用户对带有 GNU 风格选项的二进制文件更为熟悉。最常用的命令包括：gls --color=always 和 gdiff。&lt;br /&gt;
&lt;br /&gt;
==== 2. 文件命名 ====&lt;br /&gt;
在命名文件或目录时，最好避免在名称中使用空格。例如，文件名“my journal.txt”可能比“my_journal.txt”更难处理。这是因为 shell 会将“my journal.txt”视为两个独立的文件：一个名为“my”，另一个名为“journal.txt”。如果你遇到文件名中包含空格的情况，可以使用以下方法进行处理：&lt;br /&gt;
&lt;br /&gt;
# 在文件名周围使用单引号或双引号：&lt;br /&gt;
#* &amp;lt;code&amp;gt;rm &amp;quot;my file.txt&amp;quot;&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cp &#039;my file.txt&#039; my_file.txt&amp;lt;/code&amp;gt;, 作为例子。&lt;br /&gt;
# 在空格处使用反斜杠：&lt;br /&gt;
#* &amp;lt;code&amp;gt;mv my\ file.txt my_file.txt&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cd backups/text\ pages/&amp;lt;/code&amp;gt;。&lt;br /&gt;
# 使用 Tab 补全功能：许多终端 shell 支持 Tab 补全功能。这意味着，如果你输入文件名的前两个或三个字符并按下 Tab 键，除非你有多个文件名开头相似的文件，否则你的终端 shell 可能会为你自动补全文件名。注意：如果你所在的目录与你要补全的文件所在的目录不同，你需要提供路径，而 Tab 补全功能也可以帮助你完成这一点。&lt;br /&gt;
&lt;br /&gt;
此外，在使用两个或更多单词为文件命名时，最安全的选择是使用下划线、连字符和句点。举例：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my_file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my-file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my.file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
或者，你可以将其作为一个单词：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;myfile.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
使用其他符号（如“&amp;amp;”）可能会引发问题，因为这些符号在某些情况下可能对 shell 具有其他含义。如需更多信息，建议查阅您所选 shell 的手册页（man-pages）。&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
注意：在下面的示例中，百分号用于表示命令提示符，并不需要输入。&lt;br /&gt;
&lt;br /&gt;
=== touch 和 pwd：创建文件并输出工作目录 ===&lt;br /&gt;
要创建一个文件而无需调用文本编辑器或其他程序，只需使用 &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt; 即可。例如，要创建一个名为 orange.txt 的文件，在命令提示符下输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% touch orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;没什么大不了的！要查看你创建的文件，你可以列出当前工作目录中的文件和目录。首先，让我们看看我们当前所在的目录。默认情况下，当你通过SSH或Telnet连接到你的shell账户时，你会进入你的主目录。要确认这一点，在命令提示符下你可以输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% pwd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你的用户名是 georgette，你可能会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/udd/g/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;或者如果你在自己家的电脑上，也许你会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/home/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ls : 列出当前目录中的文件 ===&lt;br /&gt;
现在要列出您当前目录中的文件，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你按照教程使用 &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt; 命令创建了 &amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt; 文件，你应该能在 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令的输出结果中看到该文件。接下来，尝试使用 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令并结合以下各种选项，观察每个选项提供的信息类型有何不同：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls -l&lt;br /&gt;
% ls -hl&lt;br /&gt;
% ls -a&lt;br /&gt;
% ls -al&lt;br /&gt;
% ls -ahl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== cp : 复制文件 ===&lt;br /&gt;
复制文件同样非常简单。复制命令具有两个重要功能：一是对目标文件进行简单的备份，二是重命名文件的同时保留原文件。&lt;br /&gt;
&lt;br /&gt;
假设你想将你的&amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt;文件备份到一个名为backups的子目录中（关于如何创建目录，稍后会详细说明）。要实现这一点，你需要输入以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;单词 &#039;&#039;backups&#039;&#039; 末尾的斜杠表示这是一个目录。&lt;br /&gt;
&lt;br /&gt;
要使用 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令更改文件名称而不破坏原文件，您需要输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中 &#039;&#039;papaya.txt&#039;&#039; 是文件的新名称。&lt;br /&gt;
&lt;br /&gt;
要将原始 &amp;quot;orange.txt&amp;quot; 文件复制到备份目录并同时更改名称，您需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== mv : 移动或重命名文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令与 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令的工作原理类似，但有一个关键区别。移动文件意味着会删除原文件名。因此，以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;本质上是用新的 &#039;&#039;papaya.txt&#039;&#039; 文件替换原有的 &#039;&#039;orange.txt&#039;&#039; 文件。&lt;br /&gt;
&lt;br /&gt;
您可以使用 &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令将文件移动到另一个目录，同时保持文件名不变。要执行此操作，请输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将把 &#039;&#039;orange.txt&#039;&#039; 文件移动到 backups 目录。要将文件移动到 backups 目录并重命名，你需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== rm : 删除文件 ===&lt;br /&gt;
删除文件也非常简单。执行此操作的命令是 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;。要彻底删除并销毁一个文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 交互使用简述 ====&lt;br /&gt;
如果不小心使用复制、移动和删除文件的命令，可能会给你带来一些麻烦。对于这些命令，你可以通过输入以下内容来启用交互式选项：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp -i orange.txt backups/orange.txt&lt;br /&gt;
% mv -i orange.txt papaya.txt&lt;br /&gt;
% rm -i orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当调用交互式选项时，系统会提示您对每个要删除的文件回答“是”或“否”。对于 &amp;lt;code&amp;gt;cp -i&amp;lt;/code&amp;gt; 和 &amp;lt;code&amp;gt;mv -i&amp;lt;/code&amp;gt; 命令，系统仅在您要复制或移动的文件会覆盖另一个文件时才会提示您。&lt;br /&gt;
&lt;br /&gt;
=== file：检查文件类型 ===&lt;br /&gt;
文件命令可用于确定文件的类型。在类Unix操作系统中，文件名具有较高的灵活性，文件扩展名（如.txt后缀）并非总是必要。因此，如果有人发送给你一个文件，而你希望在打开它之前确认其类型，可以使用文件命令如下：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file name_of_file&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;文本文件的结果将类似于以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
name_of_file: ASCII text&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;假设有人给你发送了一个名为 &#039;&#039;something.something&#039;&#039; 的PNG格式图像文件，而你想确认它确实是PNG格式文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file something.something&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件确实是 PNG 文件，你应该看到类似以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
something.something: PNG image data, 922 x 691, 8-bit/color RGBA, non-interlaced&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== less : 阅读文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;less&amp;lt;/code&amp;gt; 命令是一种用于查看和浏览文本文件的分页器，无需修改文件或在文本编辑器中打开文件。建议您阅读该命令的 man 手册页，因为它具备许多实用功能，例如在文本中搜索关键词或字符串。使用该命令时，请输入要查看的文件名称：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% less orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件中的文字超过了电脑屏幕的显示范围，请按空格键逐页向下滚动。通常情况下，键盘上的 Page Up 和 Page Down 按钮可以正常使用，而方向键则允许您逐行在文件中上下移动。&lt;br /&gt;
&lt;br /&gt;
=== mkdir : 创建目录 ===&lt;br /&gt;
您可以使用 mkdir 命令创建目录。要创建我们在之前示例中使用的备份目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mkdir backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== cd : 更改目录 ===&lt;br /&gt;
cd 命令用于切换目录。如果我们当前位于主目录，想要进入新创建的 &#039;&#039;backups&#039;&#039; 子目录，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;要返回，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;单独输入 &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; 命令将始终带您返回主目录，这在您深入目录树的其他分支时非常有用。如果您只想返回上一级目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd ..&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当然，你也可以直接输入要切换到的目录的完整路径：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd /usr/bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;要切换回上一个工作目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== rmdir：删除目录 ===&lt;br /&gt;
要删除一个空目录，使用 &amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt; 命令。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rmdir backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt; 命令仅在要删除的目录中没有文件时才有效。如果目录中包含文件，而你确定要删除该目录及其所有文件，实际上你需要返回 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt; 命令并输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm -r name_of_directory&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; 是一个命令选项，用于指示 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt; (remove) 命令删除目录及其所有内容（包括子目录），它表示&#039;&#039;递归&#039;&#039;。使用此命令时请务必小心！事实上，更安全的方式是通过以下方式执行此命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm -ir&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将调用删除命令的交互使用方式，系统会提示您对每个可能被删除的文件和目录回答“是”或“否”。再次提醒，请查阅手册页以获取更多详细信息。&lt;br /&gt;
&lt;br /&gt;
=== clear : 清屏 ===&lt;br /&gt;
最后，要清除屏幕，请在命令提示符下输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% clear&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: file_operations.html,v 1.12 2024/07/24 19:49:11 cseiler Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=151</id>
		<title>基本的文件和shell操作</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=151"/>
		<updated>2025-08-20T07:33:51Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在本教程中，我们将简要解释一些基本的文件和 Shell 操作，本教程使用以下命令：&lt;br /&gt;
&lt;br /&gt;
== 命令列表 ==&lt;br /&gt;
&lt;br /&gt;
# touch -- 创建文件&lt;br /&gt;
# pwd -- 打印当前工作目录&lt;br /&gt;
# ls -- 列出当前目录中的文件&lt;br /&gt;
# cp -- 复制文件&lt;br /&gt;
# mv -- 移动文件&lt;br /&gt;
# rm -- 删除文件&lt;br /&gt;
# file -- 检查文件类型&lt;br /&gt;
# less -- 阅读文件&lt;br /&gt;
# mkdir -- 创建目录&lt;br /&gt;
# cd -- 改变目录&lt;br /&gt;
# rmdir -- 删除目录&lt;br /&gt;
# clear -- 清屏&lt;br /&gt;
&lt;br /&gt;
请注意，上述每个命令都有相应的 man 手册页，其中会详细介绍每个命令的全部功能。在本教程中，我们仅提供简要概述，足以在命令行上完成基本操作。如需了解更多关于 man 手册页的信息，请参阅《[[从Shell中寻找帮助]]》教程。&lt;br /&gt;
&lt;br /&gt;
=== 首先，关于以下几点的说明： ===&lt;br /&gt;
&lt;br /&gt;
* 命令选项&lt;br /&gt;
* 文件命名&lt;br /&gt;
&lt;br /&gt;
==== 1. 命令选项 ====&lt;br /&gt;
上述所有命令以及你在终端中发现和使用的许多命令都可以通过使用选项进行修改。请查阅手册页以获取每个命令可用选项的详细信息。选项通常以 ls -l 的形式出现，即你输入命令后，空格一次，输入一个连字符和所需选项的字母。&lt;br /&gt;
&lt;br /&gt;
SDF 服务器的一大特色是，它现在同时提供了带有 BSD 风格选项的命令和带有 GNU 风格选项的命令。例如，ls 命令为用户提供了带有 BSD 风格选项的命令。而以 “g” 开头的 gls 命令则表示带有 GNU 风格选项的 ls 命令。这一点非常值得注意，因为大多数用户对带有 GNU 风格选项的二进制文件更为熟悉。最常用的命令包括：gls --color=always 和 gdiff。&lt;br /&gt;
&lt;br /&gt;
==== 2. 文件命名 ====&lt;br /&gt;
在命名文件或目录时，最好避免在名称中使用空格。例如，文件名“my journal.txt”可能比“my_journal.txt”更难处理。这是因为 shell 会将“my journal.txt”视为两个独立的文件：一个名为“my”，另一个名为“journal.txt”。如果你遇到文件名中包含空格的情况，可以使用以下方法进行处理：&lt;br /&gt;
&lt;br /&gt;
# 在文件名周围使用单引号或双引号：&lt;br /&gt;
#* &amp;lt;code&amp;gt;rm &amp;quot;my file.txt&amp;quot;&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cp &#039;my file.txt&#039; my_file.txt&amp;lt;/code&amp;gt;, 作为例子。&lt;br /&gt;
# 在空格处使用反斜杠：&lt;br /&gt;
#* &amp;lt;code&amp;gt;mv my\ file.txt my_file.txt&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cd backups/text\ pages/&amp;lt;/code&amp;gt;。&lt;br /&gt;
# 使用 Tab 补全功能：许多终端 shell 支持 Tab 补全功能。这意味着，如果你输入文件名的前两个或三个字符并按下 Tab 键，除非你有多个文件名开头相似的文件，否则你的终端 shell 可能会为你自动补全文件名。注意：如果你所在的目录与你要补全的文件所在的目录不同，你需要提供路径，而 Tab 补全功能也可以帮助你完成这一点。&lt;br /&gt;
&lt;br /&gt;
此外，在使用两个或更多单词为文件命名时，最安全的选择是使用下划线、连字符和句点。举例：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my_file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my-file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my.file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
或者，你可以将其作为一个单词：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;myfile.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
使用其他符号（如“&amp;amp;”）可能会引发问题，因为这些符号在某些情况下可能对 shell 具有其他含义。如需更多信息，建议查阅您所选 shell 的手册页（man-pages）。&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
注意：在下面的示例中，百分号用于表示命令提示符，并不需要输入。&lt;br /&gt;
&lt;br /&gt;
=== touch 和 pwd：创建文件并输出工作目录 ===&lt;br /&gt;
要创建一个文件而无需调用文本编辑器或其他程序，只需使用touch即可。例如，要创建一个名为 orange.txt 的文件，在命令提示符下输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% touch orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;没什么大不了的！要查看你创建的文件，你可以列出当前工作目录中的文件和目录。首先，让我们看看我们当前所在的目录。默认情况下，当你通过SSH或Telnet连接到你的shell账户时，你会进入你的主目录。要确认这一点，在命令提示符下你可以输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% pwd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你的用户名是 georgette，你可能会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/udd/g/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;或者如果你在自己家的电脑上，也许你会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/home/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ls : 列出当前目录中的文件 ===&lt;br /&gt;
现在要列出您当前目录中的文件，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你按照教程使用 &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt; 命令创建了 &amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt; 文件，你应该能在 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令的输出结果中看到该文件。接下来，尝试使用 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令并结合以下各种选项，观察每个选项提供的信息类型有何不同：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls -l&lt;br /&gt;
% ls -hl&lt;br /&gt;
% ls -a&lt;br /&gt;
% ls -al&lt;br /&gt;
% ls -ahl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== cp : 复制文件 ===&lt;br /&gt;
复制文件同样非常简单。复制命令具有两个重要功能：一是对目标文件进行简单的备份，二是重命名文件的同时保留原文件。&lt;br /&gt;
&lt;br /&gt;
假设你想将你的&amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt;文件备份到一个名为backups的子目录中（关于如何创建目录，稍后会详细说明）。要实现这一点，你需要输入以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;单词 &#039;&#039;backups&#039;&#039; 末尾的斜杠表示这是一个目录。&lt;br /&gt;
&lt;br /&gt;
要使用 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令更改文件名称而不破坏原文件，您需要输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中 &#039;&#039;papaya.txt&#039;&#039; 是文件的新名称。&lt;br /&gt;
&lt;br /&gt;
要将原始 &amp;quot;orange.txt&amp;quot; 文件复制到备份目录并同时更改名称，您需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== mv : 移动或重命名文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令与 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令的工作原理类似，但有一个关键区别。移动文件意味着会删除原文件名。因此，以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;本质上是用新的 &#039;&#039;papaya.txt&#039;&#039; 文件替换原有的 &#039;&#039;orange.txt&#039;&#039; 文件。&lt;br /&gt;
&lt;br /&gt;
您可以使用 &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令将文件移动到另一个目录，同时保持文件名不变。要执行此操作，请输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将把 &#039;&#039;orange.txt&#039;&#039; 文件移动到 backups 目录。要将文件移动到 backups 目录并重命名，你需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== rm : 删除文件 ===&lt;br /&gt;
删除文件也非常简单。执行此操作的命令是 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;。要彻底删除并销毁一个文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 交互使用简述 ====&lt;br /&gt;
如果不小心使用复制、移动和删除文件的命令，可能会给你带来一些麻烦。对于这些命令，你可以通过输入以下内容来启用交互式选项：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp -i orange.txt backups/orange.txt&lt;br /&gt;
% mv -i orange.txt papaya.txt&lt;br /&gt;
% rm -i orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当调用交互式选项时，系统会提示您对每个要删除的文件回答“是”或“否”。对于 &amp;lt;code&amp;gt;cp -i&amp;lt;/code&amp;gt; 和 &amp;lt;code&amp;gt;mv -i&amp;lt;/code&amp;gt; 命令，系统仅在您要复制或移动的文件会覆盖另一个文件时才会提示您。&lt;br /&gt;
&lt;br /&gt;
=== file：检查文件类型 ===&lt;br /&gt;
文件命令可用于确定文件的类型。在类Unix操作系统中，文件名具有较高的灵活性，文件扩展名（如.txt后缀）并非总是必要。因此，如果有人发送给你一个文件，而你希望在打开它之前确认其类型，可以使用文件命令如下：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file name_of_file&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;文本文件的结果将类似于以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
name_of_file: ASCII text&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;假设有人给你发送了一个名为 &#039;&#039;something.something&#039;&#039; 的PNG格式图像文件，而你想确认它确实是PNG格式文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file something.something&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件确实是 PNG 文件，你应该看到类似以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
something.something: PNG image data, 922 x 691, 8-bit/color RGBA, non-interlaced&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== less : 阅读文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;less&amp;lt;/code&amp;gt; 命令是一种用于查看和浏览文本文件的分页器，无需修改文件或在文本编辑器中打开文件。建议您阅读该命令的 man 手册页，因为它具备许多实用功能，例如在文本中搜索关键词或字符串。使用该命令时，请输入要查看的文件名称：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% less orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件中的文字超过了电脑屏幕的显示范围，请按空格键逐页向下滚动。通常情况下，键盘上的 Page Up 和 Page Down 按钮可以正常使用，而方向键则允许您逐行在文件中上下移动。&lt;br /&gt;
&lt;br /&gt;
=== mkdir : 创建目录 ===&lt;br /&gt;
您可以使用 mkdir 命令创建目录。要创建我们在之前示例中使用的备份目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mkdir backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== cd : 更改目录 ===&lt;br /&gt;
cd 命令用于切换目录。如果我们当前位于主目录，想要进入新创建的 &#039;&#039;backups&#039;&#039; 子目录，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;要返回，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;单独输入 &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; 命令将始终带您返回主目录，这在您深入目录树的其他分支时非常有用。如果您只想返回上一级目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd ..&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当然，你也可以直接输入要切换到的目录的完整路径：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd /usr/bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;要切换回上一个工作目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== rmdir：删除目录 ===&lt;br /&gt;
要删除一个空目录，使用 &amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt; 命令。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rmdir backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt; 命令仅在要删除的目录中没有文件时才有效。如果目录中包含文件，而你确定要删除该目录及其所有文件，实际上你需要返回 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt; 命令并输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm -r name_of_directory&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; 是一个命令选项，用于指示 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt; (remove) 命令删除目录及其所有内容（包括子目录），它表示&#039;&#039;递归&#039;&#039;。使用此命令时请务必小心！事实上，更安全的方式是通过以下方式执行此命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm -ir&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将调用删除命令的交互使用方式，系统会提示您对每个可能被删除的文件和目录回答“是”或“否”。再次提醒，请查阅手册页以获取更多详细信息。&lt;br /&gt;
&lt;br /&gt;
=== clear : 清屏 ===&lt;br /&gt;
最后，要清除屏幕，请在命令提示符下输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% clear&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: file_operations.html,v 1.12 2024/07/24 19:49:11 cseiler Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=150</id>
		<title>基本的文件和shell操作</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=150"/>
		<updated>2025-08-20T07:33:16Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在本教程中，我们将简要解释一些基本的文件和 Shell 操作，使用以下命令：&lt;br /&gt;
&lt;br /&gt;
== 命令列表 ==&lt;br /&gt;
&lt;br /&gt;
# touch -- 创建文件&lt;br /&gt;
# pwd -- 打印当前工作目录&lt;br /&gt;
# ls -- 列出当前目录中的文件&lt;br /&gt;
# cp -- 复制文件&lt;br /&gt;
# mv -- 移动文件&lt;br /&gt;
# rm -- 删除文件&lt;br /&gt;
# file -- 检查文件类型&lt;br /&gt;
# less -- 阅读文件&lt;br /&gt;
# mkdir -- 创建目录&lt;br /&gt;
# cd -- 改变目录&lt;br /&gt;
# rmdir -- 删除目录&lt;br /&gt;
# clear -- 清屏&lt;br /&gt;
&lt;br /&gt;
请注意，上述每个命令都有相应的 man 手册页，其中会详细介绍每个命令的全部功能。在本教程中，我们仅提供简要概述，足以在命令行上完成基本操作。如需了解更多关于 man 手册页的信息，请参阅《[[从Shell中寻找帮助]]》教程。&lt;br /&gt;
&lt;br /&gt;
=== 首先，关于以下几点的说明： ===&lt;br /&gt;
&lt;br /&gt;
* 命令选项&lt;br /&gt;
* 文件命名&lt;br /&gt;
&lt;br /&gt;
==== 1. 命令选项 ====&lt;br /&gt;
上述所有命令以及你在终端中发现和使用的许多命令都可以通过使用选项进行修改。请查阅手册页以获取每个命令可用选项的详细信息。选项通常以 ls -l 的形式出现，即你输入命令后，空格一次，输入一个连字符和所需选项的字母。&lt;br /&gt;
&lt;br /&gt;
SDF 服务器的一大特色是，它现在同时提供了带有 BSD 风格选项的命令和带有 GNU 风格选项的命令。例如，ls 命令为用户提供了带有 BSD 风格选项的命令。而以 “g” 开头的 gls 命令则表示带有 GNU 风格选项的 ls 命令。这一点非常值得注意，因为大多数用户对带有 GNU 风格选项的二进制文件更为熟悉。最常用的命令包括：gls --color=always 和 gdiff。&lt;br /&gt;
&lt;br /&gt;
==== 2. 文件命名 ====&lt;br /&gt;
在命名文件或目录时，最好避免在名称中使用空格。例如，文件名“my journal.txt”可能比“my_journal.txt”更难处理。这是因为 shell 会将“my journal.txt”视为两个独立的文件：一个名为“my”，另一个名为“journal.txt”。如果你遇到文件名中包含空格的情况，可以使用以下方法进行处理：&lt;br /&gt;
&lt;br /&gt;
# 在文件名周围使用单引号或双引号：&lt;br /&gt;
#* &amp;lt;code&amp;gt;rm &amp;quot;my file.txt&amp;quot;&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cp &#039;my file.txt&#039; my_file.txt&amp;lt;/code&amp;gt;, 作为例子。&lt;br /&gt;
# 在空格处使用反斜杠：&lt;br /&gt;
#* &amp;lt;code&amp;gt;mv my\ file.txt my_file.txt&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cd backups/text\ pages/&amp;lt;/code&amp;gt;。&lt;br /&gt;
# 使用 Tab 补全功能：许多终端 shell 支持 Tab 补全功能。这意味着，如果你输入文件名的前两个或三个字符并按下 Tab 键，除非你有多个文件名开头相似的文件，否则你的终端 shell 可能会为你自动补全文件名。注意：如果你所在的目录与你要补全的文件所在的目录不同，你需要提供路径，而 Tab 补全功能也可以帮助你完成这一点。&lt;br /&gt;
&lt;br /&gt;
此外，在使用两个或更多单词为文件命名时，最安全的选择是使用下划线、连字符和句点。举例：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my_file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my-file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my.file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
或者，你可以将其作为一个单词：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;myfile.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
使用其他符号（如“&amp;amp;”）可能会引发问题，因为这些符号在某些情况下可能对 shell 具有其他含义。如需更多信息，建议查阅您所选 shell 的手册页（man-pages）。&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
注意：在下面的示例中，百分号用于表示命令提示符，并不需要输入。&lt;br /&gt;
&lt;br /&gt;
=== touch 和 pwd：创建文件并输出工作目录 ===&lt;br /&gt;
要创建一个文件而无需调用文本编辑器或其他程序，只需使用touch即可。例如，要创建一个名为 orange.txt 的文件，在命令提示符下输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% touch orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;没什么大不了的！要查看你创建的文件，你可以列出当前工作目录中的文件和目录。首先，让我们看看我们当前所在的目录。默认情况下，当你通过SSH或Telnet连接到你的shell账户时，你会进入你的主目录。要确认这一点，在命令提示符下你可以输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% pwd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你的用户名是 georgette，你可能会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/udd/g/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;或者如果你在自己家的电脑上，也许你会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/home/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ls : 列出当前目录中的文件 ===&lt;br /&gt;
现在要列出您当前目录中的文件，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你按照教程使用 &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt; 命令创建了 &amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt; 文件，你应该能在 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令的输出结果中看到该文件。接下来，尝试使用 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令并结合以下各种选项，观察每个选项提供的信息类型有何不同：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls -l&lt;br /&gt;
% ls -hl&lt;br /&gt;
% ls -a&lt;br /&gt;
% ls -al&lt;br /&gt;
% ls -ahl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== cp : 复制文件 ===&lt;br /&gt;
复制文件同样非常简单。复制命令具有两个重要功能：一是对目标文件进行简单的备份，二是重命名文件的同时保留原文件。&lt;br /&gt;
&lt;br /&gt;
假设你想将你的&amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt;文件备份到一个名为backups的子目录中（关于如何创建目录，稍后会详细说明）。要实现这一点，你需要输入以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;单词 &#039;&#039;backups&#039;&#039; 末尾的斜杠表示这是一个目录。&lt;br /&gt;
&lt;br /&gt;
要使用 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令更改文件名称而不破坏原文件，您需要输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中 &#039;&#039;papaya.txt&#039;&#039; 是文件的新名称。&lt;br /&gt;
&lt;br /&gt;
要将原始 &amp;quot;orange.txt&amp;quot; 文件复制到备份目录并同时更改名称，您需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== mv : 移动或重命名文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令与 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令的工作原理类似，但有一个关键区别。移动文件意味着会删除原文件名。因此，以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;本质上是用新的 &#039;&#039;papaya.txt&#039;&#039; 文件替换原有的 &#039;&#039;orange.txt&#039;&#039; 文件。&lt;br /&gt;
&lt;br /&gt;
您可以使用 &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令将文件移动到另一个目录，同时保持文件名不变。要执行此操作，请输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将把 &#039;&#039;orange.txt&#039;&#039; 文件移动到 backups 目录。要将文件移动到 backups 目录并重命名，你需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== rm : 删除文件 ===&lt;br /&gt;
删除文件也非常简单。执行此操作的命令是 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;。要彻底删除并销毁一个文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 交互使用简述 ====&lt;br /&gt;
如果不小心使用复制、移动和删除文件的命令，可能会给你带来一些麻烦。对于这些命令，你可以通过输入以下内容来启用交互式选项：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp -i orange.txt backups/orange.txt&lt;br /&gt;
% mv -i orange.txt papaya.txt&lt;br /&gt;
% rm -i orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当调用交互式选项时，系统会提示您对每个要删除的文件回答“是”或“否”。对于 &amp;lt;code&amp;gt;cp -i&amp;lt;/code&amp;gt; 和 &amp;lt;code&amp;gt;mv -i&amp;lt;/code&amp;gt; 命令，系统仅在您要复制或移动的文件会覆盖另一个文件时才会提示您。&lt;br /&gt;
&lt;br /&gt;
=== file：检查文件类型 ===&lt;br /&gt;
文件命令可用于确定文件的类型。在类Unix操作系统中，文件名具有较高的灵活性，文件扩展名（如.txt后缀）并非总是必要。因此，如果有人发送给你一个文件，而你希望在打开它之前确认其类型，可以使用文件命令如下：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file name_of_file&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;文本文件的结果将类似于以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
name_of_file: ASCII text&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;假设有人给你发送了一个名为 &#039;&#039;something.something&#039;&#039; 的PNG格式图像文件，而你想确认它确实是PNG格式文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file something.something&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件确实是 PNG 文件，你应该看到类似以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
something.something: PNG image data, 922 x 691, 8-bit/color RGBA, non-interlaced&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== less : 阅读文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;less&amp;lt;/code&amp;gt; 命令是一种用于查看和浏览文本文件的分页器，无需修改文件或在文本编辑器中打开文件。建议您阅读该命令的 man 手册页，因为它具备许多实用功能，例如在文本中搜索关键词或字符串。使用该命令时，请输入要查看的文件名称：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% less orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件中的文字超过了电脑屏幕的显示范围，请按空格键逐页向下滚动。通常情况下，键盘上的 Page Up 和 Page Down 按钮可以正常使用，而方向键则允许您逐行在文件中上下移动。&lt;br /&gt;
&lt;br /&gt;
=== mkdir : 创建目录 ===&lt;br /&gt;
您可以使用 mkdir 命令创建目录。要创建我们在之前示例中使用的备份目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mkdir backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== cd : 更改目录 ===&lt;br /&gt;
cd 命令用于切换目录。如果我们当前位于主目录，想要进入新创建的 &#039;&#039;backups&#039;&#039; 子目录，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;要返回，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;单独输入 &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; 命令将始终带您返回主目录，这在您深入目录树的其他分支时非常有用。如果您只想返回上一级目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd ..&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当然，你也可以直接输入要切换到的目录的完整路径：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd /usr/bin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;要切换回上一个工作目录，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cd -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== rmdir：删除目录 ===&lt;br /&gt;
要删除一个空目录，使用 &amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt; 命令。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rmdir backups&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;code&amp;gt;rmdir&amp;lt;/code&amp;gt; 命令仅在要删除的目录中没有文件时才有效。如果目录中包含文件，而你确定要删除该目录及其所有文件，实际上你需要返回 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt; 命令并输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm -r name_of_directory&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; 是一个命令选项，用于指示 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt; (remove) 命令删除目录及其所有内容（包括子目录），它表示&#039;&#039;递归&#039;&#039;。使用此命令时请务必小心！事实上，更安全的方式是通过以下方式执行此命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm -ir&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将调用删除命令的交互使用方式，系统会提示您对每个可能被删除的文件和目录回答“是”或“否”。再次提醒，请查阅手册页以获取更多详细信息。&lt;br /&gt;
&lt;br /&gt;
=== clear : 清屏 ===&lt;br /&gt;
最后，要清除屏幕，请在命令提示符下输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% clear&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: file_operations.html,v 1.12 2024/07/24 19:49:11 cseiler Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=149</id>
		<title>基本的文件和shell操作</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=149"/>
		<updated>2025-08-20T07:18:50Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在本教程中，我们将简要解释一些基本的文件和 Shell 操作，使用以下命令：&lt;br /&gt;
&lt;br /&gt;
== 命令列表 ==&lt;br /&gt;
&lt;br /&gt;
# touch -- 创建文件&lt;br /&gt;
# pwd -- 打印当前工作目录&lt;br /&gt;
# ls -- 列出当前目录中的文件&lt;br /&gt;
# cp -- 复制文件&lt;br /&gt;
# mv -- 移动文件&lt;br /&gt;
# rm -- 删除文件&lt;br /&gt;
# file -- 检查文件类型&lt;br /&gt;
# less -- 阅读文件&lt;br /&gt;
# mkdir -- 创建目录&lt;br /&gt;
# cd -- 改变目录&lt;br /&gt;
# rmdir -- 删除目录&lt;br /&gt;
# clear -- 清屏&lt;br /&gt;
&lt;br /&gt;
请注意，上述每个命令都有相应的 man 手册页，其中会详细介绍每个命令的全部功能。在本教程中，我们仅提供简要概述，足以在命令行上完成基本操作。如需了解更多关于 man 手册页的信息，请参阅《[[从Shell中寻找帮助]]》教程。&lt;br /&gt;
&lt;br /&gt;
=== 首先，关于以下几点的说明： ===&lt;br /&gt;
&lt;br /&gt;
* 命令选项&lt;br /&gt;
* 文件命名&lt;br /&gt;
&lt;br /&gt;
==== 1. 命令选项 ====&lt;br /&gt;
上述所有命令以及你在终端中发现和使用的许多命令都可以通过使用选项进行修改。请查阅手册页以获取每个命令可用选项的详细信息。选项通常以 ls -l 的形式出现，即你输入命令后，空格一次，输入一个连字符和所需选项的字母。&lt;br /&gt;
&lt;br /&gt;
SDF 服务器的一大特色是，它现在同时提供了带有 BSD 风格选项的命令和带有 GNU 风格选项的命令。例如，ls 命令为用户提供了带有 BSD 风格选项的命令。而以 “g” 开头的 gls 命令则表示带有 GNU 风格选项的 ls 命令。这一点非常值得注意，因为大多数用户对带有 GNU 风格选项的二进制文件更为熟悉。最常用的命令包括：gls --color=always 和 gdiff。&lt;br /&gt;
&lt;br /&gt;
==== 2. 文件命名 ====&lt;br /&gt;
在命名文件或目录时，最好避免在名称中使用空格。例如，文件名“my journal.txt”可能比“my_journal.txt”更难处理。这是因为 shell 会将“my journal.txt”视为两个独立的文件：一个名为“my”，另一个名为“journal.txt”。如果你遇到文件名中包含空格的情况，可以使用以下方法进行处理：&lt;br /&gt;
&lt;br /&gt;
# 在文件名周围使用单引号或双引号：&lt;br /&gt;
#* &amp;lt;code&amp;gt;rm &amp;quot;my file.txt&amp;quot;&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cp &#039;my file.txt&#039; my_file.txt&amp;lt;/code&amp;gt;, 作为例子。&lt;br /&gt;
# 在空格处使用反斜杠：&lt;br /&gt;
#* &amp;lt;code&amp;gt;mv my\ file.txt my_file.txt&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cd backups/text\ pages/&amp;lt;/code&amp;gt;。&lt;br /&gt;
# 使用 Tab 补全功能：许多终端 shell 支持 Tab 补全功能。这意味着，如果你输入文件名的前两个或三个字符并按下 Tab 键，除非你有多个文件名开头相似的文件，否则你的终端 shell 可能会为你自动补全文件名。注意：如果你所在的目录与你要补全的文件所在的目录不同，你需要提供路径，而 Tab 补全功能也可以帮助你完成这一点。&lt;br /&gt;
&lt;br /&gt;
此外，在使用两个或更多单词为文件命名时，最安全的选择是使用下划线、连字符和句点。举例：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my_file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my-file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my.file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
或者，你可以将其作为一个单词：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;myfile.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
使用其他符号（如“&amp;amp;”）可能会引发问题，因为这些符号在某些情况下可能对 shell 具有其他含义。如需更多信息，建议查阅您所选 shell 的手册页（man-pages）。&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
注意：在下面的示例中，百分号用于表示命令提示符，并不需要输入。&lt;br /&gt;
&lt;br /&gt;
=== touch 和 pwd：创建文件并输出工作目录 ===&lt;br /&gt;
要创建一个文件而无需调用文本编辑器或其他程序，只需使用touch即可。例如，要创建一个名为 orange.txt 的文件，在命令提示符下输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% touch orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;没什么大不了的！要查看你创建的文件，你可以列出当前工作目录中的文件和目录。首先，让我们看看我们当前所在的目录。默认情况下，当你通过SSH或Telnet连接到你的shell账户时，你会进入你的主目录。要确认这一点，在命令提示符下你可以输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% pwd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你的用户名是 georgette，你可能会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/udd/g/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;或者如果你在自己家的电脑上，也许你会看到类似这样：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
/home/georgette&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ls : 列出当前目录中的文件 ===&lt;br /&gt;
现在要列出您当前目录中的文件，请输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果你按照教程使用 &amp;lt;code&amp;gt;touch&amp;lt;/code&amp;gt; 命令创建了 &amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt; 文件，你应该能在 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令的输出结果中看到该文件。接下来，尝试使用 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令并结合以下各种选项，观察每个选项提供的信息类型有何不同：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% ls -l&lt;br /&gt;
% ls -hl&lt;br /&gt;
% ls -a&lt;br /&gt;
% ls -al&lt;br /&gt;
% ls -ahl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== cp : 复制文件 ===&lt;br /&gt;
复制文件同样非常简单。复制命令具有两个重要功能：一是对目标文件进行简单的备份，二是重命名文件的同时保留原文件。&lt;br /&gt;
&lt;br /&gt;
假设你想将你的&amp;lt;code&amp;gt;orange.txt&amp;lt;/code&amp;gt;文件备份到一个名为backups的子目录中（关于如何创建目录，稍后会详细说明）。要实现这一点，你需要输入以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;单词 &#039;&#039;backups&#039;&#039; 末尾的斜杠表示这是一个目录。&lt;br /&gt;
&lt;br /&gt;
要使用 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令更改文件名称而不破坏原文件，您需要输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中 &#039;&#039;papaya.txt&#039;&#039; 是文件的新名称。&lt;br /&gt;
&lt;br /&gt;
要将原始 &amp;quot;orange.txt&amp;quot; 文件复制到备份目录并同时更改名称，您需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== mv : 移动或重命名文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令与 &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; 命令的工作原理类似，但有一个关键区别。移动文件意味着会删除原文件名。因此，以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;本质上是用新的 &#039;&#039;papaya.txt&#039;&#039; 文件替换原有的 &#039;&#039;orange.txt&#039;&#039; 文件。&lt;br /&gt;
&lt;br /&gt;
您可以使用 &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 命令将文件移动到另一个目录，同时保持文件名不变。要执行此操作，请输入以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将把 &#039;&#039;orange.txt&#039;&#039; 文件移动到 backups 目录。要将文件移动到 backups 目录并重命名，你需要输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% mv orange.txt backups/papaya.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== rm : 删除文件 ===&lt;br /&gt;
删除文件也非常简单。执行此操作的命令是 &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;。要彻底删除并销毁一个文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% rm orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 交互使用简述 ====&lt;br /&gt;
如果不小心使用复制、移动和删除文件的命令，可能会给你带来一些麻烦。对于这些命令，你可以通过输入以下内容来启用交互式选项：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% cp -i orange.txt backups/orange.txt&lt;br /&gt;
% mv -i orange.txt papaya.txt&lt;br /&gt;
% rm -i orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当调用交互式选项时，系统会提示您对每个要删除的文件回答“是”或“否”。对于 &amp;lt;code&amp;gt;cp -i&amp;lt;/code&amp;gt; 和 &amp;lt;code&amp;gt;mv -i&amp;lt;/code&amp;gt; 命令，系统仅在您要复制或移动的文件会覆盖另一个文件时才会提示您。&lt;br /&gt;
&lt;br /&gt;
=== file：检查文件类型 ===&lt;br /&gt;
文件命令可用于确定文件的类型。在类Unix操作系统中，文件名具有较高的灵活性，文件扩展名（如.txt后缀）并非总是必要。因此，如果有人发送给你一个文件，而你希望在打开它之前确认其类型，可以使用文件命令如下：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file name_of_file&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;文本文件的结果将类似于以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
name_of_file: ASCII text&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;假设有人给你发送了一个名为 &#039;&#039;something.something&#039;&#039; 的PNG格式图像文件，而你想确认它确实是PNG格式文件，只需输入：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% file something.something&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件确实是 PNG 文件，你应该看到类似以下内容：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
something.something: PNG image data, 922 x 691, 8-bit/color RGBA, non-interlaced&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== less : 阅读文件 ===&lt;br /&gt;
&amp;lt;code&amp;gt;less&amp;lt;/code&amp;gt; 命令是一种用于查看和浏览文本文件的分页器，无需修改文件或在文本编辑器中打开文件。建议您阅读该命令的 man 手册页，因为它具备许多实用功能，例如在文本中搜索关键词或字符串。使用该命令时，请输入要查看的文件名称：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% less orange.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果文件中的文字超过了电脑屏幕的显示范围，请按空格键逐页向下滚动。通常情况下，键盘上的 Page Up 和 Page Down 按钮可以正常使用，而方向键则允许您逐行在文件中上下移动。&lt;br /&gt;
&lt;br /&gt;
=== mkdir : 创建目录 ===&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=148</id>
		<title>基本的文件和shell操作</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=148"/>
		<updated>2025-08-20T06:33:48Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在本教程中，我们将简要解释一些基本的文件和 Shell 操作，使用以下命令：&lt;br /&gt;
&lt;br /&gt;
== 命令列表 ==&lt;br /&gt;
&lt;br /&gt;
# touch -- 创建文件&lt;br /&gt;
# pwd -- 打印当前工作目录&lt;br /&gt;
# ls -- 列出当前目录中的文件&lt;br /&gt;
# cp -- 复制文件&lt;br /&gt;
# mv -- 移动文件&lt;br /&gt;
# rm -- 删除文件&lt;br /&gt;
# file -- 检查文件类型&lt;br /&gt;
# less -- 阅读文件&lt;br /&gt;
# mkdir -- 创建目录&lt;br /&gt;
# cd -- 改变目录&lt;br /&gt;
# rmdir -- 删除目录&lt;br /&gt;
# clear -- 清屏&lt;br /&gt;
&lt;br /&gt;
请注意，上述每个命令都有相应的 man 手册页，其中会详细介绍每个命令的全部功能。在本教程中，我们仅提供简要概述，足以在命令行上完成基本操作。如需了解更多关于 man 手册页的信息，请参阅《[[从Shell中寻找帮助]]》教程。&lt;br /&gt;
&lt;br /&gt;
=== 首先，关于以下几点的说明： ===&lt;br /&gt;
&lt;br /&gt;
* 命令选项&lt;br /&gt;
* 文件命名&lt;br /&gt;
&lt;br /&gt;
==== 1. 命令选项 ====&lt;br /&gt;
上述所有命令以及你在终端中发现和使用的许多命令都可以通过使用选项进行修改。请查阅手册页以获取每个命令可用选项的详细信息。选项通常以 ls -l 的形式出现，即你输入命令后，空格一次，输入一个连字符和所需选项的字母。&lt;br /&gt;
&lt;br /&gt;
SDF 服务器的一大特色是，它现在同时提供了带有 BSD 风格选项的命令和带有 GNU 风格选项的命令。例如，ls 命令为用户提供了带有 BSD 风格选项的命令。而以 “g” 开头的 gls 命令则表示带有 GNU 风格选项的 ls 命令。这一点非常值得注意，因为大多数用户对带有 GNU 风格选项的二进制文件更为熟悉。最常用的命令包括：gls --color=always 和 gdiff。&lt;br /&gt;
&lt;br /&gt;
==== 2. 文件命名 ====&lt;br /&gt;
在命名文件或目录时，最好避免在名称中使用空格。例如，文件名“my journal.txt”可能比“my_journal.txt”更难处理。这是因为 shell 会将“my journal.txt”视为两个独立的文件：一个名为“my”，另一个名为“journal.txt”。如果你遇到文件名中包含空格的情况，可以使用以下方法进行处理：&lt;br /&gt;
&lt;br /&gt;
# 在文件名周围使用单引号或双引号：&lt;br /&gt;
#* &amp;lt;code&amp;gt;rm &amp;quot;my file.txt&amp;quot;&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cp &#039;my file.txt&#039; my_file.txt&amp;lt;/code&amp;gt;, 作为例子。&lt;br /&gt;
# 在空格处使用反斜杠：&lt;br /&gt;
#* &amp;lt;code&amp;gt;mv my\ file.txt my_file.txt&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cd backups/text\ pages/&amp;lt;/code&amp;gt;。&lt;br /&gt;
# 使用 Tab 补全功能：许多终端 shell 支持 Tab 补全功能。这意味着，如果你输入文件名的前两个或三个字符并按下 Tab 键，除非你有多个文件名开头相似的文件，否则你的终端 shell 可能会为你自动补全文件名。注意：如果你所在的目录与你要补全的文件所在的目录不同，你需要提供路径，而 Tab 补全功能也可以帮助你完成这一点。&lt;br /&gt;
&lt;br /&gt;
此外，在使用两个或更多单词为文件命名时，最安全的选择是使用下划线、连字符和句点。举例：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my_file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my-file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my.file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
或者，你可以将其作为一个单词：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;myfile.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
使用其他符号（如“&amp;amp;”）可能会引发问题，因为这些符号在某些情况下可能对 shell 具有其他含义。如需更多信息，建议查阅您所选 shell 的手册页（man-pages）。&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
注意：在下面的示例中，百分号用于表示命令提示符，并不需要输入。&lt;br /&gt;
&lt;br /&gt;
=== touch 和 pwd：创建文件并输出工作目录 ===&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=147</id>
		<title>基本的文件和shell操作</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=147"/>
		<updated>2025-08-20T06:33:18Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在本教程中，我们将简要解释一些基本的文件和 Shell 操作，使用以下命令：&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
&lt;br /&gt;
# touch -- 创建文件&lt;br /&gt;
# pwd -- 打印当前工作目录&lt;br /&gt;
# ls -- 列出当前目录中的文件&lt;br /&gt;
# cp -- 复制文件&lt;br /&gt;
# mv -- 移动文件&lt;br /&gt;
# rm -- 删除文件&lt;br /&gt;
# file -- 检查文件类型&lt;br /&gt;
# less -- 阅读文件&lt;br /&gt;
# mkdir -- 创建目录&lt;br /&gt;
# cd -- 改变目录&lt;br /&gt;
# rmdir -- 删除目录&lt;br /&gt;
# clear -- 清屏&lt;br /&gt;
&lt;br /&gt;
请注意，上述每个命令都有相应的 man 手册页，其中会详细介绍每个命令的全部功能。在本教程中，我们仅提供简要概述，足以在命令行上完成基本操作。如需了解更多关于 man 手册页的信息，请参阅《[[从Shell中寻找帮助]]》教程。&lt;br /&gt;
&lt;br /&gt;
=== 首先，关于以下几点的说明： ===&lt;br /&gt;
&lt;br /&gt;
* 命令选项&lt;br /&gt;
* 文件命名&lt;br /&gt;
&lt;br /&gt;
==== 1. 命令选项 ====&lt;br /&gt;
上述所有命令以及你在终端中发现和使用的许多命令都可以通过使用选项进行修改。请查阅手册页以获取每个命令可用选项的详细信息。选项通常以 ls -l 的形式出现，即你输入命令后，空格一次，输入一个连字符和所需选项的字母。&lt;br /&gt;
&lt;br /&gt;
SDF 服务器的一大特色是，它现在同时提供了带有 BSD 风格选项的命令和带有 GNU 风格选项的命令。例如，ls 命令为用户提供了带有 BSD 风格选项的命令。而以 “g” 开头的 gls 命令则表示带有 GNU 风格选项的 ls 命令。这一点非常值得注意，因为大多数用户对带有 GNU 风格选项的二进制文件更为熟悉。最常用的命令包括：gls --color=always 和 gdiff。&lt;br /&gt;
&lt;br /&gt;
==== 2. 文件命名 ====&lt;br /&gt;
在命名文件或目录时，最好避免在名称中使用空格。例如，文件名“my journal.txt”可能比“my_journal.txt”更难处理。这是因为 shell 会将“my journal.txt”视为两个独立的文件：一个名为“my”，另一个名为“journal.txt”。如果你遇到文件名中包含空格的情况，可以使用以下方法进行处理：&lt;br /&gt;
&lt;br /&gt;
# 在文件名周围使用单引号或双引号：&lt;br /&gt;
#* &amp;lt;code&amp;gt;rm &amp;quot;my file.txt&amp;quot;&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cp &#039;my file.txt&#039; my_file.txt&amp;lt;/code&amp;gt;, 作为例子。&lt;br /&gt;
# 在空格处使用反斜杠：&lt;br /&gt;
#* &amp;lt;code&amp;gt;mv my\ file.txt my_file.txt&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cd backups/text\ pages/&amp;lt;/code&amp;gt;。&lt;br /&gt;
# 使用 Tab 补全功能：许多终端 shell 支持 Tab 补全功能。这意味着，如果你输入文件名的前两个或三个字符并按下 Tab 键，除非你有多个文件名开头相似的文件，否则你的终端 shell 可能会为你自动补全文件名。注意：如果你所在的目录与你要补全的文件所在的目录不同，你需要提供路径，而 Tab 补全功能也可以帮助你完成这一点。&lt;br /&gt;
&lt;br /&gt;
此外，在使用两个或更多单词为文件命名时，最安全的选择是使用下划线、连字符和句点。举例：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my_file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my-file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my.file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
或者，你可以将其作为一个单词：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;myfile.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
使用其他符号（如“&amp;amp;”）可能会引发问题，因为这些符号在某些情况下可能对 shell 具有其他含义。如需更多信息，建议查阅您所选 shell 的手册页（man-pages）。&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
注意：在下面的示例中，百分号用于表示命令提示符，并不需要输入。&lt;br /&gt;
&lt;br /&gt;
=== touch 和 pwd：创建文件并输出工作目录 ===&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=146</id>
		<title>基本的文件和shell操作</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%96%87%E4%BB%B6%E5%92%8Cshell%E6%93%8D%E4%BD%9C&amp;diff=146"/>
		<updated>2025-08-20T06:33:03Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​创建页面，内容为“在本教程中，我们将简要解释一些基本的文件和 Shell 操作，使用以下命令：  == 命令 ==  # touch -- 创建文件 # pwd -- 打印当前工作目录 # ls -- 列出当前目录中的文件 # cp -- 复制文件 # mv -- 移动文件 # rm -- 删除文件 # file -- 检查文件类型 # less -- 阅读文件 # mkdir -- 创建目录 # cd -- 改变目录 # rmdir -- 删除目录 # clear -- 清屏  请注意，上述每个命令都有相应的 man…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在本教程中，我们将简要解释一些基本的文件和 Shell 操作，使用以下命令：&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
&lt;br /&gt;
# touch -- 创建文件&lt;br /&gt;
# pwd -- 打印当前工作目录&lt;br /&gt;
# ls -- 列出当前目录中的文件&lt;br /&gt;
# cp -- 复制文件&lt;br /&gt;
# mv -- 移动文件&lt;br /&gt;
# rm -- 删除文件&lt;br /&gt;
# file -- 检查文件类型&lt;br /&gt;
# less -- 阅读文件&lt;br /&gt;
# mkdir -- 创建目录&lt;br /&gt;
# cd -- 改变目录&lt;br /&gt;
# rmdir -- 删除目录&lt;br /&gt;
# clear -- 清屏&lt;br /&gt;
&lt;br /&gt;
请注意，上述每个命令都有相应的 man 手册页，其中会详细介绍每个命令的全部功能。在本教程中，我们仅提供简要概述，足以在命令行上完成基本操作。如需了解更多关于 man 手册页的信息，请参阅《[[从Shell中寻找帮助]]》教程。&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;首先，关于以下几点的说明：&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
* 命令选项&lt;br /&gt;
* 文件命名&lt;br /&gt;
&lt;br /&gt;
==== 1. 命令选项 ====&lt;br /&gt;
上述所有命令以及你在终端中发现和使用的许多命令都可以通过使用选项进行修改。请查阅手册页以获取每个命令可用选项的详细信息。选项通常以 ls -l 的形式出现，即你输入命令后，空格一次，输入一个连字符和所需选项的字母。&lt;br /&gt;
&lt;br /&gt;
SDF 服务器的一大特色是，它现在同时提供了带有 BSD 风格选项的命令和带有 GNU 风格选项的命令。例如，ls 命令为用户提供了带有 BSD 风格选项的命令。而以 “g” 开头的 gls 命令则表示带有 GNU 风格选项的 ls 命令。这一点非常值得注意，因为大多数用户对带有 GNU 风格选项的二进制文件更为熟悉。最常用的命令包括：gls --color=always 和 gdiff。&lt;br /&gt;
&lt;br /&gt;
==== 2. 文件命名 ====&lt;br /&gt;
在命名文件或目录时，最好避免在名称中使用空格。例如，文件名“my journal.txt”可能比“my_journal.txt”更难处理。这是因为 shell 会将“my journal.txt”视为两个独立的文件：一个名为“my”，另一个名为“journal.txt”。如果你遇到文件名中包含空格的情况，可以使用以下方法进行处理：&lt;br /&gt;
&lt;br /&gt;
# 在文件名周围使用单引号或双引号：&lt;br /&gt;
#* &amp;lt;code&amp;gt;rm &amp;quot;my file.txt&amp;quot;&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cp &#039;my file.txt&#039; my_file.txt&amp;lt;/code&amp;gt;, 作为例子。&lt;br /&gt;
# 在空格处使用反斜杠：&lt;br /&gt;
#* &amp;lt;code&amp;gt;mv my\ file.txt my_file.txt&amp;lt;/code&amp;gt; 或者&lt;br /&gt;
#* &amp;lt;code&amp;gt;cd backups/text\ pages/&amp;lt;/code&amp;gt;。&lt;br /&gt;
# 使用 Tab 补全功能：许多终端 shell 支持 Tab 补全功能。这意味着，如果你输入文件名的前两个或三个字符并按下 Tab 键，除非你有多个文件名开头相似的文件，否则你的终端 shell 可能会为你自动补全文件名。注意：如果你所在的目录与你要补全的文件所在的目录不同，你需要提供路径，而 Tab 补全功能也可以帮助你完成这一点。&lt;br /&gt;
&lt;br /&gt;
此外，在使用两个或更多单词为文件命名时，最安全的选择是使用下划线、连字符和句点。举例：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my_file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my-file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;my.file.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
或者，你可以将其作为一个单词：&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;myfile.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
使用其他符号（如“&amp;amp;”）可能会引发问题，因为这些符号在某些情况下可能对 shell 具有其他含义。如需更多信息，建议查阅您所选 shell 的手册页（man-pages）。&lt;br /&gt;
&lt;br /&gt;
== 命令 ==&lt;br /&gt;
注意：在下面的示例中，百分号用于表示命令提示符，并不需要输入。&lt;br /&gt;
&lt;br /&gt;
=== touch 和 pwd：创建文件并输出工作目录 ===&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=145</id>
		<title>首页</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=145"/>
		<updated>2025-08-20T06:10:31Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;tutorials.sdfcn.org - sdf中文html教程说明&amp;lt;/strong&amp;gt;&lt;br /&gt;
* 基于[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]翻译而来，只是转述[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]的内容，某些内容可能过时，不对其中观点负责。&lt;br /&gt;
* 此教程翻译自传统的[https://sdf.org/?tutorials html教程]，并非新[https://wiki.sdf.org sdf教程维基]，但是今后也会进行翻译。&lt;br /&gt;
&lt;br /&gt;
* 除非另有声明，本网站内容采用[https://creativecommons.org/licenses/by/4.0/ Creative Commons Attribution] (CC BY 4.0) 授权。&lt;br /&gt;
&lt;br /&gt;
* 此教程目前为个人维护项目，如果想加入翻译请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
&lt;br /&gt;
* 若教程内容出现问题（如翻译问题等），也请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
2023.6.19 gao66 on sdf&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF、UNIX和INTERNET教程&#039;&#039;&#039; ==&lt;br /&gt;
&#039;&#039;&#039;SDF成员贡献教程，是为了与INTERNET、UNIX操作系统和编程语言感兴趣的现有和潜在的SDF用户分享知识，并提供帮助。本项目的目的是通过实际且有用的示例，帮助用户充分利用 SDF 和 UNIX 的丰富功能。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;两个教程项目&#039;&#039;&#039; ==&lt;br /&gt;
目前有两个重叠的教程项目：&lt;br /&gt;
&lt;br /&gt;
* 新的[https://wiki.sdf.org SDF教程维基]，可在wiki.sdf.org找到。&amp;lt;ref&amp;gt;中文翻译版本会放在https://wiki.sdf.org，目前还没有。 --译者注&amp;lt;/ref&amp;gt;它包含下面列出的所有（或几乎所有）HTML教程的移植版本，以及新的内容。它还包括搜索功能，以及一个标准化的页面格式。&lt;br /&gt;
*传统的[[#HTML教程]]，即是以下内容。这些教程包含了许多由SDF用户多年来创建和更新的基础和高级教程。&lt;br /&gt;
&lt;br /&gt;
===有兴趣做出贡献吗？===&lt;br /&gt;
&lt;br /&gt;
*向教程维基做贡献：教程维基的建立是为了方便添加和维护教程的内容。要在教程维基上做贡献，你需要为自己建立一个账户。发送电子邮件至 [mailto:membership@sdf.org membership@sdf.org] （mailto link）以获得一个具有写入权限的账户，以便能够在维基上贡献编辑和新内容。 &amp;lt;br /&amp;gt;教程维基页面可以在你的浏览器中直接编辑，如果你担心把事情搞乱，它有内置的预览和版本控制。如果你有任何使用维基的经验，这对你来说很容易。更多细节作为Dokuwiki页面链接到了维基本身上，包括：&lt;br /&gt;
**[https://www.dokuwiki.org/wiki:syntax 维基语法]&lt;br /&gt;
**[https://www.dokuwiki.org/manual 维基用户手册]&lt;br /&gt;
*向HTML教程做贡献：传统的HTML教程项目包括本页面和下面链接的所有教程页面。为了能够对HTML教程做出贡献，请阅读[[SDF HTML教程编辑指南|HTML教程编辑指南]]，该指南也在[https://wiki.sdf.org/doku.php?id=sdf_tutorial_editing_guide 此处]的维基页面提供&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF教程维基&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki.sdfcn.org/ SDF教程维基]&amp;lt;ref&amp;gt; 目前还不存在，今后会进行翻译  --译者注 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;&amp;lt;span id=&amp;quot;HTML教程&amp;quot;&amp;gt;HTML教程：目录&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[[#SDF基础知识]]&lt;br /&gt;
#[[#电子邮件]]&lt;br /&gt;
#[[#网站设置和托管功能]]&lt;br /&gt;
#[[#高级专题]]&lt;br /&gt;
#[[#SDF的互联网聊天中继（IRC）]]&lt;br /&gt;
#[[#SDF VoIP电话服务]]&lt;br /&gt;
#[[#SDF 拨号（Dialup）和DSL互联网服务]]（适用于Dialup和DSL成员）&lt;br /&gt;
#[[#SDF电台！/ ANONRADIO服务]]&lt;br /&gt;
#[[#SDF VPS服务]]（适用于metaArpa成员）&lt;br /&gt;
#[[#Cheat Sheets (文本编辑器）]]&lt;br /&gt;
#[[#Dotfile（配置文件）资料库]]&lt;br /&gt;
#[[#twenex.org - SDF公共访问 TWENEX 操作系统]]&lt;br /&gt;
#[[#在线隐私]]&lt;br /&gt;
#[[#复古计算]]&lt;br /&gt;
#[[#贝尔实验室的Plan 9项目]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF基础知识&amp;quot;&amp;gt;1. SDF基础知识===&lt;br /&gt;
&lt;br /&gt;
*[[从Shell中寻找帮助|寻找帮助]] - 如何在shell中取得帮助&lt;br /&gt;
*[[COM不是IRC]]（互联网聊天中继）- 聊天程序 &amp;quot;COM&amp;quot; 的介绍&lt;br /&gt;
*[[bboard]] - 对论坛 &amp;quot;bboard&amp;quot; 的介绍&lt;br /&gt;
*[[SDF 多用户环境中的个人责任|多用户系统的责任]] - 关于SDF多用户环境下用户责任的声明&lt;br /&gt;
*[[SDF SSH 主机密钥|主机密钥]] - SDF的SSH主机密钥的列表&lt;br /&gt;
*[[SDF 中的即时信息|即时通讯]] - 如何在SDF上使用即时通讯服务&lt;br /&gt;
*[[文件传输教程|文件传输]] - 如何将文件移入或移出SDF&lt;br /&gt;
*[[UNIX® Shell之间的最终差异]] - 比较shell的差异/相似性&lt;br /&gt;
*[[权限|文件权限]] - 更改文件权限&lt;br /&gt;
*[[基本的文件和shell操作]] - 使用一些命令操作文件和目录&lt;br /&gt;
*ASCII游戏 - 只工作不玩乐只会使你自己成为一个无趣的SDFer&lt;br /&gt;
*如何捐赠及原因 - 解释你的朋友和你的家人（或你）应该如何以及为什么要帮助资助SDF的一个页面。&lt;br /&gt;
*传播关于SDF的信息&lt;br /&gt;
*为盲人用户的SDF&lt;br /&gt;
*使用微软Windows™ 的 telnet&lt;br /&gt;
*SDF上的按类别排序的软件&lt;br /&gt;
*SDF特有命令 - SDF特有的命令、脚本和程序的列表。&lt;br /&gt;
*Jabber IM服务器 - 使用SDF Jabber XMPP即时通讯服务器&lt;br /&gt;
*SDF上的游戏服务器 - 在SDF上运行的多人游戏服务器列表&lt;br /&gt;
*Tiny Tiny RSS - 在SDF中托管的RSS阅读器&lt;br /&gt;
*MetaArray（元数组） - 存储以及为MetaArpa成员提供的一些服务&lt;br /&gt;
*GNU 社区 - SDF的微博&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;电子邮件&amp;quot;&amp;gt;2. 电子邮件 ===&lt;br /&gt;
&lt;br /&gt;
* 为初学者提供的电子邮件教程&lt;br /&gt;
* 电子邮件基础知识&lt;br /&gt;
* 电子邮件的黑名单问题 - 别人收到你的SDF邮件的问题&lt;br /&gt;
* SDF灰名单 - 减少垃圾邮件的系统政策&lt;br /&gt;
* Mutt邮件的用户代理（User Agent）&lt;br /&gt;
* 高级电子邮件主题 - 转发信息，打击垃圾邮件&lt;br /&gt;
* 设置一段假期 - 发送自动邮件回复&lt;br /&gt;
* POP3、IMAP和SMTP 验证 - 在流行的邮件客户端设置POP3、IMAP和SMTP认证&lt;br /&gt;
* SDF上的Procmail（邮件过滤工具）- 一般的配置说明&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;网站设置和托管功能&amp;quot;&amp;gt;3. 网站设置和托管功能 ===&lt;br /&gt;
&lt;br /&gt;
* 网站 - 在SDF上建立一个网站&lt;br /&gt;
* 为网站建设者提供的资源&lt;br /&gt;
* 自定义错误页面 - 使用.htaccess创建自定义错误页面&lt;br /&gt;
* SDF上的Ruby on Rails&lt;br /&gt;
** Ruby on Rails - SDF上的Ruby on Rails&lt;br /&gt;
** 构建一个基本的Ruby on Rails应用程序&lt;br /&gt;
* SDF上的Trac - 设置和使用Trac实例&lt;br /&gt;
* Gopher - 构建你自己的Gopher空间&lt;br /&gt;
* 用Jekyll写博客&lt;br /&gt;
* Htaccess - Apache HTTP服务器的有用的.htaccess技巧和窍门&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;高级专题&amp;quot;&amp;gt;4. 高级专题 ===&lt;br /&gt;
&lt;br /&gt;
* 编程语言、代码开发和编译器 - 在SDF编写你自己的代码&lt;br /&gt;
*使用skey - 通过不安全的协议安全地登录&lt;br /&gt;
*Emacs教程 - Emacs基础知识，使用Emacs作为工作环境&lt;br /&gt;
*SSH - 使用SDF时，通过SSH保证安全和路由客户端应用程序&lt;br /&gt;
*SSHFS - 使用SSHFS在linux本地机器上挂载SDF文件夹&lt;br /&gt;
*EncFS - 使用EncFS来管理加密的文件夹&lt;br /&gt;
*PSSHFS - 在NetBSD本地机器上挂载SDF文件夹&lt;br /&gt;
*VPN - 连接到SDF VPN（PPTP和OpenVPN）&lt;br /&gt;
*rsync - 使用rsync备份$HOME&lt;br /&gt;
*CVS - 在SDF上使用CVS&lt;br /&gt;
*GCI - SDF绿色计算倡议（Green Computing Initiative）&lt;br /&gt;
*MDNS（动态dns）- 自动MDNS示例(MetaARPA)&lt;br /&gt;
*SDF上的RubyGems - 设置 &amp;quot;gem&amp;quot; 命令&lt;br /&gt;
*scmgit - GIT源代码控制管理介绍&lt;br /&gt;
*SDFARC中继列表 - SDF业余无线电俱乐部（SDF Amateur Radio Club）使用的中继器列表&lt;br /&gt;
*toobnix.org - SDF的用户视频库&lt;br /&gt;
*X11转发 - 设置和运行X11应用程序（MetaARPA）&lt;br /&gt;
*$HOME/bin - 用户在SDF的多架构环境中编译的程序（ARPA）&lt;br /&gt;
*Screen - 复用你的终端（MetaARPA）&lt;br /&gt;
*Tmux - Screen的替代方案（MetaARPA）&lt;br /&gt;
*Minecraft - SDF自己的*私人*Minecraft（我的世界）服务器&lt;br /&gt;
*Chicken - Scheme编程语言的一种实现&lt;br /&gt;
*ECL - 可嵌入的通用编程语言&lt;br /&gt;
*移动应用 - 移动设备的应用&lt;br /&gt;
*端口分配 - MetaARPA成员的端口分配和使用信息&lt;br /&gt;
*UUCP（Unix-to-Unix Copy） - 通过轮询SDF获得UUCP新闻组新闻（USENET News）和网络邮件&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF的互联网聊天中继（IRC）&amp;quot;&amp;gt;5. SDF的互联网中继聊天（IRC） ===&lt;br /&gt;
&lt;br /&gt;
* SDF IRC可接受使用政策&lt;br /&gt;
* SDF IRC 频道&lt;br /&gt;
* 用Irssi自动连接IRC频道&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VoIP电话服务&amp;quot;&amp;gt;6. SDF VoIP电话服务 ===&lt;br /&gt;
&lt;br /&gt;
* 基本设置&lt;br /&gt;
* 扩展目录&lt;br /&gt;
* 高级功能和设置&lt;br /&gt;
* 配置FreePBX&lt;br /&gt;
* 配置思科（Cisco）7940G电话&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF 拨号（Dialup）和DSL互联网服务&amp;quot;&amp;gt;7. SDF 拨号（Dialup）和DSL互联网服务（适用于Dialup和DSL成员） ===&lt;br /&gt;
&lt;br /&gt;
* SDF 拨号 - 介绍和初始账户配置&lt;br /&gt;
** 设备升级 - SDF拨号所需的设备和服务&lt;br /&gt;
** 设置 - WinXP - 在Windows XP上配置拨号&lt;br /&gt;
** 设置 - Lucid - 在Ubuntu Linux上配置拨号&lt;br /&gt;
* SDF SDL - 配置和使用SDF DSL&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF电台！/ ANONRADIO服务&amp;quot;&amp;gt;8. SDF电台！/ ANONRADIO服务 ===&lt;br /&gt;
&lt;br /&gt;
* 如何收听ANONRADIO&lt;br /&gt;
* 如何在ANONRADIO上成为DJ&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VPS服务&amp;quot;&amp;gt;9. SDF VPS服务（适用于MetaARPA成员） ===&lt;br /&gt;
&lt;br /&gt;
* NetBSD的设置和配置&lt;br /&gt;
* 安装一个OpenLDAP服务器&lt;br /&gt;
* Debian的设置和配置&lt;br /&gt;
* Ubuntu的设置和配置（WIP）&lt;br /&gt;
* Plan9的设置和配置&lt;br /&gt;
* CentOS的设置和配置&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Cheat Sheets (文本编辑器）&amp;quot;&amp;gt;10. 小贴士  ===&lt;br /&gt;
&lt;br /&gt;
* 适用于Vi、awk、sed等的小贴士&lt;br /&gt;
* Emacs小贴士&lt;br /&gt;
* ed小贴士&lt;br /&gt;
* Pico小贴士&lt;br /&gt;
* 生存下来的TECO&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;Dotfile（配置文件）资料库&amp;quot;&amp;gt;11. Dotfile（配置文件）资料库 ===&lt;br /&gt;
&lt;br /&gt;
* 浏览含有注解的Dotfiles - 寻找工作示例，帮助你配置你最喜欢的程序。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;twenex.org - SDF公共访问 TWENEX 操作系统&amp;quot;&amp;gt;12. twenex.org - SDF公共访问 TWENEX 操作系统 ===&lt;br /&gt;
&lt;br /&gt;
* TOPS-20互动教程 - twenex.org的互动教程（@TOPS20）的日志和摘要&lt;br /&gt;
* 进入TWENEX - 为中级用户提供的twenex.org系统之旅&lt;br /&gt;
* 在TWENEX上使用多个互动程序 - 关于如何在同一登录中使用多个程序的教程&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;在线隐私&amp;quot;&amp;gt;13. 在线隐私 ===&lt;br /&gt;
&lt;br /&gt;
* 隐私保护&lt;br /&gt;
* SDF的隐私政策&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;复古计算&amp;quot;&amp;gt;14. 复古计算 ===&lt;br /&gt;
&lt;br /&gt;
* 歇斯底里的Unix指南 - 庆祝UNIX操作系统50周年&lt;br /&gt;
* CDC 6500生存指南&lt;br /&gt;
* 基本程序&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;贝尔实验室的Plan 9项目&amp;quot;&amp;gt;15. 贝尔实验室的Plan 9项目 ===&lt;br /&gt;
&#039;&#039;&#039;贝尔实验室的Plan 9&#039;&#039;&#039;是一个研究性的操作系统，被设计为超越Unix的操作系统进化的下一步。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDF&#039;&#039;&#039;赞助了一系列的训练营来介绍新用户使用&#039;&#039;&#039;Plan 9&#039;&#039;&#039;。本节教程收集了营员们的发现。&lt;br /&gt;
&lt;br /&gt;
* 为SDF VPS基本单位进行Plan9设置和配置&lt;br /&gt;
* Plan 9 C语言编程&lt;br /&gt;
* Plan 9 Rc 生存指南&lt;br /&gt;
* (在此添加你的Plan 9教程的链接)&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&amp;lt;small&amp;gt;&#039;&#039;$Id: index.html,v 1.195 2025/03/05 00:30:45 peteyboy Exp $&#039;&#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=144</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=144"/>
		<updated>2025-08-20T06:09:04Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 导言 ==&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
== 权限 ==&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
== 权限类型 ==&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
=== 用户类别 ===&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 举例说明 ===&lt;br /&gt;
&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;br /&gt;
&lt;br /&gt;
目录&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户&amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt;可以在&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;目录中列出、添加和删除文件，访问该目录的子目录结构，或将该目录设为工作目录。属于&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt;组的用户及其他所有用户可以列出该目录中的文件，访问其子目录结构或将该目录设为工作目录，但无法添加或删除文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt; 文件的内容，或从命令行执行该文件（文件内容为可能为可执行二进制文件或脚本）。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组的用户可以查看或执行该文件，但无法修改它。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt; 文件的内容。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组中的用户可以查看该文件。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
=== 链接和权限 ===&lt;br /&gt;
一般来说，上述讨论也适用于硬链接和符号链接。文件系统会自动维护链接，以确保链接与目标文件具有相同的有效权限。（对于符号链接，&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令会显示一个文件模式，其中所有用户类别的权限类型均已分配，但当通过链接请求文件访问时，将应用目标文件的权限。）&lt;br /&gt;
&lt;br /&gt;
然而，在某些配置下，硬链接可以绕过目录 &#039;&#039;&#039;x&#039;&#039;&#039; 的权限限制。假设用户对文件 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt; 具有访问权限，而该文件在目录 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的子树之外有一个硬链接 &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt;。如果用户失去了对 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的 &#039;&#039;&#039;x&#039;&#039;&#039; 权限，他将无法访问 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt;，&#039;&#039;但仍可通过硬链接&#039;&#039; &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt; &#039;&#039;使用其原始权限访问同一文件&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
== 更改权限… ==&lt;br /&gt;
&lt;br /&gt;
权限通过命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 更改：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod &amp;lt;permission-mode&amp;gt; &amp;lt;file-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;让我们来看这个例子，&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这个数字644代表什么？&lt;br /&gt;
&lt;br /&gt;
== …解释了 ==&lt;br /&gt;
权限模式是九个文件模式权限标志的数字表示形式。如前所述，存在三种权限类型和三种用户类别。每个数字代表分配给特定用户类别的权限类型。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&lt;br /&gt;
!用户类别：&lt;br /&gt;
!u&lt;br /&gt;
!g&lt;br /&gt;
!o&lt;br /&gt;
|-&lt;br /&gt;
!权限代码：&lt;br /&gt;
|6&lt;br /&gt;
|4&lt;br /&gt;
|4&lt;br /&gt;
|}&lt;br /&gt;
每个用户类别的最终权限代码，是通过将该类别被授予的权限类型对应数值相加得出的：读权限（&#039;&#039;&#039;r&#039;&#039;&#039;）对应4，写权限（&#039;&#039;&#039;w&#039;&#039;&#039;）对应2，执行权限（&#039;&#039;&#039;x&#039;&#039;&#039;）对应1。&lt;br /&gt;
&lt;br /&gt;
在上述示例中，我希望文件 &amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt; 对所有用户可读，但仅对我可写。因此权限代码应如下所示：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!用户类别&lt;br /&gt;
!权限类型&lt;br /&gt;
!权限代码&lt;br /&gt;
|-&lt;br /&gt;
!u (我自己)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4), &#039;&#039;&#039;w&#039;&#039;&#039; (2)&lt;br /&gt;
|4 + 2 = &#039;&#039;&#039;6&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!g (组)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!o (其他)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
因此：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;即可！&lt;br /&gt;
&lt;br /&gt;
== …另一种方式 ==&lt;br /&gt;
&amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 支持一种用于指定权限模式的替代语法，这种语法在一次更改一个或几个权限时更加方便，且比上文提到的数字模式编码稍易记忆。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;user-classes  用户类别&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
        需要更改权限的用户类别。使用单字母类别符号 &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; 或使用 &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; 指定所有类别。可以指定多个类别。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;operation  操作&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: 以下之一：&lt;br /&gt;
:; &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;&lt;br /&gt;
:: 为用户类别添加权限类型。&lt;br /&gt;
:; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
:: 从用户类别中移除权限类型。&lt;br /&gt;
:; &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&lt;br /&gt;
:: 为用户类别设置权限类型。&lt;br /&gt;
&#039;&#039;permission-types  权限类型&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:要设置或删除的权限类型。使用单字符类型符号 &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; 或 &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;。可以指定多种类型。&lt;br /&gt;
因此，命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod u=rw,go=r index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;将产生与示例命令相同的效果：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;如果我想稍后给文件的用户组的成员授予 &#039;&#039;&#039;w&#039;&#039;&#039; 权限，我可以使用命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod g+w index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 文件标志 ==&lt;br /&gt;
除了我们已经讨论过的文件权限外，我们还有文件标志。文件标志为文件提供了额外的安全性和控制，但不适用于目录。文件标志可通过 chflags(1) 工具进行修改。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% chflags uunlnk foo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;将用于设置用户的撤销删除标志，要禁用该标志，只需在选项前面添加“no”（在此示例中为uunlnk），如下所示：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chflags nouunlnk foo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: permissions.html,v 1.8 2007/10/02 11:22:28 papa Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=143</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=143"/>
		<updated>2025-08-20T06:00:06Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 导言 ==&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
== 权限 ==&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
== 权限类型 ==&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
=== 用户类别 ===&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 举例说明 ===&lt;br /&gt;
&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;br /&gt;
&lt;br /&gt;
目录&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户&amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt;可以在&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;目录中列出、添加和删除文件，访问该目录的子目录结构，或将该目录设为工作目录。属于&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt;组的用户及其他所有用户可以列出该目录中的文件，访问其子目录结构或将该目录设为工作目录，但无法添加或删除文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt; 文件的内容，或从命令行执行该文件（文件内容为可能为可执行二进制文件或脚本）。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组的用户可以查看或执行该文件，但无法修改它。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt; 文件的内容。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组中的用户可以查看该文件。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
=== 链接和权限 ===&lt;br /&gt;
一般来说，上述讨论也适用于硬链接和符号链接。文件系统会自动维护链接，以确保链接与目标文件具有相同的有效权限。（对于符号链接，&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令会显示一个文件模式，其中所有用户类别的权限类型均已分配，但当通过链接请求文件访问时，将应用目标文件的权限。）&lt;br /&gt;
&lt;br /&gt;
然而，在某些配置下，硬链接可以绕过目录 &#039;&#039;&#039;x&#039;&#039;&#039; 的权限限制。假设用户对文件 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt; 具有访问权限，而该文件在目录 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的子树之外有一个硬链接 &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt;。如果用户失去了对 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的 &#039;&#039;&#039;x&#039;&#039;&#039; 权限，他将无法访问 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt;，&#039;&#039;但仍可通过硬链接&#039;&#039; &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt; &#039;&#039;使用其原始权限访问同一文件&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
== 更改权限… ==&lt;br /&gt;
&lt;br /&gt;
权限通过命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 更改：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod &amp;lt;permission-mode&amp;gt; &amp;lt;file-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;让我们来看这个例子，&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这个数字644代表什么？&lt;br /&gt;
&lt;br /&gt;
== …解释了 ==&lt;br /&gt;
权限模式是九个文件模式权限标志的数字表示形式。如前所述，存在三种权限类型和三种用户类别。每个数字代表分配给特定用户类别的权限类型。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&lt;br /&gt;
!用户类别：&lt;br /&gt;
!u&lt;br /&gt;
!g&lt;br /&gt;
!o&lt;br /&gt;
|-&lt;br /&gt;
!权限代码：&lt;br /&gt;
|6&lt;br /&gt;
|4&lt;br /&gt;
|4&lt;br /&gt;
|}&lt;br /&gt;
每个用户类别的最终权限代码，是通过将该类别被授予的权限类型对应数值相加得出的：读权限（&#039;&#039;&#039;r&#039;&#039;&#039;）对应4，写权限（&#039;&#039;&#039;w&#039;&#039;&#039;）对应2，执行权限（&#039;&#039;&#039;x&#039;&#039;&#039;）对应1。&lt;br /&gt;
&lt;br /&gt;
在上述示例中，我希望文件 &amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt; 对所有用户可读，但仅对我可写。因此权限代码应如下所示：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!用户类别&lt;br /&gt;
!权限类型&lt;br /&gt;
!权限代码&lt;br /&gt;
|-&lt;br /&gt;
!u (我自己)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4), &#039;&#039;&#039;w&#039;&#039;&#039; (2)&lt;br /&gt;
|4 + 2 = &#039;&#039;&#039;6&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!g (组)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!o (其他)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
因此：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;即可！&lt;br /&gt;
&lt;br /&gt;
== …另一种方式 ==&lt;br /&gt;
&amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 支持一种用于指定权限模式的替代语法，这种语法在一次更改一个或几个权限时更加方便，且比上文提到的数字模式编码稍易记忆。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;user-classes  用户类别&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
需要更改权限的用户类别。使用单字母类别符号 &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; 或使用 &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; 指定所有类别。可以指定多个类别。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;operation  操作&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=SDF_HTML%E6%95%99%E7%A8%8B%E7%BC%96%E8%BE%91%E6%8C%87%E5%8D%97&amp;diff=142</id>
		<title>SDF HTML教程编辑指南</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=SDF_HTML%E6%95%99%E7%A8%8B%E7%BC%96%E8%BE%91%E6%8C%87%E5%8D%97&amp;diff=142"/>
		<updated>2025-08-20T05:57:05Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;下面的说明是关于创建和编辑基于HTML的用户贡献的教程。要为SDF wiki 教程贡献，请看SDF wiki 教程。&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 目录 ==&lt;br /&gt;
* [[#简介]]&lt;br /&gt;
* [[#创建和编辑HTML教程]]&lt;br /&gt;
** [[#创建一个新的教程]]&lt;br /&gt;
** [[#编辑一个现有的教程]]&lt;br /&gt;
** [[#编辑FAQ]]&lt;br /&gt;
* [[#（用html）编辑一个教程]]&lt;br /&gt;
** [[#在你开始写代码之前！]]&lt;br /&gt;
*** [[#使用图像]]&lt;br /&gt;
*** [[#引用参考文献]]&lt;br /&gt;
*** [[#哪个HTML版本？]]&lt;br /&gt;
** [[#代码风格]]&lt;br /&gt;
** [[#教程模板]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;简介&amp;quot;&amp;gt;简介  ==&lt;br /&gt;
&amp;lt;blockquote&amp;gt;每天都有许多年轻的、非常容易受影响的人发现SDF。他们问我们一些我们可能觉得很愚蠢的问题，但这并不是他们的错。他们在成长过程中只知道黑客会破坏计算机网络，利用人们和他们的信息。解决方案不是嘲笑或回避这些孩子，而是告诉他们有一个更好、更真实的方法。&lt;br /&gt;
&lt;br /&gt;
-- 摘自README.TXT&amp;lt;/blockquote&amp;gt;本指南的编写是为了帮助成员更容易地为SDF HTML教程项目做出贡献。指南的[[#第一部分]]简要说明了如何使用RCS&amp;lt;ref&amp;gt;Revision Control System&amp;lt;/ref&amp;gt;进行版本控制来创建或编辑教程文件。指南的[[#第二部分]]讨论了针对教程的HTML代码，并包含一些模板代码。&lt;br /&gt;
&lt;br /&gt;
你最好阅读一下教程文件目录（&amp;lt;code&amp;gt;/sys/html/tutorials&amp;lt;/code&amp;gt;）中SDF HTML教程项目的原始&amp;lt;code&amp;gt;README.TXT&amp;lt;/code&amp;gt;。它不仅表达了项目的目的，而且还包含了比这里更详细的RCS使用信息。&lt;br /&gt;
&lt;br /&gt;
本指南假定读者具有基本的shell使用和文本文件编辑知识。熟悉HTML是不必要的，尽管它可能会有帮助。&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;第一部分&amp;quot;&amp;gt;创建和编辑教程  ==&lt;br /&gt;
要创建或编辑一个教程，请将你的工作目录改为/sys/html/tutorials，在你的SDF主集群（例如sdf.org，而不是MetaArray）的shell中：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /sys/html/tutorials&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;创建一个新的教程&amp;quot;&amp;gt;创建一个新的教程  ===&lt;br /&gt;
&lt;br /&gt;
在教程目录内，你可以使用echo来快速创建一个空的HTML文件，同时在底部有一个RCS Id标签。首先使用umask命令，以确保新文件的权限允许网络服务器（和其他用户）读取它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ umask 022&lt;br /&gt;
$ echo -e &amp;quot;\n\$Id\$&amp;quot; &amp;gt; your_tutorial_filename.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;使用命令&amp;lt;code&amp;gt;ci -u&amp;lt;/code&amp;gt;将该文件用RCS签入，并将其解锁，以便任何人都可以编辑它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ci -u your_tutorial_filename.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;在你第一次签入一个文件时，你会被要求对其进行描述。请写一些有用的东西。&lt;br /&gt;
&lt;br /&gt;
现在你可以使用[[#下一节]]的说明编辑你的教程，以检查文件是否进入和离开RCS。&lt;br /&gt;
&lt;br /&gt;
一旦你的教程准备好公开展示，请将其添加到可用的教程列表中，以便人们能够在网上真正找到它。你必须编辑教程目录中的&amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt;文件来完成这项工作。编辑&amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt;文件时，请使用与编辑教程时相同的签入/签出程序。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;下一节&amp;quot;&amp;gt;编辑一个现有的教程  ===&lt;br /&gt;
&lt;br /&gt;
在tutorials目录下，使用&amp;lt;code&amp;gt;co -l&amp;lt;/code&amp;gt;命令用RCS检查文件，并在你进行编辑时锁定它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ co -l filename&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;&amp;lt;u&amp;gt;如果在使用&amp;lt;code&amp;gt;co -l&amp;lt;/code&amp;gt;时，你被告知该文件已经被锁定，请停止你正在做的事情，并等待它被重新签入。如果它没有被签入，请给作者发邮件，让他们知道你想签出该文件并编辑它。&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
现在你可以使用你喜欢的文本编辑器编辑该文件。如果你定期保存你的工作，你可以在你的网络浏览器中加载和重新加载教程以查看你的变化。教程文件的URL将是&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://sdf.org/?tutorials/filename_without_extension&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;（例如，如果你正在编辑&amp;lt;code&amp;gt;/sys/html/tutorials/nmap_for_dummies.html&amp;lt;/code&amp;gt;，URL将是&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://sdf.org/?tutorials/nmap_for_dummies&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;）。&lt;br /&gt;
&lt;br /&gt;
当你完成了对文件的编辑，使用命令&amp;lt;code&amp;gt;ci -u&amp;lt;/code&amp;gt;将该文件用RCS签入，并解锁，以便其他人可以编辑它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ci -u filename&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当你签入一个文件时，你会被要求描述你对它所做的修改。随你怎么说，但请写一些有用的东西。&lt;br /&gt;
&lt;br /&gt;
==== 签入之前撤销编辑 ====&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;如果在编辑完一个文件后，你希望不签入你的修改，恢复到没有你的修改的版本&amp;lt;/u&amp;gt;&#039;&#039;&#039;，只需运行一个带有解锁的签出，类似于你之前的签出方式：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ co -u filename&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;你可能会收到一个警告，询问你是否要删除文件的写入权限---你*需要*，因此输入*yes*。这将把以前版本的文件重新加载到当前文件夹中，并解锁，以便其他人可以再次进行修改。如果你想再试一次，请使用与上述相同的步骤。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;编辑FAQ&amp;quot;&amp;gt;编辑FAQ  ===&lt;br /&gt;
MetaARPA会员也可以编辑[https://sdf.org/?faq FAQ]。这些是纯文本文件，能在&amp;lt;code&amp;gt;/sys/html/tutorials/FAQ/&amp;lt;/code&amp;gt;中找到。每个部分的FAQ列表都在一个点文件&amp;quot;&amp;lt;code&amp;gt;.list&amp;lt;/code&amp;gt;&amp;quot;中。这些FAQ文件与&amp;lt;code&amp;gt;faq&amp;lt;/code&amp;gt;命令所显示的文件定期同步。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;第二部分&amp;quot;&amp;gt;（用html）编辑一个教程  ==&lt;br /&gt;
教程是用HTML编码的。如果你对HTML已经驾轻就熟，那么你离编辑你的教程就只有一步之遥了!请阅读 &amp;quot;[[#在你开始写代码之前！]]&amp;quot;部分，了解一些实施的具体细节，并在继续前至少略过[[#代码风格]]部分。&lt;br /&gt;
&lt;br /&gt;
如果你&#039;&#039;&#039;不&#039;&#039;&#039;熟悉HTML，W3C&amp;lt;ref&amp;gt;World Wide Web Consortium&amp;lt;/ref&amp;gt;网站有一个非常简短的教程，即《[http://www.w3.org/MarkUp/Guide/ HTML入门]》，它将教会你足够多的基础知识，以便能够编写一个教程。此外，本页面的[[#模板]]还提供了大量的评论，以帮助HTML初学者。&lt;br /&gt;
&lt;br /&gt;
如果您没有时间或意愿学习HTML，您仍然可以为教程项目做出贡献。用纯文本编写教程（或者是一份章节、一处更正、附录等），并在 &amp;lt;code&amp;gt;bboard:&amp;lt;TUTORIALS&amp;gt;&amp;lt;/code&amp;gt; 中添加注释。您的 MetaARPA 同事可能会自愿为您将作品 HTML 化。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;在你开始写代码之前！&amp;quot;&amp;gt;在您开始写代码之前！  ===&lt;br /&gt;
SDF 教程文件包含 HTML 代码，&#039;&#039;&#039;&#039;&#039;但不是完整的 HTML 文档&#039;&#039;&#039;&#039;&#039;。当它们被提供给 Web 浏览器时，网站的 index.cgi 会将它们封装在全站导航的页眉和页脚中。教程文件中的代码代表 &amp;lt;body&amp;gt; 元素内的内容，并且&#039;&#039;&#039;&#039;&#039;确保不得包含以下元素/标记&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;html&amp;gt;, &amp;lt;/html&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;, &amp;lt;/head&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;meta&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;base&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;body&amp;gt;, &amp;lt;/body&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
教程文件也将包含一个RCS &#039;&#039;&#039;$Id&#039;&#039;&#039;标签，它看起来像这样：&amp;lt;code&amp;gt;$Id:filename.html,v 1.11 2011/01/01 11:11:11 username Exp $&amp;lt;/code&amp;gt;。无需编辑，因为它是由RCS自动生成的。最好将其作为文件的最后一行。&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span id=&amp;quot;使用图像&amp;quot;&amp;gt;使用图像  ====&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;请勿从其他网站热链图片。&#039;&#039;&#039;&#039;&#039;在&amp;lt;code&amp;gt;/sys/html/tutorials/images&amp;lt;/code&amp;gt;中放置您希望使用的任何图像文件的副本。并确保它们的权限允许Web服务器读取它们（&amp;lt;code&amp;gt;chmod a+r&amp;lt;/code&amp;gt;可以做到这一点）。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;始终&#039;&#039;&#039;&#039;&#039;在&amp;lt;img&amp;gt;标签的alt属性中为基于文本的浏览器用户和视障人士&#039;&#039;&#039;&#039;&#039;提供图片说明&#039;&#039;&#039;&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
错误：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;tutorials/images/example.png&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
正确：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;http://sdf.org/tutorials/images/example.png&amp;quot; &lt;br /&gt;
     alt=&amp;quot;Image of a Blickensderfer No. 5 typewriter&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span id=&amp;quot;引用参考文献&amp;quot;&amp;gt;引用参考文献  ====&lt;br /&gt;
如果您在教程中严重依赖某一资料来源，尤其是直接引用该资料来源，您应适当引用该作品。&lt;br /&gt;
&lt;br /&gt;
在您的教程中包含一个 &amp;quot;参考文献 &amp;quot;或 &amp;quot;注释 &amp;quot;标题（通常在最后），并使用编号列表（&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ol&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;）按照[https://www.chicagomanualofstyle.org/tools_citationguide.html 芝加哥注释风格]（ Chicago Style for Notes）列举您的资料来源。&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;notes&amp;quot;&amp;gt;Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;bartles&amp;quot;&amp;gt;James Bartles, &amp;lt;cite&amp;gt;Boogers For Breakfast&amp;lt;/cite&amp;gt; &lt;br /&gt;
  (Sacramento: Wine Cooler Press, 1979), 74.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;moribund&amp;quot;&amp;gt;Delron Moribund, &amp;quot;Crossover Calisthenics&amp;quot;, &amp;lt;cite&amp;gt;&lt;br /&gt;
  Travesties of Better Judgement&amp;lt;/cite&amp;gt; 64 (2009): 56-60.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
然后，在教程正文中引用资料来源时，使用上标（&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;sup&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;）编号或括号中的编号超链接到相应的列表项。&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The secret to a proper nose-goblin ganache is in the picking&amp;lt;sup&amp;gt;&amp;lt;a &lt;br /&gt;
  href=&amp;quot;#bartles&amp;quot;&amp;gt;1&amp;lt;/a&amp;gt;&amp;lt;/sup&amp;gt;. (...)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
或者，&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Without adequate stretching beforehand, you are certain to suffer a &lt;br /&gt;
Ludmilian haemorrhage(&amp;lt;a href=&amp;quot;#moribund&amp;quot;&amp;gt;2&amp;lt;/a&amp;gt;). (...)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
在下面的[[#代码模板]]中有更多的例子。&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span id=&amp;quot;哪个HTML版本？&amp;quot;&amp;gt;哪个HTML版本？  ====&lt;br /&gt;
目前W3C推荐的是[https://www.w3.org/TR/html5/ HTML 5]。在大多数方面，HTML的核心元素自20世纪90年代中期以来就没有改变过；只是增加了一些标记，删除了一些标记。为了最大限度地实现向后兼容性，您可以将自己限制在以下元素中，这些元素自1996年以来一直没有变化：&lt;br /&gt;
&lt;br /&gt;
* 标题元素&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, ..., &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h6&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 分组/区块元素&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;p&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ol&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;dl&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;及其下属&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;table&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; 及其下属&lt;br /&gt;
** 当然还有&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 文本级/内联元素&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;img&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;samp&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;kbd&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;sup&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; 以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;sub&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;small&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;em&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;i&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;u&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;s&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;dfn&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;var&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;cite&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
许多结束标记虽然是可选的，但为了代码的清晰度，最好可以使用。但是，请远离XHTML自闭合标签形式（即&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;&amp;lt;img src=&amp;quot;some_url&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;等）。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;代码风格&amp;quot;&amp;gt;代码风格  ===&lt;br /&gt;
使用HTML和CSS可以做很多事情。如果将Javascript加入其中，您可以做得更多。&lt;br /&gt;
&lt;br /&gt;
但不要。&lt;br /&gt;
&lt;br /&gt;
SDF 教程是面向所有用户的资源，用户访问教程的方式多种多样。有些用户会通过 telnet 连接使用基于文本的浏览器阅读，有些用户可能会有残疾，需要使用屏幕阅读器。如果您的教程大量使用CSS或Javascript，那么您就没有考虑到所有用户的需求。&lt;br /&gt;
&lt;br /&gt;
此外，教程是一项协作工作。您可能是第一个编写教程的作者，但您可能不会是最后一个。如果您的教程是一个到处使用各种样式属性和标签/元素特异毛球，只会增加下一位作者编辑/扩展的难度——尤其是如果他们不像您一样精通网页编码的话。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;在编写教程时，请尽量使用纯HTML。&#039;&#039;&#039;&#039;&#039;编写一个清晰的教程所需的一切都已经在语言中了：&lt;br /&gt;
&lt;br /&gt;
* 使用标题标签(&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;,…,&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h6&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)来组织您的教程，不要使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;。&lt;br /&gt;
* 在零散的文段中使用段落标签 (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;p&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)，在源代码列表、控制台输出示例或其他需要保留原格式和使用单倍行距字体的地方使用预定义格式标签 (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)。&lt;br /&gt;
&lt;br /&gt;
与其使用样式标签&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;或其他通用分组元素，不如使用语义化标签来描述您希望与正文文本区分开来的文本。如果用户的浏览器支持该标记，则会以不同的方式显示。&lt;br /&gt;
&lt;br /&gt;
* 对于重要文本，请使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 如需强调，请使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;em&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 对于命令名称、文件名或源代码列表，使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 例如控制台文本，在&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;块内使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;samp&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 等等...&lt;br /&gt;
&lt;br /&gt;
在当前的W3C建议（HTML 5）中，有一份[https://www.w3.org/TR/html5/text-level-semantics.html#usage-summary 文本级语义元素的使用摘要]。这很方便。并非所有浏览器都支持所有标签，但语义标签教程比充满自定义样式跨度的文档更有用，也更易于样式化。&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;代码模板&amp;quot;&amp;gt;HTML模板  ==&lt;br /&gt;
如果您要创建一个新的教程或从头开始重新编写一个教程，下面的代码可以用作模板。不是必须使用这个模板，只是为你提供方便。&lt;br /&gt;
&lt;br /&gt;
在&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;/nowiki&amp;gt;和&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;标记之间的文本是注释，可以丢弃。&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- SDF Tutorial Template&lt;br /&gt;
======================================================================&lt;br /&gt;
该代码的使用完全是可选的。它是作为代码风格的示例，&lt;br /&gt;
也是为可能是HTML初学者提供的快速开始新教程的方法。&lt;br /&gt;
 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;
  @import url(&#039;https://sdf.org/tutorials/tutorials.css&#039;);&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 在整个文档中，教程标题应是唯一的一级标题(&amp;lt;h1&amp;gt;)。  --&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Title of Tutorial&amp;lt;/h1&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于较长的教程，最好有目录。&lt;br /&gt;
较短的教程（如本教程）确实不需要目录，因此本部分可以省略。&lt;br /&gt;
可以用&amp;lt;ol&amp;gt;标签替换&amp;lt;ul&amp;gt;标签，以获得编号列表。 --&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#section-1&amp;quot;&amp;gt;Section Heading&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;!-- 要获得列表的缩进部分，我们只需在列表项中再嵌入一个列表即可。 &lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#subsection-1&amp;quot;&amp;gt;Subsection Heading&amp;lt;/a&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#section-2&amp;quot;&amp;gt;Another Section Heading&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#notes&amp;quot;&amp;gt;Notes&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 这是一个章节的开头。开始于一个二级标题(&amp;lt;h2&amp;gt;)，&lt;br /&gt;
并被赋予一个 &amp;quot;id &amp;quot;属性，以便可以链接。 &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;section-1&amp;quot;&amp;gt;Section Heading&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 请记住始终将段落包含在 &amp;lt;p&amp;gt; 标记中。 对于出现在&lt;br /&gt;
段落内的代码、文件名、命令等字符串，请将它们包含&lt;br /&gt;
在 &amp;lt;code&amp;gt; 标记中，以将它们与段落文本的其余部分区分开来。&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By issuing the &amp;lt;code&amp;gt;sac -nar&amp;lt;/code&amp;gt; command, your spirit animal&lt;br /&gt;
will be changed to the narwhal.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于整个代码块，请将 &amp;lt;code&amp;gt; 放置在 &amp;lt;pre&amp;gt; 而不是 &amp;lt;p&amp;gt; 内。 &lt;br /&gt;
&amp;lt;pre&amp;gt; 内的文本按字面意思解释其空白字符&lt;br /&gt;
（空格、制表符、回车符），这与 &amp;lt;p&amp;gt; 标签内的文本不同。 &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;10 PRINT &amp;quot;DO YOU EAT BOOGERS?&amp;quot;&lt;br /&gt;
20 INPUT X&lt;br /&gt;
30 IF X=&amp;quot;YES&amp;quot; THEN PRINT &amp;quot;YOU&#039;RE A GOOD MAN, CHARLIE BROWN.&amp;quot;: END&lt;br /&gt;
40 IF X=&amp;quot;NO&amp;quot; THEN PRINT &amp;quot;WHAT, YOU THINK YOU&#039;RE BETTER THAN ME?&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于示例程序输出、控制台会话等，在&amp;lt;pre&amp;gt;块内使用&amp;lt;samp&amp;gt;。.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;samp&amp;gt;$ finger man@arms&lt;br /&gt;
Login: man                                 Name: Duncan&lt;br /&gt;
Directory: /eternia/heroic_warriors/man    Shell: /bin/bashasaurus&lt;br /&gt;
No mail.&lt;br /&gt;
Plan: Make Orko clean-up the mess he left in my workshop.&lt;br /&gt;
&amp;lt;/samp&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 本小节以三级标题（&amp;lt;h3&amp;gt;）开始。&lt;br /&gt;
HTML为嵌套六层的部分提供了标签（标签&amp;lt;h1&amp;gt;到&amp;lt;h6&amp;gt;）。&lt;br /&gt;
如果您需要嵌套七层或更深的部分……您可以考虑调整您的教程！ &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;h3 id=&amp;quot;subsection-1&amp;quot;&amp;gt;Subsection Heading&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于非常重要的文本，请使用&amp;lt;strong&amp;gt;。要强调一个&lt;br /&gt;
单词或短语，请使用&amp;lt;em&amp;gt;。 --&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Do not forget to flush the buffer&amp;lt;/strong&amp;gt;. If you do, the&lt;br /&gt;
smell will be &amp;lt;em&amp;gt;intolerable&amp;lt;/em&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;section-2&amp;quot;&amp;gt;Another Section Heading&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 本段给出了两种脚注引用风格的示例。 &lt;br /&gt;
两者都超链接到下面“注释”部分中相应的列表项 (&amp;lt;li&amp;gt;)。 &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Honeywell 6080 can be induced to perform a samba by pressing&lt;br /&gt;
the button labeled &amp;quot;Samba&amp;quot; on the operator&#039;s&lt;br /&gt;
console&amp;lt;a href=&amp;quot;#fn1&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&amp;lt;/a&amp;gt;. That mainframe&#039;s forté,&lt;br /&gt;
however, is the foxtrot(&amp;lt;a href=&amp;quot;#fn2&amp;quot;&amp;gt;2&amp;lt;/a&amp;gt;), but the inducement of&lt;br /&gt;
that particular step is beyond the scope of this tutorial.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 下面是脚注部分的示例。在本示例中，我们使用脚注引用参考文献，&lt;br /&gt;
但同样的样式可用于任何类型的脚注。您的教程可能不需要任何脚注。&lt;br /&gt;
如果不需要，请随意删去整个部分。&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;notes&amp;quot;&amp;gt;Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 我们使用有序列表（&amp;lt;ol&amp;gt;）对注释进行自动编号。&lt;br /&gt;
在本教程中，一个参考文献被引用了两次。&lt;br /&gt;
正如您所看到的，您可以使用缩写形式引用单篇作品的后续参考文献。&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;fn1&amp;quot;&amp;gt;Zurgone Vemliat, &amp;lt;cite&amp;gt;Mainframe Dancing Habits&amp;lt;/cite&amp;gt; &lt;br /&gt;
  (Milwaukie: Brewers&#039; Press, 1988), 96.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;fn2&amp;quot;&amp;gt;Vemliat, &amp;lt;cite&amp;gt;Mainframe&amp;lt;/cite&amp;gt;, 112.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!-- 最后是RCS Id标签。就这样吧，我的朋友。 --&amp;gt;&lt;br /&gt;
$Id: tutorial_editing.html,v 1.29 2021/06/08 00:28:33 peteyboy Exp $&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
要查看该模板的渲染效果，请访问&amp;lt;nowiki/&amp;gt;https://sdf.org/?tutorials/tutorial_template&amp;lt;nowiki/&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
注释：&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=SDF_HTML%E6%95%99%E7%A8%8B%E7%BC%96%E8%BE%91%E6%8C%87%E5%8D%97&amp;diff=141</id>
		<title>SDF HTML教程编辑指南</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=SDF_HTML%E6%95%99%E7%A8%8B%E7%BC%96%E8%BE%91%E6%8C%87%E5%8D%97&amp;diff=141"/>
		<updated>2025-08-20T05:56:33Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;下面的说明是关于创建和编辑基于HTML的用户贡献的教程。要为SDF wiki 教程贡献，请看SDF wiki 教程。&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 目录 ==&lt;br /&gt;
* [[#简介]]&lt;br /&gt;
* [[#创建和编辑HTML教程]]&lt;br /&gt;
** [[#创建一个新的教程]]&lt;br /&gt;
** [[#编辑一个现有的教程]]&lt;br /&gt;
** [[#编辑FAQ]]&lt;br /&gt;
* [[#（用html）编辑一个教程]]&lt;br /&gt;
** [[#在你开始写代码之前！]]&lt;br /&gt;
*** [[#使用图像]]&lt;br /&gt;
*** [[#引用参考文献]]&lt;br /&gt;
*** [[#哪个HTML版本？]]&lt;br /&gt;
** [[#代码风格]]&lt;br /&gt;
** [[#教程模板]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;简介&amp;quot;&amp;gt;简介  ==&lt;br /&gt;
&amp;lt;blockquote&amp;gt;每天都有许多年轻的、非常容易受影响的人发现SDF。他们问我们一些我们可能觉得很愚蠢的问题，但这并不是他们的错。他们在成长过程中只知道黑客会破坏计算机网络，利用人们和他们的信息。解决方案不是嘲笑或回避这些孩子，而是告诉他们有一个更好、更真实的方法。&lt;br /&gt;
&lt;br /&gt;
-- 摘自README.TXT&amp;lt;/blockquote&amp;gt;本指南的编写是为了帮助成员更容易地为SDF HTML教程项目做出贡献。指南的[[#第一部分]]简要说明了如何使用RCS&amp;lt;ref&amp;gt;Revision Control System&amp;lt;/ref&amp;gt;进行版本控制来创建或编辑教程文件。指南的[[#第二部分]]讨论了针对教程的HTML代码，并包含一些模板代码。&lt;br /&gt;
&lt;br /&gt;
你最好阅读一下教程文件目录（&amp;lt;code&amp;gt;/sys/html/tutorials&amp;lt;/code&amp;gt;）中SDF HTML教程项目的原始&amp;lt;code&amp;gt;README.TXT&amp;lt;/code&amp;gt;。它不仅表达了项目的目的，而且还包含了比这里更详细的RCS使用信息。&lt;br /&gt;
&lt;br /&gt;
本指南假定读者具有基本的shell使用和文本文件编辑知识。熟悉HTML是不必要的，尽管它可能会有帮助。&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;第一部分&amp;quot;&amp;gt;创建和编辑教程  ==&lt;br /&gt;
要创建或编辑一个教程，请将你的工作目录改为/sys/html/tutorials，在你的SDF主集群（例如sdf.org，而不是MetaArray）的shell中：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /sys/html/tutorials&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;创建一个新的教程&amp;quot;&amp;gt;创建一个新的教程  ===&lt;br /&gt;
&lt;br /&gt;
在教程目录内，你可以使用echo来快速创建一个空的HTML文件，同时在底部有一个RCS Id标签。首先使用umask命令，以确保新文件的权限允许网络服务器（和其他用户）读取它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ umask 022&lt;br /&gt;
$ echo -e &amp;quot;\n\$Id\$&amp;quot; &amp;gt; your_tutorial_filename.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;使用命令&amp;lt;code&amp;gt;ci -u&amp;lt;/code&amp;gt;将该文件用RCS签入，并将其解锁，以便任何人都可以编辑它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ci -u your_tutorial_filename.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;在你第一次签入一个文件时，你会被要求对其进行描述。请写一些有用的东西。&lt;br /&gt;
&lt;br /&gt;
现在你可以使用[[#下一节]]的说明编辑你的教程，以检查文件是否进入和离开RCS。&lt;br /&gt;
&lt;br /&gt;
一旦你的教程准备好公开展示，请将其添加到可用的教程列表中，以便人们能够在网上真正找到它。你必须编辑教程目录中的&amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt;文件来完成这项工作。编辑&amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt;文件时，请使用与编辑教程时相同的签入/签出程序。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;下一节&amp;quot;&amp;gt;编辑一个现有的教程  ===&lt;br /&gt;
&lt;br /&gt;
在tutorials目录下，使用&amp;lt;code&amp;gt;co -l&amp;lt;/code&amp;gt;命令用RCS检查文件，并在你进行编辑时锁定它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ co -l filename&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&#039;&#039;&#039;&amp;lt;u&amp;gt;如果在使用&amp;lt;code&amp;gt;co -l&amp;lt;/code&amp;gt;时，你被告知该文件已经被锁定，请停止你正在做的事情，并等待它被重新签入。如果它没有被签入，请给作者发邮件，让他们知道你想签出该文件并编辑它。&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
现在你可以使用你喜欢的文本编辑器编辑该文件。如果你定期保存你的工作，你可以在你的网络浏览器中加载和重新加载教程以查看你的变化。教程文件的URL将是&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://sdf.org/?tutorials/filename_without_extension&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;（例如，如果你正在编辑&amp;lt;code&amp;gt;/sys/html/tutorials/nmap_for_dummies.html&amp;lt;/code&amp;gt;，URL将是&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://sdf.org/?tutorials/nmap_for_dummies&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;）。&lt;br /&gt;
&lt;br /&gt;
当你完成了对文件的编辑，使用命令&amp;lt;code&amp;gt;ci -u&amp;lt;/code&amp;gt;将该文件用RCS签入，并解锁，以便其他人可以编辑它。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ ci -u filename&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;当你签入一个文件时，你会被要求描述你对它所做的修改。随你怎么说，但请写一些有用的东西。&lt;br /&gt;
&lt;br /&gt;
==== 签入之前撤销编辑 ====&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;如果在编辑完一个文件后，你希望不签入你的修改，恢复到没有你的修改的版本&amp;lt;/u&amp;gt;&#039;&#039;&#039;，只需运行一个带有解锁的签出，类似于你之前的签出方式：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ co -u filename&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;你可能会收到一个警告，询问你是否要删除文件的写入权限---你*需要*，因此输入*yes*。这将把以前版本的文件重新加载到当前文件夹中，并解锁，以便其他人可以再次进行修改。如果你想再试一次，请使用与上述相同的步骤。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;编辑FAQ&amp;quot;&amp;gt;编辑FAQ  ===&lt;br /&gt;
MetaARPA会员也可以编辑[https://sdf.org/?faq FAQ]。这些是纯文本文件，能在&amp;lt;code&amp;gt;/sys/html/tutorials/FAQ/&amp;lt;/code&amp;gt;中找到。每个部分的FAQ列表都在一个点文件&amp;quot;&amp;lt;code&amp;gt;.list&amp;lt;/code&amp;gt;&amp;quot;中。这些FAQ文件与&amp;lt;code&amp;gt;faq&amp;lt;/code&amp;gt;命令所显示的文件定期同步。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;第二部分&amp;quot;&amp;gt;（用html）编辑一个教程  ==&lt;br /&gt;
教程是用HTML编码的。如果你对HTML已经驾轻就熟，那么你离编辑你的教程就只有一步之遥了!请阅读 &amp;quot;[[#在你开始写代码之前！]]&amp;quot;部分，了解一些实施的具体细节，并在继续前至少略过[[#代码风格]]部分。&lt;br /&gt;
&lt;br /&gt;
如果你&#039;&#039;&#039;不&#039;&#039;&#039;熟悉HTML，W3C&amp;lt;ref&amp;gt;World Wide Web Consortium&amp;lt;/ref&amp;gt;网站有一个非常简短的教程，即《[http://www.w3.org/MarkUp/Guide/ HTML入门]》，它将教会你足够多的基础知识，以便能够编写一个教程。此外，本页面的[[#模板]]还提供了大量的评论，以帮助HTML初学者。&lt;br /&gt;
&lt;br /&gt;
如果您没有时间或意愿学习HTML，您仍然可以为教程项目做出贡献。用纯文本编写教程（或者是一份章节、一处更正、附录等），并在 &amp;lt;code&amp;gt;bboard:&amp;lt;TUTORIALS&amp;gt;&amp;lt;/code&amp;gt; 中添加注释。您的 MetaARPA 同事可能会自愿为您将作品 HTML 化。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;在你开始写代码之前！&amp;quot;&amp;gt;在您开始写代码之前！  ===&lt;br /&gt;
SDF 教程文件包含 HTML 代码，&#039;&#039;&#039;&#039;&#039;但不是完整的 HTML 文档&#039;&#039;&#039;&#039;&#039;。当它们被提供给 Web 浏览器时，网站的 index.cgi 会将它们封装在全站导航的页眉和页脚中。教程文件中的代码代表 &amp;lt;body&amp;gt; 元素内的内容，并且&#039;&#039;&#039;&#039;&#039;确保不得包含以下元素/标记&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;html&amp;gt;, &amp;lt;/html&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;head&amp;gt;, &amp;lt;/head&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;meta&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;base&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;body&amp;gt;, &amp;lt;/body&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
教程文件也将包含一个RCS &#039;&#039;&#039;$Id&#039;&#039;&#039;标签，它看起来像这样：&amp;lt;code&amp;gt;$Id:filename.html,v 1.11 2011/01/01 11:11:11 username Exp $&amp;lt;/code&amp;gt;。无需编辑，因为它是由RCS自动生成的。最好将其作为文件的最后一行。&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span id=&amp;quot;使用图像&amp;quot;&amp;gt;使用图像  ====&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;请勿从其他网站热链图片。&#039;&#039;&#039;&#039;&#039;在&amp;lt;code&amp;gt;/sys/html/tutorials/images&amp;lt;/code&amp;gt;中放置您希望使用的任何图像文件的副本。并确保它们的权限允许Web服务器读取它们（&amp;lt;code&amp;gt;chmod a+r&amp;lt;/code&amp;gt;可以做到这一点）。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;始终&#039;&#039;&#039;&#039;&#039;在&amp;lt;img&amp;gt;标签的alt属性中为基于文本的浏览器用户和视障人士&#039;&#039;&#039;&#039;&#039;提供图片说明&#039;&#039;&#039;&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
错误：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;tutorials/images/example.png&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
正确：&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;img src=&amp;quot;http://sdf.org/tutorials/images/example.png&amp;quot; &lt;br /&gt;
     alt=&amp;quot;Image of a Blickensderfer No. 5 typewriter&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span id=&amp;quot;引用参考文献&amp;quot;&amp;gt;引用参考文献  ====&lt;br /&gt;
如果您在教程中严重依赖某一资料来源，尤其是直接引用该资料来源，您应适当引用该作品。&lt;br /&gt;
&lt;br /&gt;
在您的教程中包含一个 &amp;quot;参考文献 &amp;quot;或 &amp;quot;注释 &amp;quot;标题（通常在最后），并使用编号列表（&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ol&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;）按照[https://www.chicagomanualofstyle.org/tools_citationguide.html 芝加哥注释风格]（ Chicago Style for Notes）列举您的资料来源。&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;notes&amp;quot;&amp;gt;Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;bartles&amp;quot;&amp;gt;James Bartles, &amp;lt;cite&amp;gt;Boogers For Breakfast&amp;lt;/cite&amp;gt; &lt;br /&gt;
  (Sacramento: Wine Cooler Press, 1979), 74.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;moribund&amp;quot;&amp;gt;Delron Moribund, &amp;quot;Crossover Calisthenics&amp;quot;, &amp;lt;cite&amp;gt;&lt;br /&gt;
  Travesties of Better Judgement&amp;lt;/cite&amp;gt; 64 (2009): 56-60.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
然后，在教程正文中引用资料来源时，使用上标（&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;sup&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;）编号或括号中的编号超链接到相应的列表项。&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The secret to a proper nose-goblin ganache is in the picking&amp;lt;sup&amp;gt;&amp;lt;a &lt;br /&gt;
  href=&amp;quot;#bartles&amp;quot;&amp;gt;1&amp;lt;/a&amp;gt;&amp;lt;/sup&amp;gt;. (...)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
或者，&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Without adequate stretching beforehand, you are certain to suffer a &lt;br /&gt;
Ludmilian haemorrhage(&amp;lt;a href=&amp;quot;#moribund&amp;quot;&amp;gt;2&amp;lt;/a&amp;gt;). (...)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
在下面的[[#代码模板]]中有更多的例子。&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span id=&amp;quot;哪个HTML版本？&amp;quot;&amp;gt;哪个HTML版本？  ====&lt;br /&gt;
目前W3C推荐的是[https://www.w3.org/TR/html5/ HTML 5]。在大多数方面，HTML的核心元素自20世纪90年代中期以来就没有改变过；只是增加了一些标记，删除了一些标记。为了最大限度地实现向后兼容性，您可以将自己限制在以下元素中，这些元素自1996年以来一直没有变化：&lt;br /&gt;
&lt;br /&gt;
* 标题元素&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, ..., &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h6&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 分组/区块元素&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;p&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;ol&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;dl&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;及其下属&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;table&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; 及其下属&lt;br /&gt;
** 当然还有&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 文本级/内联元素&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;img&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;samp&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;kbd&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;sup&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; 以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;sub&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;small&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;em&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;i&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;u&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;s&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;dfn&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;var&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;以及 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;cite&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
许多结束标记虽然是可选的，但为了代码的清晰度，最好可以使用。但是，请远离XHTML自闭合标签形式（即&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;&amp;lt;img src=&amp;quot;some_url&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;等）。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;代码风格&amp;quot;&amp;gt;代码风格  ===&lt;br /&gt;
使用HTML和CSS可以做很多事情。如果将Javascript加入其中，您可以做得更多。&lt;br /&gt;
&lt;br /&gt;
但不要。&lt;br /&gt;
&lt;br /&gt;
SDF 教程是面向所有用户的资源，用户访问教程的方式多种多样。有些用户会通过 telnet 连接使用基于文本的浏览器阅读，有些用户可能会有残疾，需要使用屏幕阅读器。如果您的教程大量使用CSS或Javascript，那么您就没有考虑到所有用户的需求。&lt;br /&gt;
&lt;br /&gt;
此外，教程是一项协作工作。您可能是第一个编写教程的作者，但您可能不会是最后一个。如果您的教程是一个到处使用各种样式属性和标签/元素特异毛球，只会增加下一位作者编辑/扩展的难度——尤其是如果他们不像您一样精通网页编码的话。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;在编写教程时，请尽量使用纯HTML。&#039;&#039;&#039;&#039;&#039;编写一个清晰的教程所需的一切都已经在语言中了：&lt;br /&gt;
&lt;br /&gt;
* 使用标题标签(&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;,…,&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;h6&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)来组织您的教程，不要使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;。&lt;br /&gt;
* 在零散的文段中使用段落标签 (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;p&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)，在源代码列表、控制台输出示例或其他需要保留原格式和使用单倍行距字体的地方使用预定义格式标签 (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)。&lt;br /&gt;
&lt;br /&gt;
与其使用样式标签&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;或其他通用分组元素，不如使用语义化标签来描述您希望与正文文本区分开来的文本。如果用户的浏览器支持该标记，则会以不同的方式显示。&lt;br /&gt;
&lt;br /&gt;
* 对于重要文本，请使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 如需强调，请使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;em&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 对于命令名称、文件名或源代码列表，使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 例如控制台文本，在&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;块内使用&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;samp&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* 等等...&lt;br /&gt;
&lt;br /&gt;
在当前的W3C建议（HTML 5）中，有一份[https://www.w3.org/TR/html5/text-level-semantics.html#usage-summary 文本级语义元素的使用摘要]。这很方便。并非所有浏览器都支持所有标签，但语义标签教程比充满自定义样式跨度的文档更有用，也更易于样式化。&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;代码模板&amp;quot;&amp;gt;HTML模板  ==&lt;br /&gt;
如果您要创建一个新的教程或从头开始重新编写一个教程，下面的代码可以用作模板。不是必须使用这个模板，只是为你提供方便。&lt;br /&gt;
&lt;br /&gt;
在&amp;lt;code&amp;gt;&amp;lt;!--&amp;lt;/code&amp;gt;和&amp;lt;code&amp;gt;--&amp;gt;&amp;lt;/code&amp;gt;标记之间的文本是注释，可以丢弃。&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- SDF Tutorial Template&lt;br /&gt;
======================================================================&lt;br /&gt;
该代码的使用完全是可选的。它是作为代码风格的示例，&lt;br /&gt;
也是为可能是HTML初学者提供的快速开始新教程的方法。&lt;br /&gt;
 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;
  @import url(&#039;https://sdf.org/tutorials/tutorials.css&#039;);&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 在整个文档中，教程标题应是唯一的一级标题(&amp;lt;h1&amp;gt;)。  --&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Title of Tutorial&amp;lt;/h1&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于较长的教程，最好有目录。&lt;br /&gt;
较短的教程（如本教程）确实不需要目录，因此本部分可以省略。&lt;br /&gt;
可以用&amp;lt;ol&amp;gt;标签替换&amp;lt;ul&amp;gt;标签，以获得编号列表。 --&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#section-1&amp;quot;&amp;gt;Section Heading&amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;!-- 要获得列表的缩进部分，我们只需在列表项中再嵌入一个列表即可。 &lt;br /&gt;
    --&amp;gt;&lt;br /&gt;
    &amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;a href=&amp;quot;#subsection-1&amp;quot;&amp;gt;Subsection Heading&amp;lt;/a&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#section-2&amp;quot;&amp;gt;Another Section Heading&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#notes&amp;quot;&amp;gt;Notes&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 这是一个章节的开头。开始于一个二级标题(&amp;lt;h2&amp;gt;)，&lt;br /&gt;
并被赋予一个 &amp;quot;id &amp;quot;属性，以便可以链接。 &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;section-1&amp;quot;&amp;gt;Section Heading&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 请记住始终将段落包含在 &amp;lt;p&amp;gt; 标记中。 对于出现在&lt;br /&gt;
段落内的代码、文件名、命令等字符串，请将它们包含&lt;br /&gt;
在 &amp;lt;code&amp;gt; 标记中，以将它们与段落文本的其余部分区分开来。&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By issuing the &amp;lt;code&amp;gt;sac -nar&amp;lt;/code&amp;gt; command, your spirit animal&lt;br /&gt;
will be changed to the narwhal.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于整个代码块，请将 &amp;lt;code&amp;gt; 放置在 &amp;lt;pre&amp;gt; 而不是 &amp;lt;p&amp;gt; 内。 &lt;br /&gt;
&amp;lt;pre&amp;gt; 内的文本按字面意思解释其空白字符&lt;br /&gt;
（空格、制表符、回车符），这与 &amp;lt;p&amp;gt; 标签内的文本不同。 &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;10 PRINT &amp;quot;DO YOU EAT BOOGERS?&amp;quot;&lt;br /&gt;
20 INPUT X&lt;br /&gt;
30 IF X=&amp;quot;YES&amp;quot; THEN PRINT &amp;quot;YOU&#039;RE A GOOD MAN, CHARLIE BROWN.&amp;quot;: END&lt;br /&gt;
40 IF X=&amp;quot;NO&amp;quot; THEN PRINT &amp;quot;WHAT, YOU THINK YOU&#039;RE BETTER THAN ME?&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于示例程序输出、控制台会话等，在&amp;lt;pre&amp;gt;块内使用&amp;lt;samp&amp;gt;。.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;samp&amp;gt;$ finger man@arms&lt;br /&gt;
Login: man                                 Name: Duncan&lt;br /&gt;
Directory: /eternia/heroic_warriors/man    Shell: /bin/bashasaurus&lt;br /&gt;
No mail.&lt;br /&gt;
Plan: Make Orko clean-up the mess he left in my workshop.&lt;br /&gt;
&amp;lt;/samp&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 本小节以三级标题（&amp;lt;h3&amp;gt;）开始。&lt;br /&gt;
HTML为嵌套六层的部分提供了标签（标签&amp;lt;h1&amp;gt;到&amp;lt;h6&amp;gt;）。&lt;br /&gt;
如果您需要嵌套七层或更深的部分……您可以考虑调整您的教程！ &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;h3 id=&amp;quot;subsection-1&amp;quot;&amp;gt;Subsection Heading&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 对于非常重要的文本，请使用&amp;lt;strong&amp;gt;。要强调一个&lt;br /&gt;
单词或短语，请使用&amp;lt;em&amp;gt;。 --&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Do not forget to flush the buffer&amp;lt;/strong&amp;gt;. If you do, the&lt;br /&gt;
smell will be &amp;lt;em&amp;gt;intolerable&amp;lt;/em&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;section-2&amp;quot;&amp;gt;Another Section Heading&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 本段给出了两种脚注引用风格的示例。 &lt;br /&gt;
两者都超链接到下面“注释”部分中相应的列表项 (&amp;lt;li&amp;gt;)。 &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Honeywell 6080 can be induced to perform a samba by pressing&lt;br /&gt;
the button labeled &amp;quot;Samba&amp;quot; on the operator&#039;s&lt;br /&gt;
console&amp;lt;a href=&amp;quot;#fn1&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&amp;lt;/a&amp;gt;. That mainframe&#039;s forté,&lt;br /&gt;
however, is the foxtrot(&amp;lt;a href=&amp;quot;#fn2&amp;quot;&amp;gt;2&amp;lt;/a&amp;gt;), but the inducement of&lt;br /&gt;
that particular step is beyond the scope of this tutorial.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 下面是脚注部分的示例。在本示例中，我们使用脚注引用参考文献，&lt;br /&gt;
但同样的样式可用于任何类型的脚注。您的教程可能不需要任何脚注。&lt;br /&gt;
如果不需要，请随意删去整个部分。&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;notes&amp;quot;&amp;gt;Notes&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 我们使用有序列表（&amp;lt;ol&amp;gt;）对注释进行自动编号。&lt;br /&gt;
在本教程中，一个参考文献被引用了两次。&lt;br /&gt;
正如您所看到的，您可以使用缩写形式引用单篇作品的后续参考文献。&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;fn1&amp;quot;&amp;gt;Zurgone Vemliat, &amp;lt;cite&amp;gt;Mainframe Dancing Habits&amp;lt;/cite&amp;gt; &lt;br /&gt;
  (Milwaukie: Brewers&#039; Press, 1988), 96.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li id=&amp;quot;fn2&amp;quot;&amp;gt;Vemliat, &amp;lt;cite&amp;gt;Mainframe&amp;lt;/cite&amp;gt;, 112.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!-- 最后是RCS Id标签。就这样吧，我的朋友。 --&amp;gt;&lt;br /&gt;
$Id: tutorial_editing.html,v 1.29 2021/06/08 00:28:33 peteyboy Exp $&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
要查看该模板的渲染效果，请访问&amp;lt;nowiki/&amp;gt;https://sdf.org/?tutorials/tutorial_template&amp;lt;nowiki/&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
注释：&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=UNIX%C2%AE_Shell%E4%B9%8B%E9%97%B4%E7%9A%84%E6%9C%80%E7%BB%88%E5%B7%AE%E5%BC%82&amp;diff=140</id>
		<title>UNIX® Shell之间的最终差异</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=UNIX%C2%AE_Shell%E4%B9%8B%E9%97%B4%E7%9A%84%E6%9C%80%E7%BB%88%E5%B7%AE%E5%BC%82&amp;diff=140"/>
		<updated>2025-08-20T05:54:25Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本教程正在编写中（work in progress，WIP）。&lt;br /&gt;
&lt;br /&gt;
== 介绍 ==&lt;br /&gt;
本教程中介绍的 UNIX shell 包括：osh（Thompson shell 的移植）、sh（和类似 sh 的 shell）、csh（和类似 csh 的 shell）以及其他 shell。&lt;br /&gt;
&lt;br /&gt;
各种 UNIX&amp;lt;ref&amp;gt;UNIX® 是 The Open Group 的注册商标。&amp;lt;/ref&amp;gt; shell 之间有哪些重要的区别和/或相似之处？不同之处一般是命令行语法问题。&lt;br /&gt;
&lt;br /&gt;
在下面的章节中，每个命令行示例都用 &amp;quot;Ecl [123]: &amp;quot;表示。比较每节中的 &amp;quot;Ecl [123]: &amp;quot;和其他章节中相应的 &amp;quot;Ecl [123]:&amp;quot;，就能了解这些 shell 的不同之处&lt;br /&gt;
&lt;br /&gt;
本教程中描述的各种UNIX shell之间的共同点比差异更为重要。这是因为当你学会使用一种shell时，实际上也学会了使用其他shell。从用户的角度来看，每种shell都扮演着相同的角色。这个角色就是作为UNIX操作系统中可用功能的接口。&lt;br /&gt;
&lt;br /&gt;
== Thompson Shell ==&lt;br /&gt;
在UNIX历史中，Thompson shell 早于 Bourne shell 和 C shell 出现，其命令语言是这两种壳的子集。Thompson shell 的流程控制通过外部壳工具[http://v6shell.org/man/if.1.html if](1)和[http://v6shell.org/man/goto.1.html goto](1)实现。然而，Bourne shell 和 C shell 的流程控制则内置于各自的壳中。&lt;br /&gt;
&lt;br /&gt;
增强版的Thompson shell已在SDF上提供，路径为`&amp;lt;code&amp;gt;/usr/pkg/bin/osh&amp;lt;/code&amp;gt;`。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man osh&amp;lt;/code&amp;gt;`来查看其手册。如果您更喜欢在线阅读，也可以访问其[http://v6shell.org/man/osh.1.html 在线手册]。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% which osh if goto ^ ( tr &#039;\n&#039; &#039; &#039; ; echo ) ^ sed &#039;s/.*/ls -l &amp;amp;/&#039; ^ osh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel   7880 Jul 18 21:37 /usr/pkg/bin/goto&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  14160 Jul 18 21:37 /usr/pkg/bin/if&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  38216 Jul 18 21:37 /usr/pkg/bin/osh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if -r /netbsd echo /netbsd: Is readable ; \&lt;br /&gt;
  if -w /netbsd echo /netbsd: Is writable&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
请注意，上述的 `&amp;lt;code&amp;gt;setenv&amp;lt;/code&amp;gt;` 命令在原始的 Thompson 壳中不可用。这是 &#039;&#039;&#039;osh&#039;&#039;&#039; 增强功能之一。我们是否需要对 PWB shell&amp;lt;ref&amp;gt;此 PWB shell 也是Thompson Shell 的改进。  --译者注&amp;lt;/ref&amp;gt; 说些什么？&lt;br /&gt;
&lt;br /&gt;
== Bourne Shell ==&lt;br /&gt;
这包括原始Bourne shell、衍生版本以及类似实现。真正的Bourne shell或类Bourne shell通常作为大多数UNIX系统上的标准命令解释器。&lt;br /&gt;
&lt;br /&gt;
在SDF上，有一个与Bourne shell类似的命令行解释器，其路径为`&amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;`。您可以在命令提示符下输入`&amp;lt;code&amp;gt;man sh&amp;lt;/code&amp;gt;`来查看其手册。如果您更喜欢在线阅读，也可以通过[http://netbsd.gw.com/cgi-bin/man-cgi?sh+1.alpha+NetBSD-2.1 在线方式]查看其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
$ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
$ ls -l `which sh ksh bash`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  298431 Oct 24  2005 /bin/ksh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  199717 Oct 24  2005 /bin/sh&lt;br /&gt;
-rwxr-xr-x  1 root  wheel  963696 Jun  4 08:57 /usr/pkg/bin/bash&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
$ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bourne-Again Shell ==&lt;br /&gt;
Bourne-Again shell（Bash）是为GNU项目开发的自由软件，旨在替代Bourne shell。Bash能够在不进行任何修改的情况下执行绝大多数Bourne shell脚本。然而，其语法包含许多在Bourne shell中不存在的扩展功能。&lt;br /&gt;
&lt;br /&gt;
Bourne-Again shell 在 SDF 上可通过 `&amp;lt;code&amp;gt;/usr/pkg/bin/bash&amp;lt;/code&amp;gt;` 访问。您可以在命令提示符下执行 `&amp;lt;code&amp;gt;man bash&amp;lt;/code&amp;gt;` 命令来查看其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
$ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
$ ls -l `which sh ksh bash`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  298431 Oct 24  2005 /bin/ksh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  199717 Oct 24  2005 /bin/sh&lt;br /&gt;
-rwxr-xr-x  1 root  wheel  963696 Jun  4 08:57 /usr/pkg/bin/bash&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
$ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Z Shell ==&lt;br /&gt;
Z shell（Zsh）是Bourne shell的扩展版本，包含了许多改进。Paul Falstad于1990年在普林斯顿大学编写了Zsh的第一个版本。&lt;br /&gt;
&lt;br /&gt;
Z shell在SDF上可通过`&amp;lt;code&amp;gt;/usr/pkg/bin/zsh&amp;lt;/code&amp;gt;`访问。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man zsh&amp;lt;/code&amp;gt;`来阅读其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% ls -l `which csh tcsh zsh`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  214333 Oct 24  2005 /bin/csh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  459408 Jun 29  2005 /usr/pkg/bin/tcsh&lt;br /&gt;
-r-xr-xr-x  2 root  wheel    6352 May 11  2007 /usr/pkg/bin/zsh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C Shell ==&lt;br /&gt;
这包括原始的C shell、衍生版本以及类似实现。&lt;br /&gt;
&lt;br /&gt;
C shell在SDF上以`&amp;lt;code&amp;gt;/bin/csh&amp;lt;/code&amp;gt;`的形式提供。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man csh&amp;lt;/code&amp;gt;`来查看其手册。如果您更愿意在线查看，也可以[http://netbsd.gw.com/cgi-bin/man-cgi?csh+1.alpha+NetBSD-2.1 通过网络]阅读其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% ls -l `which csh tcsh zsh`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  214333 Oct 24  2005 /bin/csh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  459408 Jun 29  2005 /usr/pkg/bin/tcsh&lt;br /&gt;
-r-xr-xr-x  2 root  wheel    6352 May 11  2007 /usr/pkg/bin/zsh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if (-r /netbsd) echo /netbsd: Is readable ; \&lt;br /&gt;
  if (-w /netbsd) echo /netbsd: Is writable&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 其他 Shells ==&lt;br /&gt;
这一部分是否必要？&lt;br /&gt;
&lt;br /&gt;
本部分将包含关于Z shell、rc（AT&amp;amp;T Plan 9 shell）以及任何其他无法明确归类到单一类别的UNIX shell的相关信息。&lt;br /&gt;
&lt;br /&gt;
== 结论 ==&lt;br /&gt;
结合前文内容，进一步探讨差异与相似之处。需要特别注意的是，尽管存在差异……但我认为相似性更为重要。毕竟，正是这些相似性使得用户能够轻松地在不同终端之间切换。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: shells.html,v 1.3 2021/06/17 22:55:38 brainman Exp brainman $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=139</id>
		<title>文件传输教程</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=139"/>
		<updated>2025-08-20T05:53:43Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本教程讨论了将数据从本地（或外部）机器输入和输出 SDF 的各种方法。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;待办事项：&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* x/y/zmodem 传输&lt;br /&gt;
* kermit 传输&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 简介 ==&lt;br /&gt;
要在 SDF 和您的本地（或任何其他外部）机器之间传输数据，有多种方法。它们的可用性取决于您在 SDF 的会员级别（请参阅常见[http://sdf.org/index.cgi?faq?MEMBERS FAQ, 会员部分]以获取更多信息），外部系统及其连接。&lt;br /&gt;
&lt;br /&gt;
== FTP - File Transfer Protocol ==&lt;br /&gt;
[http://en.wikipedia.org/wiki/File_Transfer_Protocol FTP (File Transfer Protocol)] 在 SDF 上仅用于 &#039;&#039;&#039;下载&#039;&#039;&#039; 公共文件，这是出于安全原因。对于私人文件的上传和下载，必须使用 [[文件传输教程#scp 和 sftp - secure copying 和 ftp|scp 和 sftp]]。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;注意：ARPA 会员可以允许通过 FTP 进行上&amp;amp;下载；然而，如果可能的话，最好使用 scp 或 sftp，因为 FTP 是不加密的，而且你的密码也必须在明文状态下传输。&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
对于下载，将你的 FTP 程序指向 sdf.org，并使用匿名 FTP 来读取数据（用户名 &amp;lt;code&amp;gt;anonymous&amp;lt;/code&amp;gt; ，密码 &amp;lt;code&amp;gt;&#039;&#039;yourlogin&#039;&#039;@sdf.org&amp;lt;/code&amp;gt; , 或您其他的电子邮件地址）。&lt;br /&gt;
&lt;br /&gt;
== scp 和 sftp - secure copying 和 ftp ==&lt;br /&gt;
scp 和 sftp 是基于 ssh（secure shell）的安全数据传输方式。如果您之前只使用过 ftp，您会惊讶于使用 scp 的便捷性和好处。&lt;br /&gt;
&lt;br /&gt;
假设您已登录到 sdf，并希望将一些图片从您的家用计算机（在本例中命名为 foo）传输到您的 sdf 主目录。您需要使用以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;scp *.jpg me@sdf.org :/your/remote/home/&amp;lt;/syntaxhighlight&amp;gt;我们来分解一下这个命令：&lt;br /&gt;
&lt;br /&gt;
scp&lt;br /&gt;
&lt;br /&gt;
该命令本身。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;.jpg&lt;br /&gt;
&lt;br /&gt;
您想要传输的文件。&lt;br /&gt;
&lt;br /&gt;
me@sdf.org&lt;br /&gt;
&lt;br /&gt;
您希望连接的服务器的用户名。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;/your/remote/home/&lt;br /&gt;
&lt;br /&gt;
你想要上传的目录。&lt;br /&gt;
&lt;br /&gt;
除非你已经安装了 ssh 授权密钥，否则系统会提示你输入用户名和密码。之后，你应该会看到类似以下的输出：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
[me@local Pictures]# scp *.jpg me@sdf.org:~/your/remote/home&lt;br /&gt;
IMG_016.jpg 100% 1802KB 45.7KB/s 00:39&lt;br /&gt;
IMG_017.jpg 100% 1253KB 46.1KB/s 00:40&lt;br /&gt;
IMG_018.jpg 100% 1243KB 48.6KB/s 00:25&lt;br /&gt;
IMG_020.jpg 100% 1131KB 45.9KB/s 00:39&lt;br /&gt;
[foo@local Pictures]#&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;在 SDF 上，你需要成为 ARPA 会员才能使用它们。请查阅 scp 和 ssh 的手册页以获取更多信息和使用选项。&lt;br /&gt;
&lt;br /&gt;
在 Windows 机器上，你可以使用 PuTTY 程序 。&lt;br /&gt;
&lt;br /&gt;
== ssh 和 tar - 安全复制目录 ==&lt;br /&gt;
tar 归档工具可以与 ssh 配合使用，快速复制整个目录树：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar cf - &#039;&#039;target_dir&#039;&#039; | ssh me@freeshell.org &amp;quot; tar xf - -C ~/&#039;&#039;path&#039;&#039;/ &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
注意：此技巧需要本地和远程系统上安装兼容版本的 tar 工具。&lt;br /&gt;
&lt;br /&gt;
== Gopher 和 HTTP - 利用互联网进行下载 ==&lt;br /&gt;
要从本地机器上的SDF中获取数据，当然可以将它们发布到你的Gopher或网站上。请查阅[http://sdf.org/index.cgi?faq?GOPHER 常见问题解答（FAQ）中的GOPHER部分]以及[http://sdf.org/index.cgi?tutorials/building_a_website 网站教程]，以获取有关如何设置这些网站的详细信息。&lt;br /&gt;
&lt;br /&gt;
请注意，HTTP 流量受带宽限制，具体取决于您的会员级别；如果您的流量超过配额，您的网站将被暂时封锁！&lt;br /&gt;
&lt;br /&gt;
要防止任何人访问，请参阅常见问题解答（FAQ）中[http://sdf.org/index.cgi?faq?WEB?04 密码保护]的部分。&lt;br /&gt;
&lt;br /&gt;
== 终端（Terminal） - 通过终端直接复制 ==&lt;br /&gt;
对于传输少量文本数据（脚本、表格、源代码片段）的情况，建议直接在终端中进行复制粘贴！如果你是[http://sdf.org/index.cgi?faq?MEMBERS?01 MetaARPA]，那么你可以利用&amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;及其内置的复制功能在不同屏幕之间传输数据。&lt;br /&gt;
&lt;br /&gt;
要在终端中将文本输入追加到SDF上的文件中，您可以使用您喜欢的文本编辑器打开SDF上的文件。或者直接使用命令 &amp;lt;code&amp;gt;cat &amp;gt;&amp;gt;file&amp;lt;/code&amp;gt;，将数据发送到终端（通过粘贴功能），并以一行仅包含 ^D (CTRL-D) 的内容结束--要在终端中这样做，请点击 RETURN、CTRL-D、RETURN；这将关闭 &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt; 正在读取的标准输入。&lt;br /&gt;
&lt;br /&gt;
== 电子邮件 - 仅用于小文件 ==&lt;br /&gt;
如果您需要传输二进制数据，但不能使用 scp（因为您不是 [http://sdf.org/index.cgi?faq?MEMBERS?01 ARPA]，这很可惜），那么您可能需要通过电子邮件传输文件。为此，您需要将要输入 SDF 的数据附加到一封邮件中，然后发送到您在 SDF 上的地址（&#039;&#039;yourlogin&#039;&#039;@sdf.org）。在 SDF 上，您可以阅读邮件，并将附件保存到需要数据的地方（例如，您的主目录，您可以使用 &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 将其移动到该目录）。&lt;br /&gt;
&lt;br /&gt;
这对大附件可能不起作用，因为无处不在的电子邮件系统并不是为文件传输而设计的。如果你需要经常传输大文件，你应该认真考虑成为 ARPA！&lt;br /&gt;
&lt;br /&gt;
== 术语表 ==&lt;br /&gt;
ARPA 和 MetaARPA&lt;br /&gt;
&lt;br /&gt;
            这些是SDF上的额外会员等级，可使用更多功能，提供更大空间，并带来支持SDF的良好体验！&lt;br /&gt;
&lt;br /&gt;
下载（download）&lt;br /&gt;
&lt;br /&gt;
            将数据从SDF传输到本地机器；想象SDF位于某个高处，以便所有人都能看到它——然后你从SDF下载数据。&lt;br /&gt;
&lt;br /&gt;
[http://www.chiark.greenend.org.uk/~sgtatham/putty PuTTY]&lt;br /&gt;
&lt;br /&gt;
            这是一套适用于 Windows 电脑的软件，用于 ssh 和 scp 连接。&lt;br /&gt;
&lt;br /&gt;
[http://sdf.org/ SDF]&lt;br /&gt;
&lt;br /&gt;
            Super Dimensional Fortress - 如果你不知道那是什么，那你为什么要读这篇文章？&amp;lt;&#039;&#039;wink&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
terminal （终端）&lt;br /&gt;
&lt;br /&gt;
            用于以文本模式连接到计算机的设备（更准确的定义请参见相应的[http://en.wikipedia.org/wiki/Computer_terminal 维基百科条目]），或在本教程中仅指以文本模式访问SDF的窗口。如果你使用的是Windows系统，这可能是Telnet窗口（或建议使用PuTTY通过SSH进行安全连接——即使不属于ARPA，这也同样可行），而在Linux机器上则是一个xterm窗口。&lt;br /&gt;
&lt;br /&gt;
upload （上传）&lt;br /&gt;
&lt;br /&gt;
            将数据从本地机器传输到SDF；请参阅下载（download）。&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: filetransfer.html,v 1.17 2020/01/01 22:27:19 niro Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=SDF_%E4%B8%AD%E7%9A%84%E5%8D%B3%E6%97%B6%E4%BF%A1%E6%81%AF&amp;diff=138</id>
		<title>SDF 中的即时信息</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=SDF_%E4%B8%AD%E7%9A%84%E5%8D%B3%E6%97%B6%E4%BF%A1%E6%81%AF&amp;diff=138"/>
		<updated>2025-08-20T05:52:49Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在 SDF 中，您可以通过快速高效的文本客户端使用几乎所有流行的即时通讯协议。许多用户已经设置了脚本，以便通过电脑或无线设备（如双向寻呼机、黑莓、掌上电脑和手机）使用各种即时通讯客户端，您也可以这样做。&lt;br /&gt;
&lt;br /&gt;
本页中列出的一些客户端可同时连接到各种 IM （即时通讯）网络，如 centerim 和 finch（基于purple/pidgin）。本页提供了网页链接，其中包含使用 SDF 可用的客户端连接到各种 IM 网络的详细步骤。&lt;br /&gt;
&lt;br /&gt;
此外，有些客户端维护得不是很积极，因此可能无法连接到它们声称可以连接的网络，最好的选择是 centerim 和 finch。&lt;br /&gt;
&lt;br /&gt;
== 可用的客户端 ==&lt;br /&gt;
(+) 表示在 AMD64 主机中可用。(*) 表示在 Alpha 主机中可用。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!bsflite (+)&lt;br /&gt;
!centericq (+)&lt;br /&gt;
!centerim&lt;br /&gt;
!ekg (+)&lt;br /&gt;
!finch (*)&lt;br /&gt;
!naim (+)&lt;br /&gt;
!mcabber (+)&lt;br /&gt;
|-&lt;br /&gt;
|AIM&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gadu-Gadu&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[SDF 中的 Jabber|Jabber/XMMP]]&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|-&lt;br /&gt;
|[[从 SDF 连接到 MSN 即时通信网络|MSN]]&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|YAHOO&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ICQ&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|✓&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bitlbee ==&lt;br /&gt;
Bitlbee 是连接 MSN、ICQ、Jabber、Yahoo 和 AIM 的 IRC 网关。它允许你使用 IRC 客户端连接到这些服务。&lt;br /&gt;
&lt;br /&gt;
# 使用您最喜欢的 irc 客户端连接到 im.bitlbee.org。&lt;br /&gt;
# 对root用户名说 &amp;quot;help&amp;quot;，或直接输入 help。您所需要的一切都在这里。&lt;br /&gt;
&lt;br /&gt;
== 可用的即时IM库列表 ==&lt;br /&gt;
* p5-Net-AIM-1.22 - 实现 AOL Instant Messenger TOC 协议&lt;br /&gt;
* libyahoo-0.18.4 - Yahoo! Messenger 客户端库&lt;br /&gt;
* ......&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: InstantMessaging.html,v 1.2 2013/07/17 03:16:52 tcj Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=SDF_SSH_%E4%B8%BB%E6%9C%BA%E5%AF%86%E9%92%A5&amp;diff=137</id>
		<title>SDF SSH 主机密钥</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=SDF_SSH_%E4%B8%BB%E6%9C%BA%E5%AF%86%E9%92%A5&amp;diff=137"/>
		<updated>2025-08-20T05:52:24Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;注：最后由 voidn 于 2018 年 3 月 10 日编辑&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注：任何 MetaARPA 成员都可以编辑此页面，请注意这一点。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== 服务器 ==&lt;br /&gt;
&lt;br /&gt;
=== 主群组 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|tty.sdf.org&lt;br /&gt;
|循环&lt;br /&gt;
|-&lt;br /&gt;
|sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|faeroes.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|otaku.sdf.org&lt;br /&gt;
|faeroes.sdf.org&lt;br /&gt;
|-&lt;br /&gt;
|ukato.sdf.org&lt;br /&gt;
|无响应&lt;br /&gt;
|-&lt;br /&gt;
|norge.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|bjork.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|miku.sdf.org&lt;br /&gt;
|bjork.sdf.org&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
ED25519 key fingerprint is SHA256:ZjwbO7AU8rHJExYrmZS2LqGZ7WfdoELfMrF54W92PYA.&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|    ...          |&lt;br /&gt;
|   .oo o         |&lt;br /&gt;
|   .=.*          |&lt;br /&gt;
|  . .* B         |&lt;br /&gt;
| = o  O S.       |&lt;br /&gt;
|+ + o.o*E=.      |&lt;br /&gt;
| o o O.++  o     |&lt;br /&gt;
|  o X = +.. o    |&lt;br /&gt;
|   + + +..   .   |&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
~ -&amp;gt; ssh-keyscan tty.sdf.org&lt;br /&gt;
# tty.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
tty.sdf.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1BBSaTBrKjpyDmIPt1t9oPvZpIxzm8D2kB/eLUoqXP9Eoicb3niMP8kWv1vhZQPGiQQ/q6sg+c92Bkk0ZiJTW9JdMJuaIfk+VDjGUV1US432mzq4581CFk/Q0HeHehrrAoqCKTcnp65/9UlnP3ljnyS1J0JE40YtjLIXfAeoJJKfKvrMhc1nOqn7NEMcmN8gY5ELr5R5ZUml0CsmurMDeIoeP9Ukf0PAc6uznv7JpL5GY+Eee8xXd8ehClZUY9kkvm6a6LIzPXtG5KXIYbGQkMrcDqWAdYOb2whfOICRbRLu16T8r30NjdHRjDq2kAH7upip4FqWGj96k+8ZmjA3f&lt;br /&gt;
# tty.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
# tty.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
tty.sdf.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJJk3a190w/1TZkzVKORvz/kwyKmFY144lVeDFm80p17&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ARPA ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|arpa.sdf.org&lt;br /&gt;
|ARPA循环&lt;br /&gt;
|}&lt;br /&gt;
注：目前仅指向主群组&lt;br /&gt;
&lt;br /&gt;
=== MetaARPA ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|meta.sdf.org&lt;br /&gt;
|MetaARPA循环&lt;br /&gt;
|-&lt;br /&gt;
|iceland.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sverige.sdf.org&lt;br /&gt;
|iceland.sdf.org&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
ED25519 key fingerprint is SHA256:ZjwbO7AU8rHJExYrmZS2LqGZ7WfdoELfMrF54W92PYA.&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|    ...          |&lt;br /&gt;
|   .oo o         |&lt;br /&gt;
|   .=.*          |&lt;br /&gt;
|  . .* B         |&lt;br /&gt;
| = o  O S.       |&lt;br /&gt;
|+ + o.o*E=.      |&lt;br /&gt;
| o o O.++  o     |&lt;br /&gt;
|  o X = +.. o    |&lt;br /&gt;
|   + + +..   .   |&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
~ -&amp;gt; ssh-keyscan meta.sdf.org&lt;br /&gt;
# meta.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
meta.sdf.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1BBSaTBrKjpyDmIPt1t9oPvZpIxzm8D2kB/eLUoqXP9Eoicb3niMP8kWv1vhZQPGiQQ/q6sg+c92Bkk0ZiJTW9JdMJuaIfk+VDjGUV1US432mzq4581CFk/Q0HeHehrrAoqCKTcnp65/9UlnP3ljnyS1J0JE40YtjLIXfAeoJJKfKvrMhc1nOqn7NEMcmN8gY5ELr5R5ZUml0CsmurMDeIoeP9Ukf0PAc6uznv7JpL5GY+Eee8xXd8ehClZUY9kkvm6a6LIzPXtG5KXIYbGQkMrcDqWAdYOb2whfOICRbRLu16T8r30NjdHRjDq2kAH7upip4FqWGj96k+8ZmjA3f&lt;br /&gt;
# meta.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
# meta.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
meta.sdf.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJJk3a190w/1TZkzVKORvz/kwyKmFY144lVeDFm80p17&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MetaArray ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|ma.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
Host key fingerprint is SHA256:y5Jlsy7a6mkXtg1SmiDzpQ+yPi803WI6XB8/LtE3nKQ&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|o . . .  .       |&lt;br /&gt;
| +.+.+. S .      |&lt;br /&gt;
|.o+=+++E O       |&lt;br /&gt;
|oo=ooo*== .      |&lt;br /&gt;
|.*  o=+=.        |&lt;br /&gt;
|..=+=++oo        |&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
~ -&amp;gt; ssh-keyscan ma.sdf.org&lt;br /&gt;
# ma.sdf.org:22 SSH-2.0-OpenSSH_7.3&lt;br /&gt;
ma.sdf.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFnvCWbDAaabapuFHvCl+J20d9gyCrNfR7XNw0KL4b/O&lt;br /&gt;
# ma.sdf.org:22 SSH-2.0-OpenSSH_7.3&lt;br /&gt;
ma.sdf.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI7XSc6kLOWbiaXaOT3wzHqmmmFNLcJ3Q3THMRY6eYv1WDnKf+NoOW15uFocVsjVYPHPsJ/2LM6TWL9M6dOc3ankY9D/4IXug6cpugbCfy6xJKCWN66WrIImAfGvFiXJjzOOryaa5ZFldbifZmIUa/Bx3tZJpNE1jZjlulGpQQoDGHK8gdrzQFNAWt+0flZFU/KA4DWAIl89hXccuXLkcpLXoGlIbqsigwXD33WAv1ttoUOdC/QjMO1nb764G5oMLCusBbLFLJsvTNZ1PzsYX2ivignh5GSXSiqm/77zr8ok+DPBTDx7LTyN2koikSwV+hev6+y5JsFUzGdqFYbV2x&lt;br /&gt;
# ma.sdf.org:22 SSH-2.0-OpenSSH_7.3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=SDF_SSH_%E4%B8%BB%E6%9C%BA%E5%AF%86%E9%92%A5&amp;diff=136</id>
		<title>SDF SSH 主机密钥</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=SDF_SSH_%E4%B8%BB%E6%9C%BA%E5%AF%86%E9%92%A5&amp;diff=136"/>
		<updated>2025-08-20T05:51:53Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;注：最后由 voidn 于 2018 年 3 月 10 日编辑&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注：任何 MetaARPA 成员都可以编辑此页面，请注意这一点。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== 服务器 ==&lt;br /&gt;
&lt;br /&gt;
=== 主群组 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|tty.sdf.org&lt;br /&gt;
|循环&lt;br /&gt;
|-&lt;br /&gt;
|sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|faeroes.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|otaku.sdf.org&lt;br /&gt;
|faeroes.sdf.org&lt;br /&gt;
|-&lt;br /&gt;
|ukato.sdf.org&lt;br /&gt;
|无响应&lt;br /&gt;
|-&lt;br /&gt;
|norge.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|bjork.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|miku.sdf.org&lt;br /&gt;
|bjork.sdf.org&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
ED25519 key fingerprint is SHA256:ZjwbO7AU8rHJExYrmZS2LqGZ7WfdoELfMrF54W92PYA.&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|    ...          |&lt;br /&gt;
|   .oo o         |&lt;br /&gt;
|   .=.*          |&lt;br /&gt;
|  . .* B         |&lt;br /&gt;
| = o  O S.       |&lt;br /&gt;
|+ + o.o*E=.      |&lt;br /&gt;
| o o O.++  o     |&lt;br /&gt;
|  o X = +.. o    |&lt;br /&gt;
|   + + +..   .   |&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
~ -&amp;gt; ssh-keyscan tty.sdf.org&lt;br /&gt;
# tty.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
tty.sdf.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1BBSaTBrKjpyDmIPt1t9oPvZpIxzm8D2kB/eLUoqXP9Eoicb3niMP8kWv1vhZQPGiQQ/q6sg+c92Bkk0ZiJTW9JdMJuaIfk+VDjGUV1US432mzq4581CFk/Q0HeHehrrAoqCKTcnp65/9UlnP3ljnyS1J0JE40YtjLIXfAeoJJKfKvrMhc1nOqn7NEMcmN8gY5ELr5R5ZUml0CsmurMDeIoeP9Ukf0PAc6uznv7JpL5GY+Eee8xXd8ehClZUY9kkvm6a6LIzPXtG5KXIYbGQkMrcDqWAdYOb2whfOICRbRLu16T8r30NjdHRjDq2kAH7upip4FqWGj96k+8ZmjA3f&lt;br /&gt;
# tty.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
# tty.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
tty.sdf.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJJk3a190w/1TZkzVKORvz/kwyKmFY144lVeDFm80p17&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ARPA ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|arpa.sdf.org&lt;br /&gt;
|ARPA循环&lt;br /&gt;
|}&lt;br /&gt;
注：目前仅指向主群组&lt;br /&gt;
&lt;br /&gt;
==== MetaARPA ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|meta.sdf.org&lt;br /&gt;
|MetaARPA循环&lt;br /&gt;
|-&lt;br /&gt;
|iceland.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|sverige.sdf.org&lt;br /&gt;
|iceland.sdf.org&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
ED25519 key fingerprint is SHA256:ZjwbO7AU8rHJExYrmZS2LqGZ7WfdoELfMrF54W92PYA.&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|    ...          |&lt;br /&gt;
|   .oo o         |&lt;br /&gt;
|   .=.*          |&lt;br /&gt;
|  . .* B         |&lt;br /&gt;
| = o  O S.       |&lt;br /&gt;
|+ + o.o*E=.      |&lt;br /&gt;
| o o O.++  o     |&lt;br /&gt;
|  o X = +.. o    |&lt;br /&gt;
|   + + +..   .   |&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
~ -&amp;gt; ssh-keyscan meta.sdf.org&lt;br /&gt;
# meta.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
meta.sdf.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1BBSaTBrKjpyDmIPt1t9oPvZpIxzm8D2kB/eLUoqXP9Eoicb3niMP8kWv1vhZQPGiQQ/q6sg+c92Bkk0ZiJTW9JdMJuaIfk+VDjGUV1US432mzq4581CFk/Q0HeHehrrAoqCKTcnp65/9UlnP3ljnyS1J0JE40YtjLIXfAeoJJKfKvrMhc1nOqn7NEMcmN8gY5ELr5R5ZUml0CsmurMDeIoeP9Ukf0PAc6uznv7JpL5GY+Eee8xXd8ehClZUY9kkvm6a6LIzPXtG5KXIYbGQkMrcDqWAdYOb2whfOICRbRLu16T8r30NjdHRjDq2kAH7upip4FqWGj96k+8ZmjA3f&lt;br /&gt;
# meta.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
# meta.sdf.org:22 SSH-2.0-OpenSSH_7.1&lt;br /&gt;
meta.sdf.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJJk3a190w/1TZkzVKORvz/kwyKmFY144lVeDFm80p17&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MetaArray ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!主机&lt;br /&gt;
!重定向&lt;br /&gt;
|-&lt;br /&gt;
|ma.sdf.org&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
Host key fingerprint is SHA256:y5Jlsy7a6mkXtg1SmiDzpQ+yPi803WI6XB8/LtE3nKQ&lt;br /&gt;
+--[ED25519 256]--+&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|o . . .  .       |&lt;br /&gt;
| +.+.+. S .      |&lt;br /&gt;
|.o+=+++E O       |&lt;br /&gt;
|oo=ooo*== .      |&lt;br /&gt;
|.*  o=+=.        |&lt;br /&gt;
|..=+=++oo        |&lt;br /&gt;
+----[SHA256]-----+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
~ -&amp;gt; ssh-keyscan ma.sdf.org&lt;br /&gt;
# ma.sdf.org:22 SSH-2.0-OpenSSH_7.3&lt;br /&gt;
ma.sdf.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFnvCWbDAaabapuFHvCl+J20d9gyCrNfR7XNw0KL4b/O&lt;br /&gt;
# ma.sdf.org:22 SSH-2.0-OpenSSH_7.3&lt;br /&gt;
ma.sdf.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI7XSc6kLOWbiaXaOT3wzHqmmmFNLcJ3Q3THMRY6eYv1WDnKf+NoOW15uFocVsjVYPHPsJ/2LM6TWL9M6dOc3ankY9D/4IXug6cpugbCfy6xJKCWN66WrIImAfGvFiXJjzOOryaa5ZFldbifZmIUa/Bx3tZJpNE1jZjlulGpQQoDGHK8gdrzQFNAWt+0flZFU/KA4DWAIl89hXccuXLkcpLXoGlIbqsigwXD33WAv1ttoUOdC/QjMO1nb764G5oMLCusBbLFLJsvTNZ1PzsYX2ivignh5GSXSiqm/77zr8ok+DPBTDx7LTyN2koikSwV+hev6+y5JsFUzGdqFYbV2x&lt;br /&gt;
# ma.sdf.org:22 SSH-2.0-OpenSSH_7.3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=COM%E4%B8%8D%E6%98%AFIRC&amp;diff=135</id>
		<title>COM不是IRC</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=COM%E4%B8%8D%E6%98%AFIRC&amp;diff=135"/>
		<updated>2025-08-20T05:51:18Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 目录 ==&lt;br /&gt;
* 什么是COM？&lt;br /&gt;
* 开始&lt;br /&gt;
* FAQ&lt;br /&gt;
* 常用COM命令&lt;br /&gt;
&lt;br /&gt;
== 什么是COM？ ==&lt;br /&gt;
于是，你在命令提示符下输入 &amp;quot;&amp;lt;code&amp;gt;irc&amp;lt;/code&amp;gt;&amp;quot;，希望加入你最喜欢的频道，结果却发现自己来到了一个陌生的世界，说话要按空格，你期待的命令不起作用，你甚至不知道如何退出（提示：试试 &amp;quot;&#039;&#039;&#039;q&#039;&#039;&#039;&amp;quot;）。这就是 &amp;quot;COM&amp;quot;（又名 &amp;quot;COMMODE &amp;quot;或简称 &amp;quot;com&amp;quot;）。&lt;br /&gt;
&lt;br /&gt;
COM 是 SDF 独有的聊天程序。其原始版本可追溯到 1994 年，此后一直在 SDF 服务器上开发和使用。它与 &amp;quot;&amp;lt;code&amp;gt;bboard&amp;lt;/code&amp;gt;&amp;quot;论坛一起成为 SDF 用户相互交流的主要方式之一。有些功能您可能在其他程序中熟悉过，但许多功能对您来说是全新的。最值得注意的是，COM 是命令驱动的，这意味着您默认处于 &amp;quot;命令模式&amp;quot;，必须按一个键（空格键或回车键）才能进行对话。有关其他命令&amp;lt;!-- 待编辑 --&amp;gt;，请参见下文，所有这些命令都可以在命令模式下简单输入。&lt;br /&gt;
&lt;br /&gt;
那么，为什么您在期待 IRC 时却收到了 COM？出于安全和滥用的考虑，除非您是 ARPA 或更高级别的会员，否则不允许访问 IRC。如果你正在阅读这篇文章，那么你很可能不是。因此，当您在 shell 中输入&amp;quot;&amp;lt;code&amp;gt;irc&amp;lt;/code&amp;gt;&amp;quot;时，COM 将被启动。这让新用户有机会与其他 SDF 用户互动，并有希望回答他们可能提出的一些问题。与 IRC 不同，COM 不基于网络，只有当前登录 SDF 的用户才能使用。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;应牢记的基本礼仪规则：&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 许多人在 com 中挂机。您可以用 &amp;quot;&#039;&#039;&#039;I&#039;&#039;&#039;&amp;quot;查看已挂机时长。如果房间里安静了一段时间，可以打声招呼，但要给别人反应的时间。如果你没有读过教程，你可能会得到一些粗糙的回复，而你现在可能就在这里读这篇文章。欢迎您的到来。:)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;不该做的事：&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* 询问如何 &amp;quot;骇入&amp;quot;（hack）&lt;br /&gt;
* 尝试使用任何 IRC 命令（它们不会起作用，而且会让你看起来很傻）&lt;br /&gt;
* 重复问同样的问题&lt;br /&gt;
&lt;br /&gt;
== 入门：指南 ==&lt;br /&gt;
COM 以 &amp;quot;聊天室&amp;quot; 为基础。启动程序时进入的默认聊天室是 &amp;quot;大厅&amp;quot;（lobby），即 SDF 的欢迎室。&lt;br /&gt;
&lt;br /&gt;
在命令行中键入 &amp;lt;code&amp;gt;com&amp;lt;/code&amp;gt; 启动 com。com 启动后，您将进入 &amp;quot;大厅&amp;quot;。系统将显示用户列表。您还将进入&#039;&#039;&#039;命令&#039;&#039;&#039;模式。在&#039;&#039;&#039;命令&#039;&#039;&#039;模式下，您只能看到光标，而不会出现提示。命令模式允许运行命令，例如查看用户列表。&lt;br /&gt;
&lt;br /&gt;
在&#039;&#039;&#039;命令&#039;&#039;&#039;模式下，键入 &#039;&#039;&#039;w&#039;&#039;&#039; 可查看&#039;&#039;&#039;用户列表&#039;&#039;&#039;、所在房间的名称以及&#039;&#039;&#039;位置&#039;&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
输出结果如下&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
  [you are in &#039;spacebar&#039; among 1]&lt;br /&gt;
&lt;br /&gt;
  wliao@iceland&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;现在，输入 &#039;&#039;&#039;l&#039;&#039;&#039;（小写 L），查看房间列表。输出结果如下&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
    room-name   #    created      time  topic&lt;br /&gt;
    --------------------------------------------------------------------------------&lt;br /&gt;
    spacebar    16   22-Aug-16  08:49:32  there is life out there&lt;br /&gt;
    lobby       1    09-Sep-16  08:49:13  SDF&#039;s Welcoming Room&lt;br /&gt;
    anonradio   19   09-Sep-16  04:11:06  DJ Kumata!&lt;br /&gt;
    --------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;看来 &amp;quot;spacebar&amp;quot;房间里有很多用户。我们也来凑凑热闹吧。输入 &#039;&#039;&#039;g&#039;&#039;&#039; 以及要加入的房间名称。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
:goto&amp;gt; spacebar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;进入聊天室后，将显示用户列表。现在，让我们在聊天室内和大家打个招呼吧。&lt;br /&gt;
&lt;br /&gt;
按一下&#039;&#039;&#039;空格键&#039;&#039;&#039;进入输入模式。进入输入模式后，会出现&#039;&#039;&#039;用户名提示&#039;&#039;&#039;。向世界说 &amp;quot;你好&amp;quot;，然后用回车键结束该行。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
[wliao]    hello world!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;接下来你可能想知道的是，在你进入之前大家都聊了些什么，这样你就可以加入聊天了。键入 &#039;&#039;&#039;r&#039;&#039;&#039;，就能看到一个简短的 18 行，显示最后说了什么的 &amp;quot;r&amp;quot;eview。如果您想了解更多内容，请按 &#039;&#039;&#039;R&#039;&#039;&#039;，您会看到这样的提示：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
:lines&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;只需键入您感兴趣的行数，然后用回车键结束；就会滚动显示你所键入长度的历史记录。&lt;br /&gt;
&lt;br /&gt;
准备退出时，键入 &#039;&#039;&#039;q&#039;&#039;&#039; 离开 com。您将看到一条 &amp;lt;code&amp;gt;Unlinking TTY ...&amp;lt;/code&amp;gt; 消息。&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
如何在 com 中使用退格键？&lt;br /&gt;
&lt;br /&gt;
      尝试在 com 的命令模式下切换行为。或者使用 stty 或 &amp;quot;bksp&amp;quot; 来正确设置退格。&lt;br /&gt;
&lt;br /&gt;
怎样才能多次出现在 com 中？&lt;br /&gt;
&lt;br /&gt;
      基本规则是在输入 com 时处于不同的服务器上。一些常用的方法是使用 screen、运行两次 ssh 等。&lt;br /&gt;
&lt;br /&gt;
如何发送私人信息？&lt;br /&gt;
&lt;br /&gt;
      在命令模式下使用 s 命令：&amp;lt;code&amp;gt;&#039;&#039;&#039;s&#039;&#039;&#039;user@host&amp;lt;/code&amp;gt;。请注意 @host 部分；这是命令的必备元素。如果用户在其他房间，可添加一个可选的主机参数来发送信息：&amp;lt;code&amp;gt;suser@host room&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
如何查看过去发生的事情？&lt;br /&gt;
&lt;br /&gt;
      使用 r 键回顾。使用 R 后键入的数字可以控制要查看多少行历史记录。使用 p 键可以查看另一个房间的历史记录：&amp;lt;code&amp;gt;p 房间名&amp;lt;/code&amp;gt;。p 命令还可以选择要显示的行数：&amp;lt;code&amp;gt;p 房间名 行数&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
如何看到另一个房间内有谁？&lt;br /&gt;
&lt;br /&gt;
使用 &#039;&#039;&#039;W&#039;&#039;&#039;（大写的 w）来查看另一个房间里有谁。&lt;br /&gt;
&lt;br /&gt;
我看到 &amp;lt;code&amp;gt;&amp;lt;wliao@iceland DUMPs in 22 characters of 2 words in 3 lines&amp;gt;&amp;lt;/code&amp;gt;。这是什么意思？&lt;br /&gt;
&lt;br /&gt;
使用 &#039;&#039;&#039;r&#039;&#039;&#039; 或 &#039;&#039;&#039;R&#039;&#039;&#039; 命令。&lt;br /&gt;
&lt;br /&gt;
我看到 &amp;lt;code&amp;gt;&amp;lt;wliao appears&amp;gt;&amp;lt;/code&amp;gt;。该如何做到？&lt;br /&gt;
&lt;br /&gt;
在命令模式下使用 &#039;&#039;&#039;e&#039;&#039;&#039;mote 命令。在提示符后输入 e 后跟操作：&amp;lt;code&amp;gt;:emote&amp;gt; tests this out&amp;lt;/code&amp;gt; 。&lt;br /&gt;
&lt;br /&gt;
为什么我必须一直按空格键才能说话？&lt;br /&gt;
&lt;br /&gt;
其他键也可以用来进入输入模式。试试看 &#039;&#039;&#039;h&#039;&#039;&#039; 查看哪些键未被使用，例如回车键。&lt;br /&gt;
&lt;br /&gt;
我该如何删除一行？&lt;br /&gt;
&lt;br /&gt;
使用 ^u（control+u）来删除整行。^w（control+w）将删除一个单词。&lt;br /&gt;
&lt;br /&gt;
我不小心拉黑了一些人！我不是故意的:(&lt;br /&gt;
&lt;br /&gt;
&amp;quot;i&amp;quot;gnore（拉黑）相同的用户再次将其从黑名单中删除。&lt;br /&gt;
&lt;br /&gt;
为什么没人说话？&lt;br /&gt;
&lt;br /&gt;
这就是生活；坚强一点。&lt;br /&gt;
&lt;br /&gt;
== COM 命令 ==&lt;br /&gt;
这里列出了常用的 COM 命令。这仅涵盖基础内容，因此请参考在线帮助（使用&amp;quot;&#039;&#039;&#039;h&#039;&#039;&#039;&amp;quot;）或 man 页面获取更多信息。某些命令对预验证用户无法使用。&lt;br /&gt;
&lt;br /&gt;
* e - 表态&lt;br /&gt;
&lt;br /&gt;
* g - 去往某个房间&lt;br /&gt;
&lt;br /&gt;
* h - 命令帮助&lt;br /&gt;
&lt;br /&gt;
* I - 挂机用户查询&lt;br /&gt;
&lt;br /&gt;
* l - （小写的L）列出开放房间&lt;br /&gt;
&lt;br /&gt;
* L - 往com发布一个链接&lt;br /&gt;
&lt;br /&gt;
* p - 偷窥某个房间&lt;br /&gt;
&lt;br /&gt;
* q - 退出com&lt;br /&gt;
&lt;br /&gt;
* r - 房间历史消息&lt;br /&gt;
&lt;br /&gt;
* R - 扩展历史消息&lt;br /&gt;
&lt;br /&gt;
* s - 发送私信&lt;br /&gt;
&lt;br /&gt;
* w - (小写w) 当前房间内的人员&lt;br /&gt;
&lt;br /&gt;
* W - (大写w) 查看其他房间成员&lt;br /&gt;
&lt;br /&gt;
* - - (连字符) 在命令模式下输入可修复退格键（若退格键持续显示为^h或^?时使用）&lt;br /&gt;
&lt;br /&gt;
* + - 告诉你UTC时间&lt;br /&gt;
&lt;br /&gt;
* U - （大写U）显示其他用户加入时间及是否为ARPA或MetaArpa可激活用户&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;注意&#039;&#039;&#039;： 虽然你输入&amp;quot;com&amp;quot;来启动 com，但访问Man页面使用的是&amp;quot;man commode&amp;quot;&lt;br /&gt;
----&amp;lt;small&amp;gt;&#039;&#039;$Id: comnotirc.html,v 1.17 2018/04/30 13:20:33 wliao Exp $&#039;&#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=134</id>
		<title>从Shell中寻找帮助</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=134"/>
		<updated>2025-08-20T05:50:36Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;提示：你可以[[从Shell中寻找帮助#SDF 具体帮助|进一步]]查看 SDF 的具体帮助说明，如 FAQ！&lt;br /&gt;
&lt;br /&gt;
虽然 UNIX shell 看起来有点令人生畏和冰冷，它有两个字母的神秘命令、几十个命令行开关，而且没有动画回形针为你指明方向，但有几种不同的方法可以从系统中获得帮助。&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== 使用手册（Manpages） ==&lt;br /&gt;
&lt;br /&gt;
=== RTFMing 权威指南 ===&lt;br /&gt;
获取帮助的最简单、最全面的方法就是阅读手册。在使用电脑的过程中，你可能在某个地方听说过 RTFM（Read The Fscking Manual），这就是那本“手册”。Man页面是每种 UNIX 的标准文档形式。学会使用它们。学会爱护它们。&lt;br /&gt;
&lt;br /&gt;
在哪里可以找到它们？其实很简单。想想一个命令(ls、rm、chmod、kill、grep）或一个程序（vi、mutt、snarf、majordomo），然后继续键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中&amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt;正是你想了解的命令的名称。正如你所看到的，手册被分成不同的部分。我们以 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 为例。&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
     mkdir - make directories&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
     mkdir creates the directories named as operands, in the order specified,&lt;br /&gt;
     using mode rwxrwxrwx (0777) as modified by the current umask(2).&lt;br /&gt;
&lt;br /&gt;
     The options are as follows:&lt;br /&gt;
&lt;br /&gt;
     -m      Set the file permission bits of the final created directory to&lt;br /&gt;
             the specified mode.  The mode argument can be in any of the for-&lt;br /&gt;
             mats specified to the chmod(1) utility.  If a symbolic mode is&lt;br /&gt;
             specified, the operation characters ``+&#039;&#039; and ``-&#039;&#039; are inter-&lt;br /&gt;
             preted relative to an initial mode of ``a=rwx&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
     -p      Create intermediate directories as required.  If this option is&lt;br /&gt;
             not specified, the full path prefix of each operand must already&lt;br /&gt;
             exist.  Intermediate directories are created with permission bits&lt;br /&gt;
             of rwxrwxrwx (0777) as modified by the current umask, plus write&lt;br /&gt;
             and search permission for the owner.  Do not consider it an error&lt;br /&gt;
             if the argument directory already exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     The user must have write permission in the parent directory.&lt;br /&gt;
                                                                               &lt;br /&gt;
EXIT STATUS&lt;br /&gt;
     mkdir exits 0 if successful, and &amp;gt;0 if an error occurred.&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
STANDARDS&lt;br /&gt;
     The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2&#039;&#039;) compat-&lt;br /&gt;
     ible.&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;以下为说明的翻译&amp;lt;ref&amp;gt;以下翻译内容可以按照行数相互对照，便于理解。 --译者注&amp;lt;/ref&amp;gt;：&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
名称&lt;br /&gt;
     mkdir - 创建目录&lt;br /&gt;
&lt;br /&gt;
语法&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
描述&lt;br /&gt;
     使用mkdir按照指定对象的顺序创建目录，&lt;br /&gt;
     默认使用当前由umask规定的模式 rwxrwxrwx (0777)&lt;br /&gt;
&lt;br /&gt;
     可选项如下：&lt;br /&gt;
&lt;br /&gt;
     -m      将最终创建目录的文件权限设置为指定模式。 &lt;br /&gt;
             模式参数可以是为 chmod(1) 工具指定的任何模式。 &lt;br /&gt;
             如果指定的是符号模式，操作符 ``+&#039;&#039; 和 ``-&#039;&#039; 将&lt;br /&gt;
             相对于初始模式 ``a=rwx&#039;&#039; 进行解释。&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
     -p      根据需要创建中间目录。 如果未指定该选项，&lt;br /&gt;
             则每个操作数的完整路径前缀必须已经存在。 &lt;br /&gt;
             创建的中间目录权限为 rwxrwxrwx (0777)，&lt;br /&gt;
             由当前 umask 修改，外加所有者的写入和搜索权限。&lt;br /&gt;
             如果参数目录已经存在，则不视为错误。&lt;br /&gt;
                 译者注：比如命令 mkdir -p intermediate/name，&lt;br /&gt;
                 其中intermediate就为中间目录，若中间目录不存在则创建一个。&lt;br /&gt;
                 若不加参数 -p 则会报错。&lt;br /&gt;
     用户必须有写入父目录的权限。&lt;br /&gt;
                                                                               &lt;br /&gt;
退出状态&lt;br /&gt;
     mkdir 如果成功则退出 0，如果出错则退出 &amp;gt;0。&lt;br /&gt;
&lt;br /&gt;
也请看&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
标准&lt;br /&gt;
     mkdir 工具有望与 IEEE Std 1003.2（&amp;quot;POSIX.2&amp;quot;）兼容。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;对于我们的 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 命令，显示的 man 页面有六个部分：名称（NAME）、语法（SYNOPSIS）、描述（DESCRIPTION）、退出状态（EXIT STATUS）、另见（SEE ALSO）和标准（STANDARDS）。NAME 部分只显示命令名称及其功能的简短描述。SYNOPSIS 部分简要介绍了命令的语法，以便查看输入的命令应该是什么样子。方括号 [ ] 中的项目为可选项。DESCRIPTION 部分详细描述了命令的工作原理，包括命令的各种选项或模式。退出状态（EXIT STATUS）部分描述了命令完成后（成功或失败）生成的状态代码。程序（如 shell 脚本）可以读取这些代码，以确定如何对命令结果做出反应。SEE ALSO 提供了相关命令或其他可能有用命令的交叉参考信息。最后，STANDARDS 部分列出了该命令符合哪些标准的信息。&lt;br /&gt;
&lt;br /&gt;
Man页面分为九个章节：&lt;br /&gt;
&lt;br /&gt;
# 用户指令（User commands)&lt;br /&gt;
# 系统调用和错误编号（System calls and error numbers）&lt;br /&gt;
# C 库中的函数 （Functions in the C libraries）&lt;br /&gt;
# 设备驱动程序 （Device drivers）&lt;br /&gt;
# 文件格式 （File formats）&lt;br /&gt;
# 游戏和其他娱乐 （Games and other diversions）&lt;br /&gt;
# 杂项信息 （Miscellaneous information）&lt;br /&gt;
# 系统维护和操作命令 （System maintenance and operation commands）&lt;br /&gt;
# 内核开发人员 （Kernal developers）&lt;br /&gt;
&lt;br /&gt;
在某些情况下，同一主题会出现在手册的多个章节中。例如，有一个 chmod 用户命令和一个 chmod() 系统调用。如何找到相应的 man 页？您可以告诉 man 您要查找的章节。如果你想查找用户命令，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man 1 chmod&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将显示用户命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 的Man页面。对具体章节的引用通常放在命令名称后面的括号中，如：chmod(1)&lt;br /&gt;
&lt;br /&gt;
如果你知道命令的名称，这一切都很好，但如果你记不住名称呢？&amp;lt;code&amp;gt;man -k&amp;lt;/code&amp;gt;可以用来搜索命令描述中的关键字。因此，如果你想查找邮件程序，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man -k editor&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;屏幕上将显示一系列关键字为 &amp;quot;editor&amp;quot;（编辑器）的命令。&lt;br /&gt;
&lt;br /&gt;
== GNU 的 Info 系统 ==&lt;br /&gt;
对于 GNU 项目的程序，也可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 命令。如果你知道程序的名称，可以将其作为参数（就像使用 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 命令一样）。&lt;br /&gt;
&lt;br /&gt;
事实上，你可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 作为 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 的别名，因为 info 阅读器如果找不到 info 条目，就会直接显示 man 页面（但你不能指定 manpage 的章节）。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
不过，标准信息阅读器的导航方式有所不同，因为它是基于 &amp;lt;code&amp;gt;emacs&amp;lt;/code&amp;gt; 文本编辑器的。&lt;br /&gt;
&lt;br /&gt;
快速按键帮助（更多信息，请查阅 &amp;lt;code&amp;gt;info info&amp;lt;/code&amp;gt;）：&lt;br /&gt;
&lt;br /&gt;
SPACE, BACKSPACE&lt;br /&gt;
&lt;br /&gt;
            向前翻页，向后翻页&lt;br /&gt;
&lt;br /&gt;
TAB&lt;br /&gt;
&lt;br /&gt;
            将光标放到下一个菜单项或链接上（信息文件有超链接）&lt;br /&gt;
&lt;br /&gt;
RETURN&lt;br /&gt;
&lt;br /&gt;
            跳转到光标所在链接指向的位置&lt;br /&gt;
&lt;br /&gt;
l（是字母ell）&lt;br /&gt;
&lt;br /&gt;
            回到上次开始跳转的位置&lt;br /&gt;
&lt;br /&gt;
u n p&lt;br /&gt;
&lt;br /&gt;
            上一个(up)、下一个(next)、先前(previous)节点（信息文件采用分层结构）&lt;br /&gt;
&lt;br /&gt;
q&lt;br /&gt;
&lt;br /&gt;
            退出(quit)信息阅读器&lt;br /&gt;
&lt;br /&gt;
在大多数终端上，您还可以使用光标（箭头）进行移动。&lt;br /&gt;
&lt;br /&gt;
== SDF 具体帮助 ==&lt;br /&gt;
SDF 中还有许多工具可以用来获取更多帮助。在 shell 提示下键入以下命令。&lt;br /&gt;
&lt;br /&gt;
help&lt;br /&gt;
&lt;br /&gt;
            SDF 帮助系统。&lt;br /&gt;
&lt;br /&gt;
FAQ&lt;br /&gt;
&lt;br /&gt;
            常见问题集。键入 &amp;quot;g&amp;quot; 进入主题，键入 &amp;quot;l&amp;quot; 列出主题中的问题，键入 &amp;quot;t&amp;quot; 阅读常见问题解答。FAQ也可在 [https://sdf.org/?faq SDF 网站]上找到。&lt;br /&gt;
&lt;br /&gt;
helpdesk&lt;br /&gt;
&lt;br /&gt;
            如果您在man、help、FAQ或谷歌搜索中找不到答案，请向helpdesk帮助台提出问题，友好的社区成员会回答您的问题。任何具有 ARPA 身份的成员都可以作为服务员登录回答问题。请注意：您只能在帮助台发布与 SDF 系统直接相关的问题，而不能发布与一般 UNIX、编程或园艺相关的问题，这些问题属于 bboard！&lt;br /&gt;
&lt;br /&gt;
bboard&lt;br /&gt;
&lt;br /&gt;
            要进入 SDF 公告板系统 (BBOARD)，请在命令行键入 bboard。在 bboard 命令提示符下键入 h 和 ? 或在 [[Bboard|bboard 教程]]中，可以找到有关使用 BBOARD 的帮助。如果您有关于使用 SDF 系统的一般问题，请在 HELPDESK 中发帖。如果您有需要管理员干预的问题（如软件请求或会员询问），请在 REQUESTS 发帖询问。&lt;br /&gt;
&lt;br /&gt;
com&lt;br /&gt;
&lt;br /&gt;
            Com 和 bboard 是 SDF 社区的聚会场所。您也可以在那里提出您的问题。Bboard 和 faq 具有相同的界面。请参阅 [[COM不是IRC|COM 不是 IRC]] 了解如何使用 com。&lt;br /&gt;
&lt;br /&gt;
当然还有你现在正在阅读的教程，目录顶部链接为&amp;lt;nowiki/&amp;gt;http://sdf.org/index.cgi?tutorials&amp;lt;nowiki/&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&#039;&#039;$Id: fi&#039;&#039;&amp;lt;nowiki/&amp;gt;&amp;lt;nowiki/&amp;gt;&#039;&#039;ndinghelp.html,v 1.12 2024/07/24 2&#039;&#039;&amp;lt;nowiki/&amp;gt;&amp;lt;nowiki/&amp;gt;&#039;&#039;0:26:38 cseiler Exp $&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=133</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=133"/>
		<updated>2025-08-20T05:49:25Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 导言 ==&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
== 权限 ==&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
== 权限类型 ==&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
=== 用户类别 ===&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 举例说明 ===&lt;br /&gt;
&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;br /&gt;
&lt;br /&gt;
目录&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户&amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt;可以在&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;目录中列出、添加和删除文件，访问该目录的子目录结构，或将该目录设为工作目录。属于&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt;组的用户及其他所有用户可以列出该目录中的文件，访问其子目录结构或将该目录设为工作目录，但无法添加或删除文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt; 文件的内容，或从命令行执行该文件（文件内容为可能为可执行二进制文件或脚本）。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组的用户可以查看或执行该文件，但无法修改它。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt; 文件的内容。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组中的用户可以查看该文件。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
=== 链接和权限 ===&lt;br /&gt;
一般来说，上述讨论也适用于硬链接和符号链接。文件系统会自动维护链接，以确保链接与目标文件具有相同的有效权限。（对于符号链接，&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令会显示一个文件模式，其中所有用户类别的权限类型均已分配，但当通过链接请求文件访问时，将应用目标文件的权限。）&lt;br /&gt;
&lt;br /&gt;
然而，在某些配置下，硬链接可以绕过目录 &#039;&#039;&#039;x&#039;&#039;&#039; 的权限限制。假设用户对文件 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt; 具有访问权限，而该文件在目录 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的子树之外有一个硬链接 &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt;。如果用户失去了对 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的 &#039;&#039;&#039;x&#039;&#039;&#039; 权限，他将无法访问 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt;，&#039;&#039;但仍可通过硬链接&#039;&#039; &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt; &#039;&#039;使用其原始权限访问同一文件&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
== 更改权限… ==&lt;br /&gt;
&lt;br /&gt;
权限通过命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 更改：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod &amp;lt;permission-mode&amp;gt; &amp;lt;file-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;让我们来看这个例子，&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这个数字644代表什么？&lt;br /&gt;
&lt;br /&gt;
== …解释了 ==&lt;br /&gt;
权限模式是九个文件模式权限标志的数字表示形式。如前所述，存在三种权限类型和三种用户类别。每个数字代表分配给特定用户类别的权限类型。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&lt;br /&gt;
!用户类别：&lt;br /&gt;
!u&lt;br /&gt;
!g&lt;br /&gt;
!o&lt;br /&gt;
|-&lt;br /&gt;
!权限代码：&lt;br /&gt;
|6&lt;br /&gt;
|4&lt;br /&gt;
|4&lt;br /&gt;
|}&lt;br /&gt;
每个用户类别的最终权限代码，是通过将该类别被授予的权限类型对应数值相加得出的：读权限（&#039;&#039;&#039;r&#039;&#039;&#039;）对应4，写权限（&#039;&#039;&#039;w&#039;&#039;&#039;）对应2，执行权限（&#039;&#039;&#039;x&#039;&#039;&#039;）对应1。&lt;br /&gt;
&lt;br /&gt;
在上述示例中，我希望文件 &amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt; 对所有用户可读，但仅对我可写。因此权限代码应如下所示：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!用户类别&lt;br /&gt;
!权限类型&lt;br /&gt;
!权限代码&lt;br /&gt;
|-&lt;br /&gt;
!u (我自己)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4), &#039;&#039;&#039;w&#039;&#039;&#039; (2)&lt;br /&gt;
|4 + 2 = &#039;&#039;&#039;6&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!g (组)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!o (其他)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
因此：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;即可！&lt;br /&gt;
&lt;br /&gt;
== …另一种方式 ==&lt;br /&gt;
&amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 支持一种用于指定权限模式的替代语法，这种语法在一次更改一个或几个权限时更加方便，且比上文提到的数字模式编码稍易记忆。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;user-classes  用户类别&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
需要更改权限的用户类别。使用单字母类别符号 &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; 或使用 &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; 指定所有类。可以指定多个类。&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=132</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=132"/>
		<updated>2025-08-20T05:48:02Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;br /&gt;
&lt;br /&gt;
目录&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户&amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt;可以在&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;目录中列出、添加和删除文件，访问该目录的子目录结构，或将该目录设为工作目录。属于&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt;组的用户及其他所有用户可以列出该目录中的文件，访问其子目录结构或将该目录设为工作目录，但无法添加或删除文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt; 文件的内容，或从命令行执行该文件（文件内容为可能为可执行二进制文件或脚本）。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组的用户可以查看或执行该文件，但无法修改它。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt; 文件的内容。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组中的用户可以查看该文件。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
==== 链接和权限 ====&lt;br /&gt;
一般来说，上述讨论也适用于硬链接和符号链接。文件系统会自动维护链接，以确保链接与目标文件具有相同的有效权限。（对于符号链接，&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令会显示一个文件模式，其中所有用户类别的权限类型均已分配，但当通过链接请求文件访问时，将应用目标文件的权限。）&lt;br /&gt;
&lt;br /&gt;
然而，在某些配置下，硬链接可以绕过目录 &#039;&#039;&#039;x&#039;&#039;&#039; 的权限限制。假设用户对文件 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt; 具有访问权限，而该文件在目录 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的子树之外有一个硬链接 &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt;。如果用户失去了对 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的 &#039;&#039;&#039;x&#039;&#039;&#039; 权限，他将无法访问 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt;，&#039;&#039;但仍可通过硬链接&#039;&#039; &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt; &#039;&#039;使用其原始权限访问同一文件&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
=== 更改权限… ===&lt;br /&gt;
权限通过命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 更改：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod &amp;lt;permission-mode&amp;gt; &amp;lt;file-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;让我们来看这个例子，&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这个数字644代表什么？&lt;br /&gt;
&lt;br /&gt;
=== …解释了 ===&lt;br /&gt;
权限模式是九个文件模式权限标志的数字表示形式。如前所述，存在三种权限类型和三种用户类别。每个数字代表分配给特定用户类别的权限类型。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&lt;br /&gt;
!用户类别：&lt;br /&gt;
!u&lt;br /&gt;
!g&lt;br /&gt;
!o&lt;br /&gt;
|-&lt;br /&gt;
!权限代码：&lt;br /&gt;
|6&lt;br /&gt;
|4&lt;br /&gt;
|4&lt;br /&gt;
|}&lt;br /&gt;
每个用户类别的最终权限代码，是通过将该类别被授予的权限类型对应数值相加得出的：读权限（&#039;&#039;&#039;r&#039;&#039;&#039;）对应4，写权限（&#039;&#039;&#039;w&#039;&#039;&#039;）对应2，执行权限（&#039;&#039;&#039;x&#039;&#039;&#039;）对应1。&lt;br /&gt;
&lt;br /&gt;
在上述示例中，我希望文件 &amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt; 对所有用户可读，但仅对我可写。因此权限代码应如下所示：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!用户类别&lt;br /&gt;
!权限类型&lt;br /&gt;
!权限代码&lt;br /&gt;
|-&lt;br /&gt;
!u (我自己)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4), &#039;&#039;&#039;w&#039;&#039;&#039; (2)&lt;br /&gt;
|4 + 2 = &#039;&#039;&#039;6&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!g (组)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!o (其他)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
因此：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;即可！&lt;br /&gt;
&lt;br /&gt;
=== …另一种方式 ===&lt;br /&gt;
&amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 支持一种用于指定权限模式的替代语法，这种语法在一次更改一个或几个权限时更加方便，且比上文提到的数字模式编码稍易记忆。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;user-classes  用户类别&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
需要更改权限的用户类别。使用单字母类别符号 &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; 或使用 &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; 指定所有类。可以指定多个类。&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=131</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=131"/>
		<updated>2025-08-20T05:46:15Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;br /&gt;
&lt;br /&gt;
目录&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户&amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt;可以在&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;目录中列出、添加和删除文件，访问该目录的子目录结构，或将该目录设为工作目录。属于&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt;组的用户及其他所有用户可以列出该目录中的文件，访问其子目录结构或将该目录设为工作目录，但无法添加或删除文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello&amp;lt;/code&amp;gt; 文件的内容，或从命令行执行该文件（文件内容为可能为可执行二进制文件或脚本）。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组的用户可以查看或执行该文件，但无法修改它。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
文件 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以读取或修改 &amp;lt;code&amp;gt;hello.txt&amp;lt;/code&amp;gt; 文件的内容。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组中的用户可以查看该文件。其他用户无法访问该文件。&lt;br /&gt;
&lt;br /&gt;
==== 链接和权限 ====&lt;br /&gt;
一般来说，上述讨论也适用于硬链接和符号链接。文件系统会自动维护链接，以确保链接与目标文件具有相同的有效权限。（对于符号链接，&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 命令会显示一个文件模式，其中所有用户类别的权限类型均已分配，但当通过链接请求文件访问时，将应用目标文件的权限。）&lt;br /&gt;
&lt;br /&gt;
然而，在某些配置下，硬链接可以绕过目录 &#039;&#039;&#039;x&#039;&#039;&#039; 的权限限制。假设用户对文件 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt; 具有访问权限，而该文件在目录 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的子树之外有一个硬链接 &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt;。如果用户失去了对 &amp;lt;code&amp;gt;d1&amp;lt;/code&amp;gt; 的 &#039;&#039;&#039;x&#039;&#039;&#039; 权限，他将无法访问 &amp;lt;code&amp;gt;./d1/f1&amp;lt;/code&amp;gt;，&#039;&#039;但仍可通过硬链接&#039;&#039; &amp;lt;code&amp;gt;./h1&amp;lt;/code&amp;gt; &#039;&#039;使用其原始权限访问同一文件&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
=== 更改权限… ===&lt;br /&gt;
权限通过命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 更改：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod &amp;lt;permission-mode&amp;gt; &amp;lt;file-name&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;让我们来看这个例子，&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这个数字644代表什么？&lt;br /&gt;
&lt;br /&gt;
=== …解释了 ===&lt;br /&gt;
权限模式是九个文件模式权限标志的数字表示形式。如前所述，存在三种权限类型和三种用户类别。每个数字代表分配给特定用户类别的权限类型。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&lt;br /&gt;
!用户类别：&lt;br /&gt;
!u&lt;br /&gt;
!g&lt;br /&gt;
!o&lt;br /&gt;
|-&lt;br /&gt;
!权限代码：&lt;br /&gt;
|6&lt;br /&gt;
|4&lt;br /&gt;
|4&lt;br /&gt;
|}&lt;br /&gt;
每个用户类别的最终权限代码，是通过将该类别被授予的权限类型对应数值相加得出的：读权限（&#039;&#039;&#039;r&#039;&#039;&#039;）对应4，写权限（&#039;&#039;&#039;w&#039;&#039;&#039;）对应2，执行权限（&#039;&#039;&#039;x&#039;&#039;&#039;）对应1。&lt;br /&gt;
&lt;br /&gt;
在上述示例中，我希望文件 &amp;lt;code&amp;gt;index.html&amp;lt;/code&amp;gt; 对所有用户可读，但仅对我可写。因此权限代码应如下所示：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!用户类别&lt;br /&gt;
!权限类型&lt;br /&gt;
!权限代码&lt;br /&gt;
|-&lt;br /&gt;
!u (我自己)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4), &#039;&#039;&#039;w&#039;&#039;&#039; (2)&lt;br /&gt;
|4 + 2 = &#039;&#039;&#039;6&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!g (组)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
!o (其他)&lt;br /&gt;
|&#039;&#039;&#039;r&#039;&#039;&#039; (4)&lt;br /&gt;
|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
因此：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
chmod 644 index.html&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;即可！&lt;br /&gt;
&lt;br /&gt;
=== …另一种方式 ===&lt;br /&gt;
&amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 支持一种用于指定权限模式的替代语法，这种语法在一次更改一个或几个权限时更加方便，且比上文提到的数字模式编码稍易记忆。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt;user-classes&amp;gt;&amp;lt;operation&amp;gt;&amp;lt;permission-types&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;[,&#039;&#039;&amp;lt; 用户类别&amp;gt;&amp;lt; 操作&amp;gt;&amp;lt; 权限类型&amp;gt;&#039;&#039;]…&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;user-classes  用户类别&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
需要更改权限的用户类别。使用单字母类符号 &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; 或使用 &amp;lt;code&amp;gt;a&amp;lt;/code&amp;gt; 指定所有类。可以指定多个类。&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=130</id>
		<title>从Shell中寻找帮助</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=130"/>
		<updated>2025-08-20T05:16:58Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;提示：你可以[[从Shell中寻找帮助#SDF 具体帮助|进一步]]查看 SDF 的具体帮助说明，如 FAQ！&lt;br /&gt;
&lt;br /&gt;
虽然 UNIX shell 看起来有点令人生畏和冰冷，它有两个字母的神秘命令、几十个命令行开关，而且没有动画回形针为你指明方向，但有几种不同的方法可以从系统中获得帮助。&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 使用手册（Manpages） ===&lt;br /&gt;
&lt;br /&gt;
==== RTFMing 权威指南 ====&lt;br /&gt;
获取帮助的最简单、最全面的方法就是阅读手册。在使用电脑的过程中，你可能在某个地方听说过 RTFM（Read The Fscking Manual），这就是那本“手册”。Man页面是每种 UNIX 的标准文档形式。学会使用它们。学会爱护它们。&lt;br /&gt;
&lt;br /&gt;
在哪里可以找到它们？其实很简单。想想一个命令(ls、rm、chmod、kill、grep）或一个程序（vi、mutt、snarf、majordomo），然后继续键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中&amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt;正是你想了解的命令的名称。正如你所看到的，手册被分成不同的部分。我们以 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 为例。&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
     mkdir - make directories&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
     mkdir creates the directories named as operands, in the order specified,&lt;br /&gt;
     using mode rwxrwxrwx (0777) as modified by the current umask(2).&lt;br /&gt;
&lt;br /&gt;
     The options are as follows:&lt;br /&gt;
&lt;br /&gt;
     -m      Set the file permission bits of the final created directory to&lt;br /&gt;
             the specified mode.  The mode argument can be in any of the for-&lt;br /&gt;
             mats specified to the chmod(1) utility.  If a symbolic mode is&lt;br /&gt;
             specified, the operation characters ``+&#039;&#039; and ``-&#039;&#039; are inter-&lt;br /&gt;
             preted relative to an initial mode of ``a=rwx&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
     -p      Create intermediate directories as required.  If this option is&lt;br /&gt;
             not specified, the full path prefix of each operand must already&lt;br /&gt;
             exist.  Intermediate directories are created with permission bits&lt;br /&gt;
             of rwxrwxrwx (0777) as modified by the current umask, plus write&lt;br /&gt;
             and search permission for the owner.  Do not consider it an error&lt;br /&gt;
             if the argument directory already exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     The user must have write permission in the parent directory.&lt;br /&gt;
                                                                               &lt;br /&gt;
EXIT STATUS&lt;br /&gt;
     mkdir exits 0 if successful, and &amp;gt;0 if an error occurred.&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
STANDARDS&lt;br /&gt;
     The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2&#039;&#039;) compat-&lt;br /&gt;
     ible.&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;以下为说明的翻译&amp;lt;ref&amp;gt;以下翻译内容可以按照行数相互对照，便于理解。 --译者注&amp;lt;/ref&amp;gt;：&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
名称&lt;br /&gt;
     mkdir - 创建目录&lt;br /&gt;
&lt;br /&gt;
语法&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
描述&lt;br /&gt;
     使用mkdir按照指定对象的顺序创建目录，&lt;br /&gt;
     默认使用当前由umask规定的模式 rwxrwxrwx (0777)&lt;br /&gt;
&lt;br /&gt;
     可选项如下：&lt;br /&gt;
&lt;br /&gt;
     -m      将最终创建目录的文件权限设置为指定模式。 &lt;br /&gt;
             模式参数可以是为 chmod(1) 工具指定的任何模式。 &lt;br /&gt;
             如果指定的是符号模式，操作符 ``+&#039;&#039; 和 ``-&#039;&#039; 将&lt;br /&gt;
             相对于初始模式 ``a=rwx&#039;&#039; 进行解释。&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
     -p      根据需要创建中间目录。 如果未指定该选项，&lt;br /&gt;
             则每个操作数的完整路径前缀必须已经存在。 &lt;br /&gt;
             创建的中间目录权限为 rwxrwxrwx (0777)，&lt;br /&gt;
             由当前 umask 修改，外加所有者的写入和搜索权限。&lt;br /&gt;
             如果参数目录已经存在，则不视为错误。&lt;br /&gt;
                 译者注：比如命令 mkdir -p intermediate/name，&lt;br /&gt;
                 其中intermediate就为中间目录，若中间目录不存在则创建一个。&lt;br /&gt;
                 若不加参数 -p 则会报错。&lt;br /&gt;
     用户必须有写入父目录的权限。&lt;br /&gt;
                                                                               &lt;br /&gt;
退出状态&lt;br /&gt;
     mkdir 如果成功则退出 0，如果出错则退出 &amp;gt;0。&lt;br /&gt;
&lt;br /&gt;
也请看&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
标准&lt;br /&gt;
     mkdir 工具有望与 IEEE Std 1003.2（&amp;quot;POSIX.2&amp;quot;）兼容。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;对于我们的 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 命令，显示的 man 页面有六个部分：名称（NAME）、语法（SYNOPSIS）、描述（DESCRIPTION）、退出状态（EXIT STATUS）、另见（SEE ALSO）和标准（STANDARDS）。NAME 部分只显示命令名称及其功能的简短描述。SYNOPSIS 部分简要介绍了命令的语法，以便查看输入的命令应该是什么样子。方括号 [ ] 中的项目为可选项。DESCRIPTION 部分详细描述了命令的工作原理，包括命令的各种选项或模式。退出状态（EXIT STATUS）部分描述了命令完成后（成功或失败）生成的状态代码。程序（如 shell 脚本）可以读取这些代码，以确定如何对命令结果做出反应。SEE ALSO 提供了相关命令或其他可能有用命令的交叉参考信息。最后，STANDARDS 部分列出了该命令符合哪些标准的信息。&lt;br /&gt;
&lt;br /&gt;
Man页面分为九个章节：&lt;br /&gt;
&lt;br /&gt;
# 用户指令（User commands)&lt;br /&gt;
# 系统调用和错误编号（System calls and error numbers）&lt;br /&gt;
# C 库中的函数 （Functions in the C libraries）&lt;br /&gt;
# 设备驱动程序 （Device drivers）&lt;br /&gt;
# 文件格式 （File formats）&lt;br /&gt;
# 游戏和其他娱乐 （Games and other diversions）&lt;br /&gt;
# 杂项信息 （Miscellaneous information）&lt;br /&gt;
# 系统维护和操作命令 （System maintenance and operation commands）&lt;br /&gt;
# 内核开发人员 （Kernal developers）&lt;br /&gt;
&lt;br /&gt;
在某些情况下，同一主题会出现在手册的多个章节中。例如，有一个 chmod 用户命令和一个 chmod() 系统调用。如何找到相应的 man 页？您可以告诉 man 您要查找的章节。如果你想查找用户命令，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man 1 chmod&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将显示用户命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 的Man页面。对具体章节的引用通常放在命令名称后面的括号中，如：chmod(1)&lt;br /&gt;
&lt;br /&gt;
如果你知道命令的名称，这一切都很好，但如果你记不住名称呢？&amp;lt;code&amp;gt;man -k&amp;lt;/code&amp;gt;可以用来搜索命令描述中的关键字。因此，如果你想查找邮件程序，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man -k editor&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;屏幕上将显示一系列关键字为 &amp;quot;editor&amp;quot;（编辑器）的命令。&lt;br /&gt;
&lt;br /&gt;
=== GNU 的 Info 系统 ===&lt;br /&gt;
对于 GNU 项目的程序，也可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 命令。如果你知道程序的名称，可以将其作为参数（就像使用 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 命令一样）。&lt;br /&gt;
&lt;br /&gt;
事实上，你可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 作为 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 的别名，因为 info 阅读器如果找不到 info 条目，就会直接显示 man 页面（但你不能指定 manpage 的章节）。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
不过，标准信息阅读器的导航方式有所不同，因为它是基于 &amp;lt;code&amp;gt;emacs&amp;lt;/code&amp;gt; 文本编辑器的。&lt;br /&gt;
&lt;br /&gt;
快速按键帮助（更多信息，请查阅 &amp;lt;code&amp;gt;info info&amp;lt;/code&amp;gt;）：&lt;br /&gt;
&lt;br /&gt;
SPACE, BACKSPACE&lt;br /&gt;
&lt;br /&gt;
            向前翻页，向后翻页&lt;br /&gt;
&lt;br /&gt;
TAB&lt;br /&gt;
&lt;br /&gt;
            将光标放到下一个菜单项或链接上（信息文件有超链接）&lt;br /&gt;
&lt;br /&gt;
RETURN&lt;br /&gt;
&lt;br /&gt;
            跳转到光标所在链接指向的位置&lt;br /&gt;
&lt;br /&gt;
l（是字母ell）&lt;br /&gt;
&lt;br /&gt;
            回到上次开始跳转的位置&lt;br /&gt;
&lt;br /&gt;
u n p&lt;br /&gt;
&lt;br /&gt;
            上一个(up)、下一个(next)、先前(previous)节点（信息文件采用分层结构）&lt;br /&gt;
&lt;br /&gt;
q&lt;br /&gt;
&lt;br /&gt;
            退出(quit)信息阅读器&lt;br /&gt;
&lt;br /&gt;
在大多数终端上，您还可以使用光标（箭头）进行移动。&lt;br /&gt;
&lt;br /&gt;
=== SDF 具体帮助 ===&lt;br /&gt;
&lt;br /&gt;
SDF 中还有许多工具可以用来获取更多帮助。在 shell 提示下键入以下命令。&lt;br /&gt;
&lt;br /&gt;
help&lt;br /&gt;
&lt;br /&gt;
            SDF 帮助系统。&lt;br /&gt;
&lt;br /&gt;
FAQ&lt;br /&gt;
&lt;br /&gt;
            常见问题集。键入 &amp;quot;g&amp;quot; 进入主题，键入 &amp;quot;l&amp;quot; 列出主题中的问题，键入 &amp;quot;t&amp;quot; 阅读常见问题解答。FAQ也可在 [https://sdf.org/?faq SDF 网站]上找到。&lt;br /&gt;
&lt;br /&gt;
helpdesk&lt;br /&gt;
&lt;br /&gt;
            如果您在man、help、FAQ或谷歌搜索中找不到答案，请向helpdesk帮助台提出问题，友好的社区成员会回答您的问题。任何具有 ARPA 身份的成员都可以作为服务员登录回答问题。请注意：您只能在帮助台发布与 SDF 系统直接相关的问题，而不能发布与一般 UNIX、编程或园艺相关的问题，这些问题属于 bboard！&lt;br /&gt;
&lt;br /&gt;
bboard&lt;br /&gt;
&lt;br /&gt;
            要进入 SDF 公告板系统 (BBOARD)，请在命令行键入 bboard。在 bboard 命令提示符下键入 h 和 ? 或在 [[Bboard|bboard 教程]]中，可以找到有关使用 BBOARD 的帮助。如果您有关于使用 SDF 系统的一般问题，请在 HELPDESK 中发帖。如果您有需要管理员干预的问题（如软件请求或会员询问），请在 REQUESTS 发帖询问。&lt;br /&gt;
&lt;br /&gt;
com&lt;br /&gt;
&lt;br /&gt;
            Com 和 bboard 是 SDF 社区的聚会场所。您也可以在那里提出您的问题。Bboard 和 faq 具有相同的界面。请参阅 [[COM不是IRC|COM 不是 IRC]] 了解如何使用 com。&lt;br /&gt;
&lt;br /&gt;
当然还有你现在正在阅读的教程，目录顶部链接为&amp;lt;nowiki/&amp;gt;http://sdf.org/index.cgi?tutorials&amp;lt;nowiki/&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&#039;&#039;$Id: fi&#039;&#039;&amp;lt;nowiki/&amp;gt;&amp;lt;nowiki/&amp;gt;&#039;&#039;ndinghelp.html,v 1.12 2024/07/24 2&#039;&#039;&amp;lt;nowiki/&amp;gt;&amp;lt;nowiki/&amp;gt;&#039;&#039;0:26:38 cseiler Exp $&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=129</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=129"/>
		<updated>2025-08-20T05:16:22Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;br /&gt;
&lt;br /&gt;
目录&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
用户&amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt;可以在&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;目录中列出、添加和删除文件，访问该目录的子目录结构，或将该目录设为工作目录。属于&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt;组的用户及其他所有用户可以列出该目录中的文件，访问其子目录结构或将该目录设为工作目录，但无法添加或删除文件。&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=128</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=128"/>
		<updated>2025-08-20T05:10:19Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;br /&gt;
&lt;br /&gt;
目录&amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
用户 &amp;lt;code&amp;gt;papa&amp;lt;/code&amp;gt; 可以列出、添加和删除 &amp;lt;code&amp;gt;arpastuff&amp;lt;/code&amp;gt; 中的文件，访问目录的子目录，或将该目录设为其工作目录。&amp;lt;code&amp;gt;arpa&amp;lt;/code&amp;gt; 组中的用户和其他所有用户可以列出目录中的文件，访问目录的子目录，或将该目录设为其工作目录，但无法添加或删除文件。&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=127</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=127"/>
		<updated>2025-08-20T03:20:22Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的部分列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=126</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=126"/>
		<updated>2025-08-20T03:20:03Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的子列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
字段 &#039;&#039;b&#039;&#039; 是&#039;&#039;文件所有者&#039;&#039;的用户 ID。字段 &#039;&#039;c&#039;&#039;  是文件所属的&#039;&#039;用户组&#039;&#039;。&lt;br /&gt;
&lt;br /&gt;
因此，对于上述 &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt; 列出的三个文件：&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=125</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=125"/>
		<updated>2025-08-20T03:17:51Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的子列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# 文件类型&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 目录&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 普通文件&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件所有者（用户组 &#039;&#039;&#039;u&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 文件用户组（用户组 &#039;&#039;&#039;g&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的读取（&#039;&#039;&#039;r&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的写入（&#039;&#039;&#039;w&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;br /&gt;
#:&lt;br /&gt;
# 其他用户（用户组 &#039;&#039;&#039;o&#039;&#039;&#039;）的执行（&#039;&#039;&#039;x&#039;&#039;&#039;）权限.&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 是&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: 否&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=124</id>
		<title>权限</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%9D%83%E9%99%90&amp;diff=124"/>
		<updated>2025-08-20T03:09:08Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​创建页面，内容为“=== 导言 === Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。  === 权限 === Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&amp;#039;&amp;#039;&amp;#039;r&amp;#039;&amp;#039;&amp;#039;、&amp;#039;&amp;#039;&amp;#039;w&amp;#039;&amp;#039;&amp;#039;、&amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;）的任意组合，适用于三类用户（&amp;#039;&amp;#039;&amp;#039;u&amp;#039;&amp;#039;&amp;#039;、&amp;#039;&amp;#039;&amp;#039;g&amp;#039;&amp;#039;&amp;#039;、&amp;#039;&amp;#039;&amp;#039;o&amp;#039;&amp;#039;&amp;#039;）。当用户请求访…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== 导言 ===&lt;br /&gt;
Unix 是一个多用户操作系统。其设计初衷并非让所有人都能访问所有文件，而是允许文件所有者指定哪些用户应拥有何种访问权限。&lt;br /&gt;
&lt;br /&gt;
=== 权限 ===&lt;br /&gt;
Unix 文件系统允许用户为其拥有的文件（包括目录：“在 Unix 中，一切皆为文件”）分配三种权限类型（&#039;&#039;&#039;r&#039;&#039;&#039;、&#039;&#039;&#039;w&#039;&#039;&#039;、&#039;&#039;&#039;x&#039;&#039;&#039;）的任意组合，适用于三类用户（&#039;&#039;&#039;u&#039;&#039;&#039;、&#039;&#039;&#039;g&#039;&#039;&#039;、&#039;&#039;&#039;o&#039;&#039;&#039;）。当用户请求访问文件时，Unix 首先确定请求者相对于目标文件的用户类别，然后检查所请求的权限类型是否已分配给该用户类别。&lt;br /&gt;
&lt;br /&gt;
==== 权限类型 ====&lt;br /&gt;
三种权限类型的效果各不相同，取决于它们适用于文件还是目录。&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类型&lt;br /&gt;
!文件&lt;br /&gt;
!目录&lt;br /&gt;
|-&lt;br /&gt;
!r&lt;br /&gt;
|读取文件内容&lt;br /&gt;
|列出目录中文件的名称、大小、修改日期等信息。 &amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!w&lt;br /&gt;
|更改 (&#039;&#039;&#039;w&#039;&#039;&#039;rite) 文件内容。&lt;br /&gt;
|从目录中添加或删除文件。&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!x&lt;br /&gt;
|如果在命令行中自行输入文件名，Shell 将尝试执行(e&#039;&#039;&#039;x&#039;&#039;&#039;ecute)该文件。&lt;br /&gt;
|访问（读取或写入）目录&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;或该目录及其子目录中的任何文件，或将该目录设置为用户的工作目录。&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 即使没有目录读取权限，只要指定了文件的完整名称，也可以获取文件信息。&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限允许用户从目录中删除文件，&#039;&#039;即使用户对该文件本身没有 w（修改内容）权限&#039;&#039;。反之亦然：缺乏 &#039;&#039;&#039;w&#039;&#039;&#039; 目录权限的用户可能能够修改目录中文件的内容，但无法删除该文件。&lt;br /&gt;
# 不同实现对列出目录文件名所需的权限要求各不相同。SDF主机（运行NetBSD）在用户对目录具有&#039;&#039;&#039;r&#039;&#039;&#039;权限时会列出目录文件。其他实现则要求同时具备&#039;&#039;&#039;r&#039;&#039;&#039;和&#039;&#039;&#039;x&#039;&#039;&#039;权限才能列出目录文件。&lt;br /&gt;
|}&lt;br /&gt;
与其他一些文件系统（如NTFS）不同，目录的“读取”（&#039;&#039;&#039;r&#039;&#039;&#039;）或“写入”（&#039;&#039;&#039;w&#039;&#039;&#039;）权限不会影响该目录子树中任何子目录或文件的“读取”或“写入”权限。目录的“读取”或“写入”权限由系统为该目录分配给您的用户类所设定的权限决定，而不考虑文件系统树中更高层级目录的“读取”和“写入”权限。&lt;br /&gt;
&lt;br /&gt;
然而，目录的&#039;&#039;&#039;x&#039;&#039;&#039;权限会影响目录子树中更深层目录和文件的权限。要访问一个文件，用户必须对该文件路径中的每个目录都拥有&#039;&#039;&#039;x&#039;&#039;&#039;权限。换句话说，如果某个目录缺乏&#039;&#039;&#039;x&#039;&#039;&#039;权限，实际上会阻止访问该目录子树中的任何文件。&lt;br /&gt;
&lt;br /&gt;
==== 用户类别 ====&lt;br /&gt;
对于给定文件，Unix 文件系统将用户分为三类：&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!类别&lt;br /&gt;
!用户&lt;br /&gt;
|-&lt;br /&gt;
!u&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;U&#039;&#039;&#039;ser.&#039;&#039; 当前文件的所有者。&lt;br /&gt;
|-&lt;br /&gt;
!g&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;G&#039;&#039;&#039;roup&#039;&#039;. 该文件所属用户组的成员。&lt;br /&gt;
|-&lt;br /&gt;
!o&lt;br /&gt;
|&#039;&#039;&#039;&#039;&#039;O&#039;&#039;&#039;thers&#039;&#039;. 不属于上述任何一类的用户。这是SDF的Web服务器在Web浏览器从您的网站请求文件时使用的用户类别。&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&#039;&#039;&#039;Notes:  备注&#039;&#039;&#039;&lt;br /&gt;
# 在网站上使用CGI程序会使权限检查变得复杂。对CGI程序文件本身的访问权限检查使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 。许多Web服务器配置为对CGI程序发起的文件访问请求也使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。然而，SDF Web服务器已配置为使用程序文件所有者的权限执行CGI程序（对于您在SDF网站上安装的CGI程序，即您自己的权限）。因此，如果您的 CGI 程序访问您拥有的文件，权限将使用用户类 &#039;&#039;&#039;u&#039;&#039;&#039; 进行检查。不属于您的文件将使用用户类 &#039;&#039;&#039;o&#039;&#039;&#039; 进行检查。&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== 举例说明 ====&lt;br /&gt;
文件权限信息可以通过&amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;命令的长列表（long listing）选项获取：&amp;lt;code&amp;gt;ls -l&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;drwxr-xr-x	2	papa	arpa	512	Sep 29 01:02	arpastuff&lt;br /&gt;
-rwxr-x---	1	papa	arpa	11402	Sep 29 01:02	hello&lt;br /&gt;
-rw-r-----	1	papa	arpa	13	Sep 29 01:02	hello.txt&lt;br /&gt;
      a           b       c&amp;lt;/syntaxhighlight&amp;gt;字段 &#039;&#039;a&#039;&#039; 表示&#039;&#039;文件模式&#039;&#039;，这是一个由十个单字符标志组成的字符串，用于指示文件的权限和其他信息。以下是按字符顺序排列的模式标志列表，以及每个标志可能的值的子列表（partial list）：&lt;br /&gt;
&lt;br /&gt;
# File type.&lt;br /&gt;
#; &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
#: directory&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: ordinary file&lt;br /&gt;
# &#039;&#039;&#039;r&#039;&#039;&#039; permission for file owner (user class &#039;&#039;&#039;u&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; permission for file owner (user class &#039;&#039;&#039;u&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;x&#039;&#039;&#039; permission for file owner (user class &#039;&#039;&#039;u&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;r&#039;&#039;&#039; permission for file user group (user class &#039;&#039;&#039;g&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; permission for file user group (user class &#039;&#039;&#039;g&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;x&#039;&#039;&#039; permission for file user group (user class &#039;&#039;&#039;g&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;r&#039;&#039;&#039; permission for other users (user class &#039;&#039;&#039;o&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;w&#039;&#039;&#039; permission for other users (user class &#039;&#039;&#039;o&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;br /&gt;
#:&lt;br /&gt;
# &#039;&#039;&#039;x&#039;&#039;&#039; permission for other users (user class &#039;&#039;&#039;o&#039;&#039;&#039;).&lt;br /&gt;
#; &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
#: yes&lt;br /&gt;
#:&lt;br /&gt;
#; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;&lt;br /&gt;
#: no&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=123</id>
		<title>首页</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=123"/>
		<updated>2025-08-20T02:35:24Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;tutorials.sdfcn.org - sdf中文html教程说明&amp;lt;/strong&amp;gt;&lt;br /&gt;
* 基于[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]翻译而来，只是转述[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]的内容，某些内容可能过时，不对其中观点负责。&lt;br /&gt;
* 此教程翻译自传统的[https://sdf.org/?tutorials html教程]，并非新[https://wiki.sdf.org sdf教程维基]，但是今后也会进行翻译。&lt;br /&gt;
&lt;br /&gt;
* 除非另有声明，本网站内容采用[https://creativecommons.org/licenses/by/4.0/ Creative Commons Attribution] (CC BY 4.0) 授权。&lt;br /&gt;
&lt;br /&gt;
* 此教程目前为个人维护项目，如果想加入翻译请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
&lt;br /&gt;
* 若教程内容出现问题（如翻译问题等），也请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
2023.6.19 gao66 on sdf&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF、UNIX和INTERNET教程&#039;&#039;&#039; ==&lt;br /&gt;
&#039;&#039;&#039;SDF成员贡献教程，是为了与INTERNET、UNIX操作系统和编程语言感兴趣的现有和潜在的SDF用户分享知识，并提供帮助。本项目的目的是通过实际且有用的示例，帮助用户充分利用 SDF 和 UNIX 的丰富功能。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;两个教程项目&#039;&#039;&#039; ==&lt;br /&gt;
目前有两个重叠的教程项目：&lt;br /&gt;
&lt;br /&gt;
* 新的[https://wiki.sdf.org SDF教程维基]，可在wiki.sdf.org找到。&amp;lt;ref&amp;gt;中文翻译版本会放在https://wiki.sdf.org，目前还没有。 --译者注&amp;lt;/ref&amp;gt;它包含下面列出的所有（或几乎所有）HTML教程的移植版本，以及新的内容。它还包括搜索功能，以及一个标准化的页面格式。&lt;br /&gt;
*传统的[[#HTML教程]]，即是以下内容。这些教程包含了许多由SDF用户多年来创建和更新的基础和高级教程。&lt;br /&gt;
&lt;br /&gt;
===有兴趣做出贡献吗？===&lt;br /&gt;
&lt;br /&gt;
*向教程维基做贡献：教程维基的建立是为了方便添加和维护教程的内容。要在教程维基上做贡献，你需要为自己建立一个账户。发送电子邮件至 [mailto:membership@sdf.org membership@sdf.org] （mailto link）以获得一个具有写入权限的账户，以便能够在维基上贡献编辑和新内容。 &amp;lt;br /&amp;gt;教程维基页面可以在你的浏览器中直接编辑，如果你担心把事情搞乱，它有内置的预览和版本控制。如果你有任何使用维基的经验，这对你来说很容易。更多细节作为Dokuwiki页面链接到了维基本身上，包括：&lt;br /&gt;
**[https://www.dokuwiki.org/wiki:syntax 维基语法]&lt;br /&gt;
**[https://www.dokuwiki.org/manual 维基用户手册]&lt;br /&gt;
*向HTML教程做贡献：传统的HTML教程项目包括本页面和下面链接的所有教程页面。为了能够对HTML教程做出贡献，请阅读[[SDF HTML教程编辑指南|HTML教程编辑指南]]，该指南也在[https://wiki.sdf.org/doku.php?id=sdf_tutorial_editing_guide 此处]的维基页面提供&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF教程维基&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki.sdfcn.org/ SDF教程维基]&amp;lt;ref&amp;gt; 目前还不存在，今后会进行翻译  --译者注 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;&amp;lt;span id=&amp;quot;HTML教程&amp;quot;&amp;gt;HTML教程：目录&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[[#SDF基础知识]]&lt;br /&gt;
#[[#电子邮件]]&lt;br /&gt;
#[[#网站设置和托管功能]]&lt;br /&gt;
#[[#高级专题]]&lt;br /&gt;
#[[#SDF的互联网聊天中继（IRC）]]&lt;br /&gt;
#[[#SDF VoIP电话服务]]&lt;br /&gt;
#[[#SDF 拨号（Dialup）和DSL互联网服务]]（适用于Dialup和DSL成员）&lt;br /&gt;
#[[#SDF电台！/ ANONRADIO服务]]&lt;br /&gt;
#[[#SDF VPS服务]]（适用于metaArpa成员）&lt;br /&gt;
#[[#Cheat Sheets (文本编辑器）]]&lt;br /&gt;
#[[#Dotfile（配置文件）资料库]]&lt;br /&gt;
#[[#twenex.org - SDF公共访问 TWENEX 操作系统]]&lt;br /&gt;
#[[#在线隐私]]&lt;br /&gt;
#[[#复古计算]]&lt;br /&gt;
#[[#贝尔实验室的Plan 9项目]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF基础知识&amp;quot;&amp;gt;1. SDF基础知识===&lt;br /&gt;
&lt;br /&gt;
*[[从Shell中寻找帮助|寻找帮助]] - 如何在shell中取得帮助&lt;br /&gt;
*[[COM不是IRC]]（互联网聊天中继）- 聊天程序 &amp;quot;COM&amp;quot; 的介绍&lt;br /&gt;
*[[bboard]] - 对论坛 &amp;quot;bboard&amp;quot; 的介绍&lt;br /&gt;
*[[SDF 多用户环境中的个人责任|多用户系统的责任]] - 关于SDF多用户环境下用户责任的声明&lt;br /&gt;
*[[SDF SSH 主机密钥|主机密钥]] - SDF的SSH主机密钥的列表&lt;br /&gt;
*[[SDF 中的即时信息|即时通讯]] - 如何在SDF上使用即时通讯服务&lt;br /&gt;
*[[文件传输教程|文件传输]] - 如何将文件移入或移出SDF&lt;br /&gt;
*[[UNIX® Shell之间的最终差异]] - 比较shell的差异/相似性&lt;br /&gt;
*[[权限|文件权限]] - 更改文件权限&lt;br /&gt;
*基本的文件和shell操作 - 使用一些命令操作文件和目录&lt;br /&gt;
*ASCII游戏 - 只工作不玩乐只会使你自己成为一个无趣的SDFer&lt;br /&gt;
*如何捐赠及原因 - 解释你的朋友和你的家人（或你）应该如何以及为什么要帮助资助SDF的一个页面。&lt;br /&gt;
*传播关于SDF的信息&lt;br /&gt;
*为盲人用户的SDF&lt;br /&gt;
*使用微软Windows™ 的 telnet&lt;br /&gt;
*SDF上的按类别排序的软件&lt;br /&gt;
*SDF特有命令 - SDF特有的命令、脚本和程序的列表。&lt;br /&gt;
*Jabber IM服务器 - 使用SDF Jabber XMPP即时通讯服务器&lt;br /&gt;
*SDF上的游戏服务器 - 在SDF上运行的多人游戏服务器列表&lt;br /&gt;
*Tiny Tiny RSS - 在SDF中托管的RSS阅读器&lt;br /&gt;
*MetaArray（元数组） - 存储以及为MetaArpa成员提供的一些服务&lt;br /&gt;
*GNU 社区 - SDF的微博&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;电子邮件&amp;quot;&amp;gt;2. 电子邮件 ===&lt;br /&gt;
&lt;br /&gt;
* 为初学者提供的电子邮件教程&lt;br /&gt;
* 电子邮件基础知识&lt;br /&gt;
* 电子邮件的黑名单问题 - 别人收到你的SDF邮件的问题&lt;br /&gt;
* SDF灰名单 - 减少垃圾邮件的系统政策&lt;br /&gt;
* Mutt邮件的用户代理（User Agent）&lt;br /&gt;
* 高级电子邮件主题 - 转发信息，打击垃圾邮件&lt;br /&gt;
* 设置一段假期 - 发送自动邮件回复&lt;br /&gt;
* POP3、IMAP和SMTP 验证 - 在流行的邮件客户端设置POP3、IMAP和SMTP认证&lt;br /&gt;
* SDF上的Procmail（邮件过滤工具）- 一般的配置说明&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;网站设置和托管功能&amp;quot;&amp;gt;3. 网站设置和托管功能 ===&lt;br /&gt;
&lt;br /&gt;
* 网站 - 在SDF上建立一个网站&lt;br /&gt;
* 为网站建设者提供的资源&lt;br /&gt;
* 自定义错误页面 - 使用.htaccess创建自定义错误页面&lt;br /&gt;
* SDF上的Ruby on Rails&lt;br /&gt;
** Ruby on Rails - SDF上的Ruby on Rails&lt;br /&gt;
** 构建一个基本的Ruby on Rails应用程序&lt;br /&gt;
* SDF上的Trac - 设置和使用Trac实例&lt;br /&gt;
* Gopher - 构建你自己的Gopher空间&lt;br /&gt;
* 用Jekyll写博客&lt;br /&gt;
* Htaccess - Apache HTTP服务器的有用的.htaccess技巧和窍门&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;高级专题&amp;quot;&amp;gt;4. 高级专题 ===&lt;br /&gt;
&lt;br /&gt;
* 编程语言、代码开发和编译器 - 在SDF编写你自己的代码&lt;br /&gt;
*使用skey - 通过不安全的协议安全地登录&lt;br /&gt;
*Emacs教程 - Emacs基础知识，使用Emacs作为工作环境&lt;br /&gt;
*SSH - 使用SDF时，通过SSH保证安全和路由客户端应用程序&lt;br /&gt;
*SSHFS - 使用SSHFS在linux本地机器上挂载SDF文件夹&lt;br /&gt;
*EncFS - 使用EncFS来管理加密的文件夹&lt;br /&gt;
*PSSHFS - 在NetBSD本地机器上挂载SDF文件夹&lt;br /&gt;
*VPN - 连接到SDF VPN（PPTP和OpenVPN）&lt;br /&gt;
*rsync - 使用rsync备份$HOME&lt;br /&gt;
*CVS - 在SDF上使用CVS&lt;br /&gt;
*GCI - SDF绿色计算倡议（Green Computing Initiative）&lt;br /&gt;
*MDNS（动态dns）- 自动MDNS示例(MetaARPA)&lt;br /&gt;
*SDF上的RubyGems - 设置 &amp;quot;gem&amp;quot; 命令&lt;br /&gt;
*scmgit - GIT源代码控制管理介绍&lt;br /&gt;
*SDFARC中继列表 - SDF业余无线电俱乐部（SDF Amateur Radio Club）使用的中继器列表&lt;br /&gt;
*toobnix.org - SDF的用户视频库&lt;br /&gt;
*X11转发 - 设置和运行X11应用程序（MetaARPA）&lt;br /&gt;
*$HOME/bin - 用户在SDF的多架构环境中编译的程序（ARPA）&lt;br /&gt;
*Screen - 复用你的终端（MetaARPA）&lt;br /&gt;
*Tmux - Screen的替代方案（MetaARPA）&lt;br /&gt;
*Minecraft - SDF自己的*私人*Minecraft（我的世界）服务器&lt;br /&gt;
*Chicken - Scheme编程语言的一种实现&lt;br /&gt;
*ECL - 可嵌入的通用编程语言&lt;br /&gt;
*移动应用 - 移动设备的应用&lt;br /&gt;
*端口分配 - MetaARPA成员的端口分配和使用信息&lt;br /&gt;
*UUCP（Unix-to-Unix Copy） - 通过轮询SDF获得UUCP新闻组新闻（USENET News）和网络邮件&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF的互联网聊天中继（IRC）&amp;quot;&amp;gt;5. SDF的互联网中继聊天（IRC） ===&lt;br /&gt;
&lt;br /&gt;
* SDF IRC可接受使用政策&lt;br /&gt;
* SDF IRC 频道&lt;br /&gt;
* 用Irssi自动连接IRC频道&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VoIP电话服务&amp;quot;&amp;gt;6. SDF VoIP电话服务 ===&lt;br /&gt;
&lt;br /&gt;
* 基本设置&lt;br /&gt;
* 扩展目录&lt;br /&gt;
* 高级功能和设置&lt;br /&gt;
* 配置FreePBX&lt;br /&gt;
* 配置思科（Cisco）7940G电话&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF 拨号（Dialup）和DSL互联网服务&amp;quot;&amp;gt;7. SDF 拨号（Dialup）和DSL互联网服务（适用于Dialup和DSL成员） ===&lt;br /&gt;
&lt;br /&gt;
* SDF 拨号 - 介绍和初始账户配置&lt;br /&gt;
** 设备升级 - SDF拨号所需的设备和服务&lt;br /&gt;
** 设置 - WinXP - 在Windows XP上配置拨号&lt;br /&gt;
** 设置 - Lucid - 在Ubuntu Linux上配置拨号&lt;br /&gt;
* SDF SDL - 配置和使用SDF DSL&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF电台！/ ANONRADIO服务&amp;quot;&amp;gt;8. SDF电台！/ ANONRADIO服务 ===&lt;br /&gt;
&lt;br /&gt;
* 如何收听ANONRADIO&lt;br /&gt;
* 如何在ANONRADIO上成为DJ&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VPS服务&amp;quot;&amp;gt;9. SDF VPS服务（适用于MetaARPA成员） ===&lt;br /&gt;
&lt;br /&gt;
* NetBSD的设置和配置&lt;br /&gt;
* 安装一个OpenLDAP服务器&lt;br /&gt;
* Debian的设置和配置&lt;br /&gt;
* Ubuntu的设置和配置（WIP）&lt;br /&gt;
* Plan9的设置和配置&lt;br /&gt;
* CentOS的设置和配置&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Cheat Sheets (文本编辑器）&amp;quot;&amp;gt;10. 小贴士  ===&lt;br /&gt;
&lt;br /&gt;
* 适用于Vi、awk、sed等的小贴士&lt;br /&gt;
* Emacs小贴士&lt;br /&gt;
* ed小贴士&lt;br /&gt;
* Pico小贴士&lt;br /&gt;
* 生存下来的TECO&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;Dotfile（配置文件）资料库&amp;quot;&amp;gt;11. Dotfile（配置文件）资料库 ===&lt;br /&gt;
&lt;br /&gt;
* 浏览含有注解的Dotfiles - 寻找工作示例，帮助你配置你最喜欢的程序。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;twenex.org - SDF公共访问 TWENEX 操作系统&amp;quot;&amp;gt;12. twenex.org - SDF公共访问 TWENEX 操作系统 ===&lt;br /&gt;
&lt;br /&gt;
* TOPS-20互动教程 - twenex.org的互动教程（@TOPS20）的日志和摘要&lt;br /&gt;
* 进入TWENEX - 为中级用户提供的twenex.org系统之旅&lt;br /&gt;
* 在TWENEX上使用多个互动程序 - 关于如何在同一登录中使用多个程序的教程&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;在线隐私&amp;quot;&amp;gt;13. 在线隐私 ===&lt;br /&gt;
&lt;br /&gt;
* 隐私保护&lt;br /&gt;
* SDF的隐私政策&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;复古计算&amp;quot;&amp;gt;14. 复古计算 ===&lt;br /&gt;
&lt;br /&gt;
* 歇斯底里的Unix指南 - 庆祝UNIX操作系统50周年&lt;br /&gt;
* CDC 6500生存指南&lt;br /&gt;
* 基本程序&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;贝尔实验室的Plan 9项目&amp;quot;&amp;gt;15. 贝尔实验室的Plan 9项目 ===&lt;br /&gt;
&#039;&#039;&#039;贝尔实验室的Plan 9&#039;&#039;&#039;是一个研究性的操作系统，被设计为超越Unix的操作系统进化的下一步。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDF&#039;&#039;&#039;赞助了一系列的训练营来介绍新用户使用&#039;&#039;&#039;Plan 9&#039;&#039;&#039;。本节教程收集了营员们的发现。&lt;br /&gt;
&lt;br /&gt;
* 为SDF VPS基本单位进行Plan9设置和配置&lt;br /&gt;
* Plan 9 C语言编程&lt;br /&gt;
* Plan 9 Rc 生存指南&lt;br /&gt;
* (在此添加你的Plan 9教程的链接)&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&amp;lt;small&amp;gt;&#039;&#039;$Id: index.html,v 1.195 2025/03/05 00:30:45 peteyboy Exp $&#039;&#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=UNIX%C2%AE_Shell%E4%B9%8B%E9%97%B4%E7%9A%84%E6%9C%80%E7%BB%88%E5%B7%AE%E5%BC%82&amp;diff=122</id>
		<title>UNIX® Shell之间的最终差异</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=UNIX%C2%AE_Shell%E4%B9%8B%E9%97%B4%E7%9A%84%E6%9C%80%E7%BB%88%E5%B7%AE%E5%BC%82&amp;diff=122"/>
		<updated>2025-08-20T02:32:55Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本教程正在编写中（work in progress，WIP）。&lt;br /&gt;
&lt;br /&gt;
=== 介绍 ===&lt;br /&gt;
本教程中介绍的 UNIX shell 包括：osh（Thompson shell 的移植）、sh（和类似 sh 的 shell）、csh（和类似 csh 的 shell）以及其他 shell。&lt;br /&gt;
&lt;br /&gt;
各种 UNIX&amp;lt;ref&amp;gt;UNIX® 是 The Open Group 的注册商标。&amp;lt;/ref&amp;gt; shell 之间有哪些重要的区别和/或相似之处？不同之处一般是命令行语法问题。&lt;br /&gt;
&lt;br /&gt;
在下面的章节中，每个命令行示例都用 &amp;quot;Ecl [123]: &amp;quot;表示。比较每节中的 &amp;quot;Ecl [123]: &amp;quot;和其他章节中相应的 &amp;quot;Ecl [123]:&amp;quot;，就能了解这些 shell 的不同之处&lt;br /&gt;
&lt;br /&gt;
本教程中描述的各种UNIX shell之间的共同点比差异更为重要。这是因为当你学会使用一种shell时，实际上也学会了使用其他shell。从用户的角度来看，每种shell都扮演着相同的角色。这个角色就是作为UNIX操作系统中可用功能的接口。&lt;br /&gt;
&lt;br /&gt;
=== Thompson Shell ===&lt;br /&gt;
在UNIX历史中，Thompson shell 早于 Bourne shell 和 C shell 出现，其命令语言是这两种壳的子集。Thompson shell 的流程控制通过外部壳工具[http://v6shell.org/man/if.1.html if](1)和[http://v6shell.org/man/goto.1.html goto](1)实现。然而，Bourne shell 和 C shell 的流程控制则内置于各自的壳中。&lt;br /&gt;
&lt;br /&gt;
增强版的Thompson shell已在SDF上提供，路径为`&amp;lt;code&amp;gt;/usr/pkg/bin/osh&amp;lt;/code&amp;gt;`。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man osh&amp;lt;/code&amp;gt;`来查看其手册。如果您更喜欢在线阅读，也可以访问其[http://v6shell.org/man/osh.1.html 在线手册]。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% which osh if goto ^ ( tr &#039;\n&#039; &#039; &#039; ; echo ) ^ sed &#039;s/.*/ls -l &amp;amp;/&#039; ^ osh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel   7880 Jul 18 21:37 /usr/pkg/bin/goto&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  14160 Jul 18 21:37 /usr/pkg/bin/if&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  38216 Jul 18 21:37 /usr/pkg/bin/osh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if -r /netbsd echo /netbsd: Is readable ; \&lt;br /&gt;
  if -w /netbsd echo /netbsd: Is writable&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
请注意，上述的 `&amp;lt;code&amp;gt;setenv&amp;lt;/code&amp;gt;` 命令在原始的 Thompson 壳中不可用。这是 &#039;&#039;&#039;osh&#039;&#039;&#039; 增强功能之一。我们是否需要对 PWB shell&amp;lt;ref&amp;gt;此 PWB shell 也是Thompson Shell 的改进。  --译者注&amp;lt;/ref&amp;gt; 说些什么？&lt;br /&gt;
&lt;br /&gt;
=== Bourne Shell ===&lt;br /&gt;
这包括原始Bourne shell、衍生版本以及类似实现。真正的Bourne shell或类Bourne shell通常作为大多数UNIX系统上的标准命令解释器。&lt;br /&gt;
&lt;br /&gt;
在SDF上，有一个与Bourne shell类似的命令行解释器，其路径为`&amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;`。您可以在命令提示符下输入`&amp;lt;code&amp;gt;man sh&amp;lt;/code&amp;gt;`来查看其手册。如果您更喜欢在线阅读，也可以通过[http://netbsd.gw.com/cgi-bin/man-cgi?sh+1.alpha+NetBSD-2.1 在线方式]查看其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
$ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
$ ls -l `which sh ksh bash`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  298431 Oct 24  2005 /bin/ksh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  199717 Oct 24  2005 /bin/sh&lt;br /&gt;
-rwxr-xr-x  1 root  wheel  963696 Jun  4 08:57 /usr/pkg/bin/bash&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
$ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bourne-Again Shell ===&lt;br /&gt;
Bourne-Again shell（Bash）是为GNU项目开发的自由软件，旨在替代Bourne shell。Bash能够在不进行任何修改的情况下执行绝大多数Bourne shell脚本。然而，其语法包含许多在Bourne shell中不存在的扩展功能。&lt;br /&gt;
&lt;br /&gt;
Bourne-Again shell 在 SDF 上可通过 `&amp;lt;code&amp;gt;/usr/pkg/bin/bash&amp;lt;/code&amp;gt;` 访问。您可以在命令提示符下执行 `&amp;lt;code&amp;gt;man bash&amp;lt;/code&amp;gt;` 命令来查看其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
$ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
$ ls -l `which sh ksh bash`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  298431 Oct 24  2005 /bin/ksh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  199717 Oct 24  2005 /bin/sh&lt;br /&gt;
-rwxr-xr-x  1 root  wheel  963696 Jun  4 08:57 /usr/pkg/bin/bash&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
$ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Z Shell ===&lt;br /&gt;
Z shell（Zsh）是Bourne shell的扩展版本，包含了许多改进。Paul Falstad于1990年在普林斯顿大学编写了Zsh的第一个版本。&lt;br /&gt;
&lt;br /&gt;
Z shell在SDF上可通过`&amp;lt;code&amp;gt;/usr/pkg/bin/zsh&amp;lt;/code&amp;gt;`访问。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man zsh&amp;lt;/code&amp;gt;`来阅读其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% ls -l `which csh tcsh zsh`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  214333 Oct 24  2005 /bin/csh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  459408 Jun 29  2005 /usr/pkg/bin/tcsh&lt;br /&gt;
-r-xr-xr-x  2 root  wheel    6352 May 11  2007 /usr/pkg/bin/zsh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C Shell ===&lt;br /&gt;
这包括原始的C shell、衍生版本以及类似实现。&lt;br /&gt;
&lt;br /&gt;
C shell在SDF上以`&amp;lt;code&amp;gt;/bin/csh&amp;lt;/code&amp;gt;`的形式提供。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man csh&amp;lt;/code&amp;gt;`来查看其手册。如果您更愿意在线查看，也可以[http://netbsd.gw.com/cgi-bin/man-cgi?csh+1.alpha+NetBSD-2.1 通过网络]阅读其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% ls -l `which csh tcsh zsh`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  214333 Oct 24  2005 /bin/csh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  459408 Jun 29  2005 /usr/pkg/bin/tcsh&lt;br /&gt;
-r-xr-xr-x  2 root  wheel    6352 May 11  2007 /usr/pkg/bin/zsh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if (-r /netbsd) echo /netbsd: Is readable ; \&lt;br /&gt;
  if (-w /netbsd) echo /netbsd: Is writable&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 其他 Shells ===&lt;br /&gt;
这一部分是否必要？&lt;br /&gt;
&lt;br /&gt;
本部分将包含关于Z shell、rc（AT&amp;amp;T Plan 9 shell）以及任何其他无法明确归类到单一类别的UNIX shell的相关信息。&lt;br /&gt;
&lt;br /&gt;
=== 结论 ===&lt;br /&gt;
结合前文内容，进一步探讨差异与相似之处。需要特别注意的是，尽管存在差异……但我认为相似性更为重要。毕竟，正是这些相似性使得用户能够轻松地在不同终端之间切换。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: shells.html,v 1.3 2021/06/17 22:55:38 brainman Exp brainman $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=UNIX%C2%AE_Shell%E4%B9%8B%E9%97%B4%E7%9A%84%E6%9C%80%E7%BB%88%E5%B7%AE%E5%BC%82&amp;diff=121</id>
		<title>UNIX® Shell之间的最终差异</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=UNIX%C2%AE_Shell%E4%B9%8B%E9%97%B4%E7%9A%84%E6%9C%80%E7%BB%88%E5%B7%AE%E5%BC%82&amp;diff=121"/>
		<updated>2025-08-20T02:30:29Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​创建页面，内容为“本教程正在编写中（work in progress，WIP）。  === 介绍 === 本教程中介绍的 UNIX shell 包括：osh（Thompson shell 的移植）、sh（和类似 sh 的 shell）、csh（和类似 csh 的 shell）以及其他 shell。  各种 UNIX shell 之间有哪些重要的区别和/或相似之处？不同之处一般是命令行语法问题。  在下面的章节中，每个命令行示例都用 &amp;quot;Ecl [123]: &amp;quot;表示。比较每节中的 &amp;quot;Ecl [123]: &amp;quot;和…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本教程正在编写中（work in progress，WIP）。&lt;br /&gt;
&lt;br /&gt;
=== 介绍 ===&lt;br /&gt;
本教程中介绍的 UNIX shell 包括：osh（Thompson shell 的移植）、sh（和类似 sh 的 shell）、csh（和类似 csh 的 shell）以及其他 shell。&lt;br /&gt;
&lt;br /&gt;
各种 UNIX shell 之间有哪些重要的区别和/或相似之处？不同之处一般是命令行语法问题。&lt;br /&gt;
&lt;br /&gt;
在下面的章节中，每个命令行示例都用 &amp;quot;Ecl [123]: &amp;quot;表示。比较每节中的 &amp;quot;Ecl [123]: &amp;quot;和其他章节中相应的 &amp;quot;Ecl [123]:&amp;quot;，就能了解这些 shell 的不同之处&lt;br /&gt;
&lt;br /&gt;
本教程中描述的各种UNIX shell之间的共同点比差异更为重要。这是因为当你学会使用一种shell时，实际上也学会了使用其他shell。从用户的角度来看，每种shell都扮演着相同的角色。这个角色就是作为UNIX操作系统中可用功能的接口。&lt;br /&gt;
&lt;br /&gt;
=== Thompson Shell ===&lt;br /&gt;
在UNIX历史中，Thompson shell 早于 Bourne shell 和 C shell 出现，其命令语言是这两种壳的子集。Thompson shell 的流程控制通过外部壳工具if(1)和goto(1)实现。然而，Bourne shell 和 C shell 的流程控制则内置于各自的壳中。&lt;br /&gt;
&lt;br /&gt;
增强版的Thompson shell已在SDF上提供，路径为`&amp;lt;code&amp;gt;/usr/pkg/bin/osh&amp;lt;/code&amp;gt;`。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man osh&amp;lt;/code&amp;gt;`来查看其手册。如果您更喜欢在线阅读，也可以访问其[http://v6shell.org/man/osh.1.html 在线手册]。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% which osh if goto ^ ( tr &#039;\n&#039; &#039; &#039; ; echo ) ^ sed &#039;s/.*/ls -l &amp;amp;/&#039; ^ osh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel   7880 Jul 18 21:37 /usr/pkg/bin/goto&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  14160 Jul 18 21:37 /usr/pkg/bin/if&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  38216 Jul 18 21:37 /usr/pkg/bin/osh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if -r /netbsd echo /netbsd: Is readable ; \&lt;br /&gt;
  if -w /netbsd echo /netbsd: Is writable&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;...&lt;br /&gt;
&lt;br /&gt;
请注意，上述的 `&amp;lt;code&amp;gt;setenv&amp;lt;/code&amp;gt;` 命令在原始的 Thompson 壳中不可用。这是 &#039;&#039;&#039;osh&#039;&#039;&#039; 增强功能之一。我们是否需要对 PWB shell&amp;lt;ref&amp;gt;此 PWB shell 也是Thompson Shell 的改进。  --译者注&amp;lt;/ref&amp;gt; 说些什么？&lt;br /&gt;
&lt;br /&gt;
=== Bourne Shell ===&lt;br /&gt;
这包括原始Bourne shell、衍生版本以及类似实现。真正的Bourne shell或类Bourne shell通常作为大多数UNIX系统上的标准命令解释器。&lt;br /&gt;
&lt;br /&gt;
在SDF上，有一个与Bourne shell类似的命令行解释器，其路径为`&amp;lt;code&amp;gt;/bin/sh&amp;lt;/code&amp;gt;`。您可以在命令提示符下输入`&amp;lt;code&amp;gt;man sh&amp;lt;/code&amp;gt;`来查看其手册。如果您更喜欢在线阅读，也可以通过[http://netbsd.gw.com/cgi-bin/man-cgi?sh+1.alpha+NetBSD-2.1 在线方式]查看其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
$ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
$ ls -l `which sh ksh bash`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  298431 Oct 24  2005 /bin/ksh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  199717 Oct 24  2005 /bin/sh&lt;br /&gt;
-rwxr-xr-x  1 root  wheel  963696 Jun  4 08:57 /usr/pkg/bin/bash&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
$ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bourne-Again Shell ===&lt;br /&gt;
Bourne-Again shell（Bash）是为GNU项目开发的自由软件，旨在替代Bourne shell。Bash能够在不进行任何修改的情况下执行绝大多数Bourne shell脚本。然而，其语法包含许多在Bourne shell中不存在的扩展功能。&lt;br /&gt;
&lt;br /&gt;
Bourne-Again shell 在 SDF 上可通过 `&amp;lt;code&amp;gt;/usr/pkg/bin/bash&amp;lt;/code&amp;gt;` 访问。您可以在命令提示符下执行 `&amp;lt;code&amp;gt;man bash&amp;lt;/code&amp;gt;` 命令来查看其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
$ PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
$ ls -l `which sh ksh bash`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  298431 Oct 24  2005 /bin/ksh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  199717 Oct 24  2005 /bin/sh&lt;br /&gt;
-rwxr-xr-x  1 root  wheel  963696 Jun  4 08:57 /usr/pkg/bin/bash&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
$ if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Z Shell ===&lt;br /&gt;
Z shell（Zsh）是Bourne shell的扩展版本，包含了许多改进。Paul Falstad于1990年在普林斯顿大学编写了Zsh的第一个版本。&lt;br /&gt;
&lt;br /&gt;
Z shell在SDF上可通过`&amp;lt;code&amp;gt;/usr/pkg/bin/zsh&amp;lt;/code&amp;gt;`访问。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man zsh&amp;lt;/code&amp;gt;`来阅读其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% PATH=/usr/pkg/bin:/usr/bin:/bin ; export PATH ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% ls -l `which csh tcsh zsh`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  214333 Oct 24  2005 /bin/csh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  459408 Jun 29  2005 /usr/pkg/bin/tcsh&lt;br /&gt;
-r-xr-xr-x  2 root  wheel    6352 May 11  2007 /usr/pkg/bin/zsh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if test -r /netbsd ; then echo /netbsd: Is readable ; fi ; \&lt;br /&gt;
&amp;gt; if test -w /netbsd ; then echo /netbsd: Is writable ; fi&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C Shell ===&lt;br /&gt;
这包括原始的C shell、衍生版本以及类似实现。&lt;br /&gt;
&lt;br /&gt;
C shell在SDF上以`&amp;lt;code&amp;gt;/bin/csh&amp;lt;/code&amp;gt;`的形式提供。您可以在命令提示符下执行`&amp;lt;code&amp;gt;man csh&amp;lt;/code&amp;gt;`来查看其手册。如果您更愿意在线查看，也可以[http://netbsd.gw.com/cgi-bin/man-cgi?csh+1.alpha+NetBSD-2.1 通过网络]阅读其手册。&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
Ecl 1:&lt;br /&gt;
&lt;br /&gt;
% setenv PATH /usr/pkg/bin:/usr/bin:/bin ; printenv PATH&lt;br /&gt;
/usr/pkg/bin:/usr/bin:/bin&lt;br /&gt;
&lt;br /&gt;
Ecl 2:&lt;br /&gt;
&lt;br /&gt;
% ls -l `which csh tcsh zsh`&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  214333 Oct 24  2005 /bin/csh&lt;br /&gt;
-r-xr-xr-x  1 root  wheel  459408 Jun 29  2005 /usr/pkg/bin/tcsh&lt;br /&gt;
-r-xr-xr-x  2 root  wheel    6352 May 11  2007 /usr/pkg/bin/zsh&lt;br /&gt;
&lt;br /&gt;
Ecl 3:&lt;br /&gt;
&lt;br /&gt;
% if (-r /netbsd) echo /netbsd: Is readable ; \&lt;br /&gt;
  if (-w /netbsd) echo /netbsd: Is writable&lt;br /&gt;
/netbsd: Is readable&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 其他 Shells ===&lt;br /&gt;
这一部分是否必要？&lt;br /&gt;
&lt;br /&gt;
本部分将包含关于Z shell、rc（AT&amp;amp;T Plan 9 shell）以及任何其他无法明确归类到单一类别的UNIX shell的相关信息。&lt;br /&gt;
&lt;br /&gt;
=== 结论 ===&lt;br /&gt;
结合前文内容，进一步探讨差异与相似之处。需要特别注意的是，尽管存在差异……但我认为相似性更为重要。毕竟，正是这些相似性使得用户能够轻松地在不同终端之间切换。&lt;br /&gt;
----UNIX® 是 The Open Group 的注册商标。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;small&amp;gt;$Id: shells.html,v 1.3 2021/06/17 22:55:38 brainman Exp brainman $&amp;lt;/small&amp;gt;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=120</id>
		<title>首页</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=120"/>
		<updated>2025-08-20T01:59:03Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;tutorials.sdfcn.org - sdf中文html教程说明&amp;lt;/strong&amp;gt;&lt;br /&gt;
* 基于[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]翻译而来，只是转述[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]的内容，某些内容可能过时，不对其中观点负责。&lt;br /&gt;
* 此教程翻译自传统的[https://sdf.org/?tutorials html教程]，并非新[https://wiki.sdf.org sdf教程维基]，但是今后也会进行翻译。&lt;br /&gt;
&lt;br /&gt;
* 除非另有声明，本网站内容采用[https://creativecommons.org/licenses/by/4.0/ Creative Commons Attribution] (CC BY 4.0) 授权。&lt;br /&gt;
&lt;br /&gt;
* 此教程目前为个人维护项目，如果想加入翻译请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
&lt;br /&gt;
* 若教程内容出现问题（如翻译问题等），也请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
2023.6.19 gao66 on sdf&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF、UNIX和INTERNET教程&#039;&#039;&#039; ==&lt;br /&gt;
&#039;&#039;&#039;SDF成员贡献教程，是为了与INTERNET、UNIX操作系统和编程语言感兴趣的现有和潜在的SDF用户分享知识，并提供帮助。本项目的目的是通过实际且有用的示例，帮助用户充分利用 SDF 和 UNIX 的丰富功能。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;两个教程项目&#039;&#039;&#039; ==&lt;br /&gt;
目前有两个重叠的教程项目：&lt;br /&gt;
&lt;br /&gt;
* 新的[https://wiki.sdf.org SDF教程维基]，可在wiki.sdf.org找到。&amp;lt;ref&amp;gt;中文翻译版本会放在https://wiki.sdf.org，目前还没有。 --译者注&amp;lt;/ref&amp;gt;它包含下面列出的所有（或几乎所有）HTML教程的移植版本，以及新的内容。它还包括搜索功能，以及一个标准化的页面格式。&lt;br /&gt;
*传统的[[#HTML教程]]，即是以下内容。这些教程包含了许多由SDF用户多年来创建和更新的基础和高级教程。&lt;br /&gt;
&lt;br /&gt;
===有兴趣做出贡献吗？===&lt;br /&gt;
&lt;br /&gt;
*向教程维基做贡献：教程维基的建立是为了方便添加和维护教程的内容。要在教程维基上做贡献，你需要为自己建立一个账户。发送电子邮件至 [mailto:membership@sdf.org membership@sdf.org] （mailto link）以获得一个具有写入权限的账户，以便能够在维基上贡献编辑和新内容。 &amp;lt;br /&amp;gt;教程维基页面可以在你的浏览器中直接编辑，如果你担心把事情搞乱，它有内置的预览和版本控制。如果你有任何使用维基的经验，这对你来说很容易。更多细节作为Dokuwiki页面链接到了维基本身上，包括：&lt;br /&gt;
**[https://www.dokuwiki.org/wiki:syntax 维基语法]&lt;br /&gt;
**[https://www.dokuwiki.org/manual 维基用户手册]&lt;br /&gt;
*向HTML教程做贡献：传统的HTML教程项目包括本页面和下面链接的所有教程页面。为了能够对HTML教程做出贡献，请阅读[[SDF HTML教程编辑指南|HTML教程编辑指南]]，该指南也在[https://wiki.sdf.org/doku.php?id=sdf_tutorial_editing_guide 此处]的维基页面提供&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF教程维基&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki.sdfcn.org/ SDF教程维基]&amp;lt;ref&amp;gt; 目前还不存在，今后会进行翻译  --译者注 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;&amp;lt;span id=&amp;quot;HTML教程&amp;quot;&amp;gt;HTML教程：目录&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[[#SDF基础知识]]&lt;br /&gt;
#[[#电子邮件]]&lt;br /&gt;
#[[#网站设置和托管功能]]&lt;br /&gt;
#[[#高级专题]]&lt;br /&gt;
#[[#SDF的互联网聊天中继（IRC）]]&lt;br /&gt;
#[[#SDF VoIP电话服务]]&lt;br /&gt;
#[[#SDF 拨号（Dialup）和DSL互联网服务]]（适用于Dialup和DSL成员）&lt;br /&gt;
#[[#SDF电台！/ ANONRADIO服务]]&lt;br /&gt;
#[[#SDF VPS服务]]（适用于metaArpa成员）&lt;br /&gt;
#[[#Cheat Sheets (文本编辑器）]]&lt;br /&gt;
#[[#Dotfile（配置文件）资料库]]&lt;br /&gt;
#[[#twenex.org - SDF公共访问 TWENEX 操作系统]]&lt;br /&gt;
#[[#在线隐私]]&lt;br /&gt;
#[[#复古计算]]&lt;br /&gt;
#[[#贝尔实验室的Plan 9项目]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF基础知识&amp;quot;&amp;gt;1. SDF基础知识===&lt;br /&gt;
&lt;br /&gt;
*[[从Shell中寻找帮助|寻找帮助]] - 如何在shell中取得帮助&lt;br /&gt;
*[[COM不是IRC]]（互联网聊天中继）- 聊天程序 &amp;quot;COM&amp;quot; 的介绍&lt;br /&gt;
*[[bboard]] - 对论坛 &amp;quot;bboard&amp;quot; 的介绍&lt;br /&gt;
*[[SDF 多用户环境中的个人责任|多用户系统的责任]] - 关于SDF多用户环境下用户责任的声明&lt;br /&gt;
*[[SDF SSH 主机密钥|主机密钥]] - SDF的SSH主机密钥的列表&lt;br /&gt;
*[[SDF 中的即时信息|即时通讯]] - 如何在SDF上使用即时通讯服务&lt;br /&gt;
*[[文件传输教程|文件传输]] - 如何将文件移入或移出SDF&lt;br /&gt;
*[[UNIX® Shell之间的最终差异]] - 比较shell的差异/相似性&lt;br /&gt;
*文件权限 - 更改文件权限&lt;br /&gt;
*基本的文件和shell操作 - 使用一些命令操作文件和目录&lt;br /&gt;
*ASCII游戏 - 只工作不玩乐只会使你自己成为一个无趣的SDFer&lt;br /&gt;
*如何捐赠及原因 - 解释你的朋友和你的家人（或你）应该如何以及为什么要帮助资助SDF的一个页面。&lt;br /&gt;
*传播关于SDF的信息&lt;br /&gt;
*为盲人用户的SDF&lt;br /&gt;
*使用微软Windows™ 的 telnet&lt;br /&gt;
*SDF上的按类别排序的软件&lt;br /&gt;
*SDF特有命令 - SDF特有的命令、脚本和程序的列表。&lt;br /&gt;
*Jabber IM服务器 - 使用SDF Jabber XMPP即时通讯服务器&lt;br /&gt;
*SDF上的游戏服务器 - 在SDF上运行的多人游戏服务器列表&lt;br /&gt;
*Tiny Tiny RSS - 在SDF中托管的RSS阅读器&lt;br /&gt;
*MetaArray（元数组） - 存储以及为MetaArpa成员提供的一些服务&lt;br /&gt;
*GNU 社区 - SDF的微博&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;电子邮件&amp;quot;&amp;gt;2. 电子邮件 ===&lt;br /&gt;
&lt;br /&gt;
* 为初学者提供的电子邮件教程&lt;br /&gt;
* 电子邮件基础知识&lt;br /&gt;
* 电子邮件的黑名单问题 - 别人收到你的SDF邮件的问题&lt;br /&gt;
* SDF灰名单 - 减少垃圾邮件的系统政策&lt;br /&gt;
* Mutt邮件的用户代理（User Agent）&lt;br /&gt;
* 高级电子邮件主题 - 转发信息，打击垃圾邮件&lt;br /&gt;
* 设置一段假期 - 发送自动邮件回复&lt;br /&gt;
* POP3、IMAP和SMTP 验证 - 在流行的邮件客户端设置POP3、IMAP和SMTP认证&lt;br /&gt;
* SDF上的Procmail（邮件过滤工具）- 一般的配置说明&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;网站设置和托管功能&amp;quot;&amp;gt;3. 网站设置和托管功能 ===&lt;br /&gt;
&lt;br /&gt;
* 网站 - 在SDF上建立一个网站&lt;br /&gt;
* 为网站建设者提供的资源&lt;br /&gt;
* 自定义错误页面 - 使用.htaccess创建自定义错误页面&lt;br /&gt;
* SDF上的Ruby on Rails&lt;br /&gt;
** Ruby on Rails - SDF上的Ruby on Rails&lt;br /&gt;
** 构建一个基本的Ruby on Rails应用程序&lt;br /&gt;
* SDF上的Trac - 设置和使用Trac实例&lt;br /&gt;
* Gopher - 构建你自己的Gopher空间&lt;br /&gt;
* 用Jekyll写博客&lt;br /&gt;
* Htaccess - Apache HTTP服务器的有用的.htaccess技巧和窍门&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;高级专题&amp;quot;&amp;gt;4. 高级专题 ===&lt;br /&gt;
&lt;br /&gt;
* 编程语言、代码开发和编译器 - 在SDF编写你自己的代码&lt;br /&gt;
*使用skey - 通过不安全的协议安全地登录&lt;br /&gt;
*Emacs教程 - Emacs基础知识，使用Emacs作为工作环境&lt;br /&gt;
*SSH - 使用SDF时，通过SSH保证安全和路由客户端应用程序&lt;br /&gt;
*SSHFS - 使用SSHFS在linux本地机器上挂载SDF文件夹&lt;br /&gt;
*EncFS - 使用EncFS来管理加密的文件夹&lt;br /&gt;
*PSSHFS - 在NetBSD本地机器上挂载SDF文件夹&lt;br /&gt;
*VPN - 连接到SDF VPN（PPTP和OpenVPN）&lt;br /&gt;
*rsync - 使用rsync备份$HOME&lt;br /&gt;
*CVS - 在SDF上使用CVS&lt;br /&gt;
*GCI - SDF绿色计算倡议（Green Computing Initiative）&lt;br /&gt;
*MDNS（动态dns）- 自动MDNS示例(MetaARPA)&lt;br /&gt;
*SDF上的RubyGems - 设置 &amp;quot;gem&amp;quot; 命令&lt;br /&gt;
*scmgit - GIT源代码控制管理介绍&lt;br /&gt;
*SDFARC中继列表 - SDF业余无线电俱乐部（SDF Amateur Radio Club）使用的中继器列表&lt;br /&gt;
*toobnix.org - SDF的用户视频库&lt;br /&gt;
*X11转发 - 设置和运行X11应用程序（MetaARPA）&lt;br /&gt;
*$HOME/bin - 用户在SDF的多架构环境中编译的程序（ARPA）&lt;br /&gt;
*Screen - 复用你的终端（MetaARPA）&lt;br /&gt;
*Tmux - Screen的替代方案（MetaARPA）&lt;br /&gt;
*Minecraft - SDF自己的*私人*Minecraft（我的世界）服务器&lt;br /&gt;
*Chicken - Scheme编程语言的一种实现&lt;br /&gt;
*ECL - 可嵌入的通用编程语言&lt;br /&gt;
*移动应用 - 移动设备的应用&lt;br /&gt;
*端口分配 - MetaARPA成员的端口分配和使用信息&lt;br /&gt;
*UUCP（Unix-to-Unix Copy） - 通过轮询SDF获得UUCP新闻组新闻（USENET News）和网络邮件&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF的互联网聊天中继（IRC）&amp;quot;&amp;gt;5. SDF的互联网中继聊天（IRC） ===&lt;br /&gt;
&lt;br /&gt;
* SDF IRC可接受使用政策&lt;br /&gt;
* SDF IRC 频道&lt;br /&gt;
* 用Irssi自动连接IRC频道&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VoIP电话服务&amp;quot;&amp;gt;6. SDF VoIP电话服务 ===&lt;br /&gt;
&lt;br /&gt;
* 基本设置&lt;br /&gt;
* 扩展目录&lt;br /&gt;
* 高级功能和设置&lt;br /&gt;
* 配置FreePBX&lt;br /&gt;
* 配置思科（Cisco）7940G电话&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF 拨号（Dialup）和DSL互联网服务&amp;quot;&amp;gt;7. SDF 拨号（Dialup）和DSL互联网服务（适用于Dialup和DSL成员） ===&lt;br /&gt;
&lt;br /&gt;
* SDF 拨号 - 介绍和初始账户配置&lt;br /&gt;
** 设备升级 - SDF拨号所需的设备和服务&lt;br /&gt;
** 设置 - WinXP - 在Windows XP上配置拨号&lt;br /&gt;
** 设置 - Lucid - 在Ubuntu Linux上配置拨号&lt;br /&gt;
* SDF SDL - 配置和使用SDF DSL&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF电台！/ ANONRADIO服务&amp;quot;&amp;gt;8. SDF电台！/ ANONRADIO服务 ===&lt;br /&gt;
&lt;br /&gt;
* 如何收听ANONRADIO&lt;br /&gt;
* 如何在ANONRADIO上成为DJ&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VPS服务&amp;quot;&amp;gt;9. SDF VPS服务（适用于MetaARPA成员） ===&lt;br /&gt;
&lt;br /&gt;
* NetBSD的设置和配置&lt;br /&gt;
* 安装一个OpenLDAP服务器&lt;br /&gt;
* Debian的设置和配置&lt;br /&gt;
* Ubuntu的设置和配置（WIP）&lt;br /&gt;
* Plan9的设置和配置&lt;br /&gt;
* CentOS的设置和配置&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Cheat Sheets (文本编辑器）&amp;quot;&amp;gt;10. 小贴士  ===&lt;br /&gt;
&lt;br /&gt;
* 适用于Vi、awk、sed等的小贴士&lt;br /&gt;
* Emacs小贴士&lt;br /&gt;
* ed小贴士&lt;br /&gt;
* Pico小贴士&lt;br /&gt;
* 生存下来的TECO&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;Dotfile（配置文件）资料库&amp;quot;&amp;gt;11. Dotfile（配置文件）资料库 ===&lt;br /&gt;
&lt;br /&gt;
* 浏览含有注解的Dotfiles - 寻找工作示例，帮助你配置你最喜欢的程序。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;twenex.org - SDF公共访问 TWENEX 操作系统&amp;quot;&amp;gt;12. twenex.org - SDF公共访问 TWENEX 操作系统 ===&lt;br /&gt;
&lt;br /&gt;
* TOPS-20互动教程 - twenex.org的互动教程（@TOPS20）的日志和摘要&lt;br /&gt;
* 进入TWENEX - 为中级用户提供的twenex.org系统之旅&lt;br /&gt;
* 在TWENEX上使用多个互动程序 - 关于如何在同一登录中使用多个程序的教程&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;在线隐私&amp;quot;&amp;gt;13. 在线隐私 ===&lt;br /&gt;
&lt;br /&gt;
* 隐私保护&lt;br /&gt;
* SDF的隐私政策&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;复古计算&amp;quot;&amp;gt;14. 复古计算 ===&lt;br /&gt;
&lt;br /&gt;
* 歇斯底里的Unix指南 - 庆祝UNIX操作系统50周年&lt;br /&gt;
* CDC 6500生存指南&lt;br /&gt;
* 基本程序&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;贝尔实验室的Plan 9项目&amp;quot;&amp;gt;15. 贝尔实验室的Plan 9项目 ===&lt;br /&gt;
&#039;&#039;&#039;贝尔实验室的Plan 9&#039;&#039;&#039;是一个研究性的操作系统，被设计为超越Unix的操作系统进化的下一步。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDF&#039;&#039;&#039;赞助了一系列的训练营来介绍新用户使用&#039;&#039;&#039;Plan 9&#039;&#039;&#039;。本节教程收集了营员们的发现。&lt;br /&gt;
&lt;br /&gt;
* 为SDF VPS基本单位进行Plan9设置和配置&lt;br /&gt;
* Plan 9 C语言编程&lt;br /&gt;
* Plan 9 Rc 生存指南&lt;br /&gt;
* (在此添加你的Plan 9教程的链接)&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&amp;lt;small&amp;gt;&#039;&#039;$Id: index.html,v 1.195 2025/03/05 00:30:45 peteyboy Exp $&#039;&#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=119</id>
		<title>Sdfcntutorials:著作权</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=119"/>
		<updated>2025-08-20T01:52:34Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;syntaxhighlight&amp;gt;Attribution 4.0 International&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Corporation (&amp;quot;Creative Commons&amp;quot;) is not a law firm and&lt;br /&gt;
does not provide legal services or legal advice. Distribution of&lt;br /&gt;
Creative Commons public licenses does not create a lawyer-client or&lt;br /&gt;
other relationship. Creative Commons makes its licenses and related&lt;br /&gt;
information available on an &amp;quot;as-is&amp;quot; basis. Creative Commons gives no&lt;br /&gt;
warranties regarding its licenses, any material licensed under their&lt;br /&gt;
terms and conditions, or any related information. Creative Commons&lt;br /&gt;
disclaims all liability for damages resulting from their use to the&lt;br /&gt;
fullest extent possible.&lt;br /&gt;
&lt;br /&gt;
Using Creative Commons Public Licenses&lt;br /&gt;
&lt;br /&gt;
Creative Commons public licenses provide a standard set of terms and&lt;br /&gt;
conditions that creators and other rights holders may use to share&lt;br /&gt;
original works of authorship and other material subject to copyright&lt;br /&gt;
and certain other rights specified in the public license below. The&lt;br /&gt;
following considerations are for informational purposes only, are not&lt;br /&gt;
exhaustive, and do not form part of our licenses.&lt;br /&gt;
&lt;br /&gt;
     Considerations for licensors: Our public licenses are&lt;br /&gt;
     intended for use by those authorized to give the public&lt;br /&gt;
     permission to use material in ways otherwise restricted by&lt;br /&gt;
     copyright and certain other rights. Our licenses are&lt;br /&gt;
     irrevocable. Licensors should read and understand the terms&lt;br /&gt;
     and conditions of the license they choose before applying it.&lt;br /&gt;
     Licensors should also secure all rights necessary before&lt;br /&gt;
     applying our licenses so that the public can reuse the&lt;br /&gt;
     material as expected. Licensors should clearly mark any&lt;br /&gt;
     material not subject to the license. This includes other CC-&lt;br /&gt;
     licensed material, or material used under an exception or&lt;br /&gt;
     limitation to copyright. More considerations for licensors:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensors&lt;br /&gt;
&lt;br /&gt;
     Considerations for the public: By using one of our public&lt;br /&gt;
     licenses, a licensor grants the public permission to use the&lt;br /&gt;
     licensed material under specified terms and conditions. If&lt;br /&gt;
     the licensor&#039;s permission is not necessary for any reason--for&lt;br /&gt;
     example, because of any applicable exception or limitation to&lt;br /&gt;
     copyright--then that use is not regulated by the license. Our&lt;br /&gt;
     licenses grant only permissions under copyright and certain&lt;br /&gt;
     other rights that a licensor has authority to grant. Use of&lt;br /&gt;
     the licensed material may still be restricted for other&lt;br /&gt;
     reasons, including because others have copyright or other&lt;br /&gt;
     rights in the material. A licensor may make special requests,&lt;br /&gt;
     such as asking that all changes be marked or described.&lt;br /&gt;
     Although not required by our licenses, you are encouraged to&lt;br /&gt;
     respect those requests where reasonable. More considerations&lt;br /&gt;
     for the public:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensees&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Attribution 4.0 International Public License&lt;br /&gt;
&lt;br /&gt;
By exercising the Licensed Rights (defined below), You accept and agree&lt;br /&gt;
to be bound by the terms and conditions of this Creative Commons&lt;br /&gt;
Attribution 4.0 International Public License (&amp;quot;Public License&amp;quot;). To the&lt;br /&gt;
extent this Public License may be interpreted as a contract, You are&lt;br /&gt;
granted the Licensed Rights in consideration of Your acceptance of&lt;br /&gt;
these terms and conditions, and the Licensor grants You such rights in&lt;br /&gt;
consideration of benefits the Licensor receives from making the&lt;br /&gt;
Licensed Material available under these terms and conditions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 1 -- Definitions.&lt;br /&gt;
&lt;br /&gt;
  a. Adapted Material means material subject to Copyright and Similar&lt;br /&gt;
     Rights that is derived from or based upon the Licensed Material&lt;br /&gt;
     and in which the Licensed Material is translated, altered,&lt;br /&gt;
     arranged, transformed, or otherwise modified in a manner requiring&lt;br /&gt;
     permission under the Copyright and Similar Rights held by the&lt;br /&gt;
     Licensor. For purposes of this Public License, where the Licensed&lt;br /&gt;
     Material is a musical work, performance, or sound recording,&lt;br /&gt;
     Adapted Material is always produced where the Licensed Material is&lt;br /&gt;
     synched in timed relation with a moving image.&lt;br /&gt;
&lt;br /&gt;
  b. Adapter&#039;s License means the license You apply to Your Copyright&lt;br /&gt;
     and Similar Rights in Your contributions to Adapted Material in&lt;br /&gt;
     accordance with the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. Copyright and Similar Rights means copyright and/or similar rights&lt;br /&gt;
     closely related to copyright including, without limitation,&lt;br /&gt;
     performance, broadcast, sound recording, and Sui Generis Database&lt;br /&gt;
     Rights, without regard to how the rights are labeled or&lt;br /&gt;
     categorized. For purposes of this Public License, the rights&lt;br /&gt;
     specified in Section 2(b)(1)-(2) are not Copyright and Similar&lt;br /&gt;
     Rights.&lt;br /&gt;
&lt;br /&gt;
  d. Effective Technological Measures means those measures that, in the&lt;br /&gt;
     absence of proper authority, may not be circumvented under laws&lt;br /&gt;
     fulfilling obligations under Article 11 of the WIPO Copyright&lt;br /&gt;
     Treaty adopted on December 20, 1996, and/or similar international&lt;br /&gt;
     agreements.&lt;br /&gt;
&lt;br /&gt;
  e. Exceptions and Limitations means fair use, fair dealing, and/or&lt;br /&gt;
     any other exception or limitation to Copyright and Similar Rights&lt;br /&gt;
     that applies to Your use of the Licensed Material.&lt;br /&gt;
&lt;br /&gt;
  f. Licensed Material means the artistic or literary work, database,&lt;br /&gt;
     or other material to which the Licensor applied this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
  g. Licensed Rights means the rights granted to You subject to the&lt;br /&gt;
     terms and conditions of this Public License, which are limited to&lt;br /&gt;
     all Copyright and Similar Rights that apply to Your use of the&lt;br /&gt;
     Licensed Material and that the Licensor has authority to license.&lt;br /&gt;
&lt;br /&gt;
  h. Licensor means the individual(s) or entity(ies) granting rights&lt;br /&gt;
     under this Public License.&lt;br /&gt;
&lt;br /&gt;
  i. Share means to provide material to the public by any means or&lt;br /&gt;
     process that requires permission under the Licensed Rights, such&lt;br /&gt;
     as reproduction, public display, public performance, distribution,&lt;br /&gt;
     dissemination, communication, or importation, and to make material&lt;br /&gt;
     available to the public including in ways that members of the&lt;br /&gt;
     public may access the material from a place and at a time&lt;br /&gt;
     individually chosen by them.&lt;br /&gt;
&lt;br /&gt;
  j. Sui Generis Database Rights means rights other than copyright&lt;br /&gt;
     resulting from Directive 96/9/EC of the European Parliament and of&lt;br /&gt;
     the Council of 11 March 1996 on the legal protection of databases,&lt;br /&gt;
     as amended and/or succeeded, as well as other essentially&lt;br /&gt;
     equivalent rights anywhere in the world.&lt;br /&gt;
&lt;br /&gt;
  k. You means the individual or entity exercising the Licensed Rights&lt;br /&gt;
     under this Public License. Your has a corresponding meaning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 2 -- Scope.&lt;br /&gt;
&lt;br /&gt;
  a. License grant.&lt;br /&gt;
&lt;br /&gt;
       1. Subject to the terms and conditions of this Public License,&lt;br /&gt;
          the Licensor hereby grants You a worldwide, royalty-free,&lt;br /&gt;
          non-sublicensable, non-exclusive, irrevocable license to&lt;br /&gt;
          exercise the Licensed Rights in the Licensed Material to:&lt;br /&gt;
&lt;br /&gt;
            a. reproduce and Share the Licensed Material, in whole or&lt;br /&gt;
               in part; and&lt;br /&gt;
&lt;br /&gt;
            b. produce, reproduce, and Share Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       2. Exceptions and Limitations. For the avoidance of doubt, where&lt;br /&gt;
          Exceptions and Limitations apply to Your use, this Public&lt;br /&gt;
          License does not apply, and You do not need to comply with&lt;br /&gt;
          its terms and conditions.&lt;br /&gt;
&lt;br /&gt;
       3. Term. The term of this Public License is specified in Section&lt;br /&gt;
          6(a).&lt;br /&gt;
&lt;br /&gt;
       4. Media and formats; technical modifications allowed. The&lt;br /&gt;
          Licensor authorizes You to exercise the Licensed Rights in&lt;br /&gt;
          all media and formats whether now known or hereafter created,&lt;br /&gt;
          and to make technical modifications necessary to do so. The&lt;br /&gt;
          Licensor waives and/or agrees not to assert any right or&lt;br /&gt;
          authority to forbid You from making technical modifications&lt;br /&gt;
          necessary to exercise the Licensed Rights, including&lt;br /&gt;
          technical modifications necessary to circumvent Effective&lt;br /&gt;
          Technological Measures. For purposes of this Public License,&lt;br /&gt;
          simply making modifications authorized by this Section 2(a)&lt;br /&gt;
          (4) never produces Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       5. Downstream recipients.&lt;br /&gt;
&lt;br /&gt;
            a. Offer from the Licensor -- Licensed Material. Every&lt;br /&gt;
               recipient of the Licensed Material automatically&lt;br /&gt;
               receives an offer from the Licensor to exercise the&lt;br /&gt;
               Licensed Rights under the terms and conditions of this&lt;br /&gt;
               Public License.&lt;br /&gt;
&lt;br /&gt;
            b. No downstream restrictions. You may not offer or impose&lt;br /&gt;
               any additional or different terms or conditions on, or&lt;br /&gt;
               apply any Effective Technological Measures to, the&lt;br /&gt;
               Licensed Material if doing so restricts exercise of the&lt;br /&gt;
               Licensed Rights by any recipient of the Licensed&lt;br /&gt;
               Material.&lt;br /&gt;
&lt;br /&gt;
       6. No endorsement. Nothing in this Public License constitutes or&lt;br /&gt;
          may be construed as permission to assert or imply that You&lt;br /&gt;
          are, or that Your use of the Licensed Material is, connected&lt;br /&gt;
          with, or sponsored, endorsed, or granted official status by,&lt;br /&gt;
          the Licensor or others designated to receive attribution as&lt;br /&gt;
          provided in Section 3(a)(1)(A)(i).&lt;br /&gt;
&lt;br /&gt;
  b. Other rights.&lt;br /&gt;
&lt;br /&gt;
       1. Moral rights, such as the right of integrity, are not&lt;br /&gt;
          licensed under this Public License, nor are publicity,&lt;br /&gt;
          privacy, and/or other similar personality rights; however, to&lt;br /&gt;
          the extent possible, the Licensor waives and/or agrees not to&lt;br /&gt;
          assert any such rights held by the Licensor to the limited&lt;br /&gt;
          extent necessary to allow You to exercise the Licensed&lt;br /&gt;
          Rights, but not otherwise.&lt;br /&gt;
&lt;br /&gt;
       2. Patent and trademark rights are not licensed under this&lt;br /&gt;
          Public License.&lt;br /&gt;
&lt;br /&gt;
       3. To the extent possible, the Licensor waives any right to&lt;br /&gt;
          collect royalties from You for the exercise of the Licensed&lt;br /&gt;
          Rights, whether directly or through a collecting society&lt;br /&gt;
          under any voluntary or waivable statutory or compulsory&lt;br /&gt;
          licensing scheme. In all other cases the Licensor expressly&lt;br /&gt;
          reserves any right to collect such royalties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 3 -- License Conditions.&lt;br /&gt;
&lt;br /&gt;
Your exercise of the Licensed Rights is expressly made subject to the&lt;br /&gt;
following conditions.&lt;br /&gt;
&lt;br /&gt;
  a. Attribution.&lt;br /&gt;
&lt;br /&gt;
       1. If You Share the Licensed Material (including in modified&lt;br /&gt;
          form), You must:&lt;br /&gt;
&lt;br /&gt;
            a. retain the following if it is supplied by the Licensor&lt;br /&gt;
               with the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
                 i. identification of the creator(s) of the Licensed&lt;br /&gt;
                    Material and any others designated to receive&lt;br /&gt;
                    attribution, in any reasonable manner requested by&lt;br /&gt;
                    the Licensor (including by pseudonym if&lt;br /&gt;
                    designated);&lt;br /&gt;
&lt;br /&gt;
                ii. a copyright notice;&lt;br /&gt;
&lt;br /&gt;
               iii. a notice that refers to this Public License;&lt;br /&gt;
&lt;br /&gt;
                iv. a notice that refers to the disclaimer of&lt;br /&gt;
                    warranties;&lt;br /&gt;
&lt;br /&gt;
                 v. a URI or hyperlink to the Licensed Material to the&lt;br /&gt;
                    extent reasonably practicable;&lt;br /&gt;
&lt;br /&gt;
            b. indicate if You modified the Licensed Material and&lt;br /&gt;
               retain an indication of any previous modifications; and&lt;br /&gt;
&lt;br /&gt;
            c. indicate the Licensed Material is licensed under this&lt;br /&gt;
               Public License, and include the text of, or the URI or&lt;br /&gt;
               hyperlink to, this Public License.&lt;br /&gt;
&lt;br /&gt;
       2. You may satisfy the conditions in Section 3(a)(1) in any&lt;br /&gt;
          reasonable manner based on the medium, means, and context in&lt;br /&gt;
          which You Share the Licensed Material. For example, it may be&lt;br /&gt;
          reasonable to satisfy the conditions by providing a URI or&lt;br /&gt;
          hyperlink to a resource that includes the required&lt;br /&gt;
          information.&lt;br /&gt;
&lt;br /&gt;
       3. If requested by the Licensor, You must remove any of the&lt;br /&gt;
          information required by Section 3(a)(1)(A) to the extent&lt;br /&gt;
          reasonably practicable.&lt;br /&gt;
&lt;br /&gt;
       4. If You Share Adapted Material You produce, the Adapter&#039;s&lt;br /&gt;
          License You apply must not prevent recipients of the Adapted&lt;br /&gt;
          Material from complying with this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 4 -- Sui Generis Database Rights.&lt;br /&gt;
&lt;br /&gt;
Where the Licensed Rights include Sui Generis Database Rights that&lt;br /&gt;
apply to Your use of the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
  a. for the avoidance of doubt, Section 2(a)(1) grants You the right&lt;br /&gt;
     to extract, reuse, reproduce, and Share all or a substantial&lt;br /&gt;
     portion of the contents of the database;&lt;br /&gt;
&lt;br /&gt;
  b. if You include all or a substantial portion of the database&lt;br /&gt;
     contents in a database in which You have Sui Generis Database&lt;br /&gt;
     Rights, then the database in which You have Sui Generis Database&lt;br /&gt;
     Rights (but not its individual contents) is Adapted Material; and&lt;br /&gt;
&lt;br /&gt;
  c. You must comply with the conditions in Section 3(a) if You Share&lt;br /&gt;
     all or a substantial portion of the contents of the database.&lt;br /&gt;
&lt;br /&gt;
For the avoidance of doubt, this Section 4 supplements and does not&lt;br /&gt;
replace Your obligations under this Public License where the Licensed&lt;br /&gt;
Rights include other Copyright and Similar Rights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 5 -- Disclaimer of Warranties and Limitation of Liability.&lt;br /&gt;
&lt;br /&gt;
  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE&lt;br /&gt;
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS&lt;br /&gt;
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF&lt;br /&gt;
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,&lt;br /&gt;
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,&lt;br /&gt;
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR&lt;br /&gt;
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,&lt;br /&gt;
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT&lt;br /&gt;
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT&lt;br /&gt;
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE&lt;br /&gt;
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,&lt;br /&gt;
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,&lt;br /&gt;
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,&lt;br /&gt;
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR&lt;br /&gt;
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN&lt;br /&gt;
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR&lt;br /&gt;
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR&lt;br /&gt;
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  c. The disclaimer of warranties and limitation of liability provided&lt;br /&gt;
     above shall be interpreted in a manner that, to the extent&lt;br /&gt;
     possible, most closely approximates an absolute disclaimer and&lt;br /&gt;
     waiver of all liability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 6 -- Term and Termination.&lt;br /&gt;
&lt;br /&gt;
  a. This Public License applies for the term of the Copyright and&lt;br /&gt;
     Similar Rights licensed here. However, if You fail to comply with&lt;br /&gt;
     this Public License, then Your rights under this Public License&lt;br /&gt;
     terminate automatically.&lt;br /&gt;
&lt;br /&gt;
  b. Where Your right to use the Licensed Material has terminated under&lt;br /&gt;
     Section 6(a), it reinstates:&lt;br /&gt;
&lt;br /&gt;
       1. automatically as of the date the violation is cured, provided&lt;br /&gt;
          it is cured within 30 days of Your discovery of the&lt;br /&gt;
          violation; or&lt;br /&gt;
&lt;br /&gt;
       2. upon express reinstatement by the Licensor.&lt;br /&gt;
&lt;br /&gt;
     For the avoidance of doubt, this Section 6(b) does not affect any&lt;br /&gt;
     right the Licensor may have to seek remedies for Your violations&lt;br /&gt;
     of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. For the avoidance of doubt, the Licensor may also offer the&lt;br /&gt;
     Licensed Material under separate terms or conditions or stop&lt;br /&gt;
     distributing the Licensed Material at any time; however, doing so&lt;br /&gt;
     will not terminate this Public License.&lt;br /&gt;
&lt;br /&gt;
  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 7 -- Other Terms and Conditions.&lt;br /&gt;
&lt;br /&gt;
  a. The Licensor shall not be bound by any additional or different&lt;br /&gt;
     terms or conditions communicated by You unless expressly agreed.&lt;br /&gt;
&lt;br /&gt;
  b. Any arrangements, understandings, or agreements regarding the&lt;br /&gt;
     Licensed Material not stated herein are separate from and&lt;br /&gt;
     independent of the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 8 -- Interpretation.&lt;br /&gt;
&lt;br /&gt;
  a. For the avoidance of doubt, this Public License does not, and&lt;br /&gt;
     shall not be interpreted to, reduce, limit, restrict, or impose&lt;br /&gt;
     conditions on any use of the Licensed Material that could lawfully&lt;br /&gt;
     be made without permission under this Public License.&lt;br /&gt;
&lt;br /&gt;
  b. To the extent possible, if any provision of this Public License is&lt;br /&gt;
     deemed unenforceable, it shall be automatically reformed to the&lt;br /&gt;
     minimum extent necessary to make it enforceable. If the provision&lt;br /&gt;
     cannot be reformed, it shall be severed from this Public License&lt;br /&gt;
     without affecting the enforceability of the remaining terms and&lt;br /&gt;
     conditions.&lt;br /&gt;
&lt;br /&gt;
  c. No term or condition of this Public License will be waived and no&lt;br /&gt;
     failure to comply consented to unless expressly agreed to by the&lt;br /&gt;
     Licensor.&lt;br /&gt;
&lt;br /&gt;
  d. Nothing in this Public License constitutes or may be interpreted&lt;br /&gt;
     as a limitation upon, or waiver of, any privileges and immunities&lt;br /&gt;
     that apply to the Licensor or You, including from the legal&lt;br /&gt;
     processes of any jurisdiction or authority.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons is not a party to its public&lt;br /&gt;
licenses. Notwithstanding, Creative Commons may elect to apply one of&lt;br /&gt;
its public licenses to material it publishes and in those instances&lt;br /&gt;
will be considered the “Licensor.” The text of the Creative Commons&lt;br /&gt;
public licenses is dedicated to the public domain under the CC0 Public&lt;br /&gt;
Domain Dedication. Except for the limited purpose of indicating that&lt;br /&gt;
material is shared under a Creative Commons public license or as&lt;br /&gt;
otherwise permitted by the Creative Commons policies published at&lt;br /&gt;
creativecommons.org/policies, Creative Commons does not authorize the&lt;br /&gt;
use of the trademark &amp;quot;Creative Commons&amp;quot; or any other trademark or logo&lt;br /&gt;
of Creative Commons without its prior written consent including,&lt;br /&gt;
without limitation, in connection with any unauthorized modifications&lt;br /&gt;
to any of its public licenses or any other arrangements,&lt;br /&gt;
understandings, or agreements concerning use of licensed material. For&lt;br /&gt;
the avoidance of doubt, this paragraph does not form part of the&lt;br /&gt;
public licenses.&lt;br /&gt;
&lt;br /&gt;
Creative Commons may be contacted at creativecommons.org.&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=118</id>
		<title>Sdfcntutorials:著作权</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=118"/>
		<updated>2025-08-20T01:51:19Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;Attribution 4.0 International&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Corporation (&amp;quot;Creative Commons&amp;quot;) is not a law firm and&lt;br /&gt;
does not provide legal services or legal advice. Distribution of&lt;br /&gt;
Creative Commons public licenses does not create a lawyer-client or&lt;br /&gt;
other relationship. Creative Commons makes its licenses and related&lt;br /&gt;
information available on an &amp;quot;as-is&amp;quot; basis. Creative Commons gives no&lt;br /&gt;
warranties regarding its licenses, any material licensed under their&lt;br /&gt;
terms and conditions, or any related information. Creative Commons&lt;br /&gt;
disclaims all liability for damages resulting from their use to the&lt;br /&gt;
fullest extent possible.&lt;br /&gt;
&lt;br /&gt;
Using Creative Commons Public Licenses&lt;br /&gt;
&lt;br /&gt;
Creative Commons public licenses provide a standard set of terms and&lt;br /&gt;
conditions that creators and other rights holders may use to share&lt;br /&gt;
original works of authorship and other material subject to copyright&lt;br /&gt;
and certain other rights specified in the public license below. The&lt;br /&gt;
following considerations are for informational purposes only, are not&lt;br /&gt;
exhaustive, and do not form part of our licenses.&lt;br /&gt;
&lt;br /&gt;
     Considerations for licensors: Our public licenses are&lt;br /&gt;
     intended for use by those authorized to give the public&lt;br /&gt;
     permission to use material in ways otherwise restricted by&lt;br /&gt;
     copyright and certain other rights. Our licenses are&lt;br /&gt;
     irrevocable. Licensors should read and understand the terms&lt;br /&gt;
     and conditions of the license they choose before applying it.&lt;br /&gt;
     Licensors should also secure all rights necessary before&lt;br /&gt;
     applying our licenses so that the public can reuse the&lt;br /&gt;
     material as expected. Licensors should clearly mark any&lt;br /&gt;
     material not subject to the license. This includes other CC-&lt;br /&gt;
     licensed material, or material used under an exception or&lt;br /&gt;
     limitation to copyright. More considerations for licensors:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensors&lt;br /&gt;
&lt;br /&gt;
     Considerations for the public: By using one of our public&lt;br /&gt;
     licenses, a licensor grants the public permission to use the&lt;br /&gt;
     licensed material under specified terms and conditions. If&lt;br /&gt;
     the licensor&#039;s permission is not necessary for any reason--for&lt;br /&gt;
     example, because of any applicable exception or limitation to&lt;br /&gt;
     copyright--then that use is not regulated by the license. Our&lt;br /&gt;
     licenses grant only permissions under copyright and certain&lt;br /&gt;
     other rights that a licensor has authority to grant. Use of&lt;br /&gt;
     the licensed material may still be restricted for other&lt;br /&gt;
     reasons, including because others have copyright or other&lt;br /&gt;
     rights in the material. A licensor may make special requests,&lt;br /&gt;
     such as asking that all changes be marked or described.&lt;br /&gt;
     Although not required by our licenses, you are encouraged to&lt;br /&gt;
     respect those requests where reasonable. More considerations&lt;br /&gt;
     for the public:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensees&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Attribution 4.0 International Public License&lt;br /&gt;
&lt;br /&gt;
By exercising the Licensed Rights (defined below), You accept and agree&lt;br /&gt;
to be bound by the terms and conditions of this Creative Commons&lt;br /&gt;
Attribution 4.0 International Public License (&amp;quot;Public License&amp;quot;). To the&lt;br /&gt;
extent this Public License may be interpreted as a contract, You are&lt;br /&gt;
granted the Licensed Rights in consideration of Your acceptance of&lt;br /&gt;
these terms and conditions, and the Licensor grants You such rights in&lt;br /&gt;
consideration of benefits the Licensor receives from making the&lt;br /&gt;
Licensed Material available under these terms and conditions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 1 -- Definitions.&lt;br /&gt;
&lt;br /&gt;
  a. Adapted Material means material subject to Copyright and Similar&lt;br /&gt;
     Rights that is derived from or based upon the Licensed Material&lt;br /&gt;
     and in which the Licensed Material is translated, altered,&lt;br /&gt;
     arranged, transformed, or otherwise modified in a manner requiring&lt;br /&gt;
     permission under the Copyright and Similar Rights held by the&lt;br /&gt;
     Licensor. For purposes of this Public License, where the Licensed&lt;br /&gt;
     Material is a musical work, performance, or sound recording,&lt;br /&gt;
     Adapted Material is always produced where the Licensed Material is&lt;br /&gt;
     synched in timed relation with a moving image.&lt;br /&gt;
&lt;br /&gt;
  b. Adapter&#039;s License means the license You apply to Your Copyright&lt;br /&gt;
     and Similar Rights in Your contributions to Adapted Material in&lt;br /&gt;
     accordance with the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. Copyright and Similar Rights means copyright and/or similar rights&lt;br /&gt;
     closely related to copyright including, without limitation,&lt;br /&gt;
     performance, broadcast, sound recording, and Sui Generis Database&lt;br /&gt;
     Rights, without regard to how the rights are labeled or&lt;br /&gt;
     categorized. For purposes of this Public License, the rights&lt;br /&gt;
     specified in Section 2(b)(1)-(2) are not Copyright and Similar&lt;br /&gt;
     Rights.&lt;br /&gt;
&lt;br /&gt;
  d. Effective Technological Measures means those measures that, in the&lt;br /&gt;
     absence of proper authority, may not be circumvented under laws&lt;br /&gt;
     fulfilling obligations under Article 11 of the WIPO Copyright&lt;br /&gt;
     Treaty adopted on December 20, 1996, and/or similar international&lt;br /&gt;
     agreements.&lt;br /&gt;
&lt;br /&gt;
  e. Exceptions and Limitations means fair use, fair dealing, and/or&lt;br /&gt;
     any other exception or limitation to Copyright and Similar Rights&lt;br /&gt;
     that applies to Your use of the Licensed Material.&lt;br /&gt;
&lt;br /&gt;
  f. Licensed Material means the artistic or literary work, database,&lt;br /&gt;
     or other material to which the Licensor applied this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
  g. Licensed Rights means the rights granted to You subject to the&lt;br /&gt;
     terms and conditions of this Public License, which are limited to&lt;br /&gt;
     all Copyright and Similar Rights that apply to Your use of the&lt;br /&gt;
     Licensed Material and that the Licensor has authority to license.&lt;br /&gt;
&lt;br /&gt;
  h. Licensor means the individual(s) or entity(ies) granting rights&lt;br /&gt;
     under this Public License.&lt;br /&gt;
&lt;br /&gt;
  i. Share means to provide material to the public by any means or&lt;br /&gt;
     process that requires permission under the Licensed Rights, such&lt;br /&gt;
     as reproduction, public display, public performance, distribution,&lt;br /&gt;
     dissemination, communication, or importation, and to make material&lt;br /&gt;
     available to the public including in ways that members of the&lt;br /&gt;
     public may access the material from a place and at a time&lt;br /&gt;
     individually chosen by them.&lt;br /&gt;
&lt;br /&gt;
  j. Sui Generis Database Rights means rights other than copyright&lt;br /&gt;
     resulting from Directive 96/9/EC of the European Parliament and of&lt;br /&gt;
     the Council of 11 March 1996 on the legal protection of databases,&lt;br /&gt;
     as amended and/or succeeded, as well as other essentially&lt;br /&gt;
     equivalent rights anywhere in the world.&lt;br /&gt;
&lt;br /&gt;
  k. You means the individual or entity exercising the Licensed Rights&lt;br /&gt;
     under this Public License. Your has a corresponding meaning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 2 -- Scope.&lt;br /&gt;
&lt;br /&gt;
  a. License grant.&lt;br /&gt;
&lt;br /&gt;
       1. Subject to the terms and conditions of this Public License,&lt;br /&gt;
          the Licensor hereby grants You a worldwide, royalty-free,&lt;br /&gt;
          non-sublicensable, non-exclusive, irrevocable license to&lt;br /&gt;
          exercise the Licensed Rights in the Licensed Material to:&lt;br /&gt;
&lt;br /&gt;
            a. reproduce and Share the Licensed Material, in whole or&lt;br /&gt;
               in part; and&lt;br /&gt;
&lt;br /&gt;
            b. produce, reproduce, and Share Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       2. Exceptions and Limitations. For the avoidance of doubt, where&lt;br /&gt;
          Exceptions and Limitations apply to Your use, this Public&lt;br /&gt;
          License does not apply, and You do not need to comply with&lt;br /&gt;
          its terms and conditions.&lt;br /&gt;
&lt;br /&gt;
       3. Term. The term of this Public License is specified in Section&lt;br /&gt;
          6(a).&lt;br /&gt;
&lt;br /&gt;
       4. Media and formats; technical modifications allowed. The&lt;br /&gt;
          Licensor authorizes You to exercise the Licensed Rights in&lt;br /&gt;
          all media and formats whether now known or hereafter created,&lt;br /&gt;
          and to make technical modifications necessary to do so. The&lt;br /&gt;
          Licensor waives and/or agrees not to assert any right or&lt;br /&gt;
          authority to forbid You from making technical modifications&lt;br /&gt;
          necessary to exercise the Licensed Rights, including&lt;br /&gt;
          technical modifications necessary to circumvent Effective&lt;br /&gt;
          Technological Measures. For purposes of this Public License,&lt;br /&gt;
          simply making modifications authorized by this Section 2(a)&lt;br /&gt;
          (4) never produces Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       5. Downstream recipients.&lt;br /&gt;
&lt;br /&gt;
            a. Offer from the Licensor -- Licensed Material. Every&lt;br /&gt;
               recipient of the Licensed Material automatically&lt;br /&gt;
               receives an offer from the Licensor to exercise the&lt;br /&gt;
               Licensed Rights under the terms and conditions of this&lt;br /&gt;
               Public License.&lt;br /&gt;
&lt;br /&gt;
            b. No downstream restrictions. You may not offer or impose&lt;br /&gt;
               any additional or different terms or conditions on, or&lt;br /&gt;
               apply any Effective Technological Measures to, the&lt;br /&gt;
               Licensed Material if doing so restricts exercise of the&lt;br /&gt;
               Licensed Rights by any recipient of the Licensed&lt;br /&gt;
               Material.&lt;br /&gt;
&lt;br /&gt;
       6. No endorsement. Nothing in this Public License constitutes or&lt;br /&gt;
          may be construed as permission to assert or imply that You&lt;br /&gt;
          are, or that Your use of the Licensed Material is, connected&lt;br /&gt;
          with, or sponsored, endorsed, or granted official status by,&lt;br /&gt;
          the Licensor or others designated to receive attribution as&lt;br /&gt;
          provided in Section 3(a)(1)(A)(i).&lt;br /&gt;
&lt;br /&gt;
  b. Other rights.&lt;br /&gt;
&lt;br /&gt;
       1. Moral rights, such as the right of integrity, are not&lt;br /&gt;
          licensed under this Public License, nor are publicity,&lt;br /&gt;
          privacy, and/or other similar personality rights; however, to&lt;br /&gt;
          the extent possible, the Licensor waives and/or agrees not to&lt;br /&gt;
          assert any such rights held by the Licensor to the limited&lt;br /&gt;
          extent necessary to allow You to exercise the Licensed&lt;br /&gt;
          Rights, but not otherwise.&lt;br /&gt;
&lt;br /&gt;
       2. Patent and trademark rights are not licensed under this&lt;br /&gt;
          Public License.&lt;br /&gt;
&lt;br /&gt;
       3. To the extent possible, the Licensor waives any right to&lt;br /&gt;
          collect royalties from You for the exercise of the Licensed&lt;br /&gt;
          Rights, whether directly or through a collecting society&lt;br /&gt;
          under any voluntary or waivable statutory or compulsory&lt;br /&gt;
          licensing scheme. In all other cases the Licensor expressly&lt;br /&gt;
          reserves any right to collect such royalties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 3 -- License Conditions.&lt;br /&gt;
&lt;br /&gt;
Your exercise of the Licensed Rights is expressly made subject to the&lt;br /&gt;
following conditions.&lt;br /&gt;
&lt;br /&gt;
  a. Attribution.&lt;br /&gt;
&lt;br /&gt;
       1. If You Share the Licensed Material (including in modified&lt;br /&gt;
          form), You must:&lt;br /&gt;
&lt;br /&gt;
            a. retain the following if it is supplied by the Licensor&lt;br /&gt;
               with the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
                 i. identification of the creator(s) of the Licensed&lt;br /&gt;
                    Material and any others designated to receive&lt;br /&gt;
                    attribution, in any reasonable manner requested by&lt;br /&gt;
                    the Licensor (including by pseudonym if&lt;br /&gt;
                    designated);&lt;br /&gt;
&lt;br /&gt;
                ii. a copyright notice;&lt;br /&gt;
&lt;br /&gt;
               iii. a notice that refers to this Public License;&lt;br /&gt;
&lt;br /&gt;
                iv. a notice that refers to the disclaimer of&lt;br /&gt;
                    warranties;&lt;br /&gt;
&lt;br /&gt;
                 v. a URI or hyperlink to the Licensed Material to the&lt;br /&gt;
                    extent reasonably practicable;&lt;br /&gt;
&lt;br /&gt;
            b. indicate if You modified the Licensed Material and&lt;br /&gt;
               retain an indication of any previous modifications; and&lt;br /&gt;
&lt;br /&gt;
            c. indicate the Licensed Material is licensed under this&lt;br /&gt;
               Public License, and include the text of, or the URI or&lt;br /&gt;
               hyperlink to, this Public License.&lt;br /&gt;
&lt;br /&gt;
       2. You may satisfy the conditions in Section 3(a)(1) in any&lt;br /&gt;
          reasonable manner based on the medium, means, and context in&lt;br /&gt;
          which You Share the Licensed Material. For example, it may be&lt;br /&gt;
          reasonable to satisfy the conditions by providing a URI or&lt;br /&gt;
          hyperlink to a resource that includes the required&lt;br /&gt;
          information.&lt;br /&gt;
&lt;br /&gt;
       3. If requested by the Licensor, You must remove any of the&lt;br /&gt;
          information required by Section 3(a)(1)(A) to the extent&lt;br /&gt;
          reasonably practicable.&lt;br /&gt;
&lt;br /&gt;
       4. If You Share Adapted Material You produce, the Adapter&#039;s&lt;br /&gt;
          License You apply must not prevent recipients of the Adapted&lt;br /&gt;
          Material from complying with this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 4 -- Sui Generis Database Rights.&lt;br /&gt;
&lt;br /&gt;
Where the Licensed Rights include Sui Generis Database Rights that&lt;br /&gt;
apply to Your use of the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
  a. for the avoidance of doubt, Section 2(a)(1) grants You the right&lt;br /&gt;
     to extract, reuse, reproduce, and Share all or a substantial&lt;br /&gt;
     portion of the contents of the database;&lt;br /&gt;
&lt;br /&gt;
  b. if You include all or a substantial portion of the database&lt;br /&gt;
     contents in a database in which You have Sui Generis Database&lt;br /&gt;
     Rights, then the database in which You have Sui Generis Database&lt;br /&gt;
     Rights (but not its individual contents) is Adapted Material; and&lt;br /&gt;
&lt;br /&gt;
  c. You must comply with the conditions in Section 3(a) if You Share&lt;br /&gt;
     all or a substantial portion of the contents of the database.&lt;br /&gt;
&lt;br /&gt;
For the avoidance of doubt, this Section 4 supplements and does not&lt;br /&gt;
replace Your obligations under this Public License where the Licensed&lt;br /&gt;
Rights include other Copyright and Similar Rights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 5 -- Disclaimer of Warranties and Limitation of Liability.&lt;br /&gt;
&lt;br /&gt;
  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE&lt;br /&gt;
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS&lt;br /&gt;
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF&lt;br /&gt;
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,&lt;br /&gt;
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,&lt;br /&gt;
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR&lt;br /&gt;
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,&lt;br /&gt;
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT&lt;br /&gt;
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT&lt;br /&gt;
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE&lt;br /&gt;
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,&lt;br /&gt;
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,&lt;br /&gt;
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,&lt;br /&gt;
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR&lt;br /&gt;
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN&lt;br /&gt;
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR&lt;br /&gt;
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR&lt;br /&gt;
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  c. The disclaimer of warranties and limitation of liability provided&lt;br /&gt;
     above shall be interpreted in a manner that, to the extent&lt;br /&gt;
     possible, most closely approximates an absolute disclaimer and&lt;br /&gt;
     waiver of all liability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 6 -- Term and Termination.&lt;br /&gt;
&lt;br /&gt;
  a. This Public License applies for the term of the Copyright and&lt;br /&gt;
     Similar Rights licensed here. However, if You fail to comply with&lt;br /&gt;
     this Public License, then Your rights under this Public License&lt;br /&gt;
     terminate automatically.&lt;br /&gt;
&lt;br /&gt;
  b. Where Your right to use the Licensed Material has terminated under&lt;br /&gt;
     Section 6(a), it reinstates:&lt;br /&gt;
&lt;br /&gt;
       1. automatically as of the date the violation is cured, provided&lt;br /&gt;
          it is cured within 30 days of Your discovery of the&lt;br /&gt;
          violation; or&lt;br /&gt;
&lt;br /&gt;
       2. upon express reinstatement by the Licensor.&lt;br /&gt;
&lt;br /&gt;
     For the avoidance of doubt, this Section 6(b) does not affect any&lt;br /&gt;
     right the Licensor may have to seek remedies for Your violations&lt;br /&gt;
     of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. For the avoidance of doubt, the Licensor may also offer the&lt;br /&gt;
     Licensed Material under separate terms or conditions or stop&lt;br /&gt;
     distributing the Licensed Material at any time; however, doing so&lt;br /&gt;
     will not terminate this Public License.&lt;br /&gt;
&lt;br /&gt;
  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 7 -- Other Terms and Conditions.&lt;br /&gt;
&lt;br /&gt;
  a. The Licensor shall not be bound by any additional or different&lt;br /&gt;
     terms or conditions communicated by You unless expressly agreed.&lt;br /&gt;
&lt;br /&gt;
  b. Any arrangements, understandings, or agreements regarding the&lt;br /&gt;
     Licensed Material not stated herein are separate from and&lt;br /&gt;
     independent of the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 8 -- Interpretation.&lt;br /&gt;
&lt;br /&gt;
  a. For the avoidance of doubt, this Public License does not, and&lt;br /&gt;
     shall not be interpreted to, reduce, limit, restrict, or impose&lt;br /&gt;
     conditions on any use of the Licensed Material that could lawfully&lt;br /&gt;
     be made without permission under this Public License.&lt;br /&gt;
&lt;br /&gt;
  b. To the extent possible, if any provision of this Public License is&lt;br /&gt;
     deemed unenforceable, it shall be automatically reformed to the&lt;br /&gt;
     minimum extent necessary to make it enforceable. If the provision&lt;br /&gt;
     cannot be reformed, it shall be severed from this Public License&lt;br /&gt;
     without affecting the enforceability of the remaining terms and&lt;br /&gt;
     conditions.&lt;br /&gt;
&lt;br /&gt;
  c. No term or condition of this Public License will be waived and no&lt;br /&gt;
     failure to comply consented to unless expressly agreed to by the&lt;br /&gt;
     Licensor.&lt;br /&gt;
&lt;br /&gt;
  d. Nothing in this Public License constitutes or may be interpreted&lt;br /&gt;
     as a limitation upon, or waiver of, any privileges and immunities&lt;br /&gt;
     that apply to the Licensor or You, including from the legal&lt;br /&gt;
     processes of any jurisdiction or authority.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons is not a party to its public&lt;br /&gt;
licenses. Notwithstanding, Creative Commons may elect to apply one of&lt;br /&gt;
its public licenses to material it publishes and in those instances&lt;br /&gt;
will be considered the “Licensor.” The text of the Creative Commons&lt;br /&gt;
public licenses is dedicated to the public domain under the CC0 Public&lt;br /&gt;
Domain Dedication. Except for the limited purpose of indicating that&lt;br /&gt;
material is shared under a Creative Commons public license or as&lt;br /&gt;
otherwise permitted by the Creative Commons policies published at&lt;br /&gt;
creativecommons.org/policies, Creative Commons does not authorize the&lt;br /&gt;
use of the trademark &amp;quot;Creative Commons&amp;quot; or any other trademark or logo&lt;br /&gt;
of Creative Commons without its prior written consent including,&lt;br /&gt;
without limitation, in connection with any unauthorized modifications&lt;br /&gt;
to any of its public licenses or any other arrangements,&lt;br /&gt;
understandings, or agreements concerning use of licensed material. For&lt;br /&gt;
the avoidance of doubt, this paragraph does not form part of the&lt;br /&gt;
public licenses.&lt;br /&gt;
&lt;br /&gt;
Creative Commons may be contacted at creativecommons.org.&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=117</id>
		<title>Sdfcntutorials:著作权</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=117"/>
		<updated>2025-08-20T01:44:14Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Attribution 4.0 International&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Corporation (&amp;quot;Creative Commons&amp;quot;) is not a law firm and&lt;br /&gt;
does not provide legal services or legal advice. Distribution of&lt;br /&gt;
Creative Commons public licenses does not create a lawyer-client or&lt;br /&gt;
other relationship. Creative Commons makes its licenses and related&lt;br /&gt;
information available on an &amp;quot;as-is&amp;quot; basis. Creative Commons gives no&lt;br /&gt;
warranties regarding its licenses, any material licensed under their&lt;br /&gt;
terms and conditions, or any related information. Creative Commons&lt;br /&gt;
disclaims all liability for damages resulting from their use to the&lt;br /&gt;
fullest extent possible.&lt;br /&gt;
&lt;br /&gt;
Using Creative Commons Public Licenses&lt;br /&gt;
&lt;br /&gt;
Creative Commons public licenses provide a standard set of terms and&lt;br /&gt;
conditions that creators and other rights holders may use to share&lt;br /&gt;
original works of authorship and other material subject to copyright&lt;br /&gt;
and certain other rights specified in the public license below. The&lt;br /&gt;
following considerations are for informational purposes only, are not&lt;br /&gt;
exhaustive, and do not form part of our licenses.&lt;br /&gt;
&lt;br /&gt;
     Considerations for licensors: Our public licenses are&lt;br /&gt;
     intended for use by those authorized to give the public&lt;br /&gt;
     permission to use material in ways otherwise restricted by&lt;br /&gt;
     copyright and certain other rights. Our licenses are&lt;br /&gt;
     irrevocable. Licensors should read and understand the terms&lt;br /&gt;
     and conditions of the license they choose before applying it.&lt;br /&gt;
     Licensors should also secure all rights necessary before&lt;br /&gt;
     applying our licenses so that the public can reuse the&lt;br /&gt;
     material as expected. Licensors should clearly mark any&lt;br /&gt;
     material not subject to the license. This includes other CC-&lt;br /&gt;
     licensed material, or material used under an exception or&lt;br /&gt;
     limitation to copyright. More considerations for licensors:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensors&lt;br /&gt;
&lt;br /&gt;
     Considerations for the public: By using one of our public&lt;br /&gt;
     licenses, a licensor grants the public permission to use the&lt;br /&gt;
     licensed material under specified terms and conditions. If&lt;br /&gt;
     the licensor&#039;s permission is not necessary for any reason--for&lt;br /&gt;
     example, because of any applicable exception or limitation to&lt;br /&gt;
     copyright--then that use is not regulated by the license. Our&lt;br /&gt;
     licenses grant only permissions under copyright and certain&lt;br /&gt;
     other rights that a licensor has authority to grant. Use of&lt;br /&gt;
     the licensed material may still be restricted for other&lt;br /&gt;
     reasons, including because others have copyright or other&lt;br /&gt;
     rights in the material. A licensor may make special requests,&lt;br /&gt;
     such as asking that all changes be marked or described.&lt;br /&gt;
     Although not required by our licenses, you are encouraged to&lt;br /&gt;
     respect those requests where reasonable. More considerations&lt;br /&gt;
     for the public:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensees&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Attribution 4.0 International Public License&lt;br /&gt;
&lt;br /&gt;
By exercising the Licensed Rights (defined below), You accept and agree&lt;br /&gt;
to be bound by the terms and conditions of this Creative Commons&lt;br /&gt;
Attribution 4.0 International Public License (&amp;quot;Public License&amp;quot;). To the&lt;br /&gt;
extent this Public License may be interpreted as a contract, You are&lt;br /&gt;
granted the Licensed Rights in consideration of Your acceptance of&lt;br /&gt;
these terms and conditions, and the Licensor grants You such rights in&lt;br /&gt;
consideration of benefits the Licensor receives from making the&lt;br /&gt;
Licensed Material available under these terms and conditions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 1 -- Definitions.&lt;br /&gt;
&lt;br /&gt;
  a. Adapted Material means material subject to Copyright and Similar&lt;br /&gt;
     Rights that is derived from or based upon the Licensed Material&lt;br /&gt;
     and in which the Licensed Material is translated, altered,&lt;br /&gt;
     arranged, transformed, or otherwise modified in a manner requiring&lt;br /&gt;
     permission under the Copyright and Similar Rights held by the&lt;br /&gt;
     Licensor. For purposes of this Public License, where the Licensed&lt;br /&gt;
     Material is a musical work, performance, or sound recording,&lt;br /&gt;
     Adapted Material is always produced where the Licensed Material is&lt;br /&gt;
     synched in timed relation with a moving image.&lt;br /&gt;
&lt;br /&gt;
  b. Adapter&#039;s License means the license You apply to Your Copyright&lt;br /&gt;
     and Similar Rights in Your contributions to Adapted Material in&lt;br /&gt;
     accordance with the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. Copyright and Similar Rights means copyright and/or similar rights&lt;br /&gt;
     closely related to copyright including, without limitation,&lt;br /&gt;
     performance, broadcast, sound recording, and Sui Generis Database&lt;br /&gt;
     Rights, without regard to how the rights are labeled or&lt;br /&gt;
     categorized. For purposes of this Public License, the rights&lt;br /&gt;
     specified in Section 2(b)(1)-(2) are not Copyright and Similar&lt;br /&gt;
     Rights.&lt;br /&gt;
&lt;br /&gt;
  d. Effective Technological Measures means those measures that, in the&lt;br /&gt;
     absence of proper authority, may not be circumvented under laws&lt;br /&gt;
     fulfilling obligations under Article 11 of the WIPO Copyright&lt;br /&gt;
     Treaty adopted on December 20, 1996, and/or similar international&lt;br /&gt;
     agreements.&lt;br /&gt;
&lt;br /&gt;
  e. Exceptions and Limitations means fair use, fair dealing, and/or&lt;br /&gt;
     any other exception or limitation to Copyright and Similar Rights&lt;br /&gt;
     that applies to Your use of the Licensed Material.&lt;br /&gt;
&lt;br /&gt;
  f. Licensed Material means the artistic or literary work, database,&lt;br /&gt;
     or other material to which the Licensor applied this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
  g. Licensed Rights means the rights granted to You subject to the&lt;br /&gt;
     terms and conditions of this Public License, which are limited to&lt;br /&gt;
     all Copyright and Similar Rights that apply to Your use of the&lt;br /&gt;
     Licensed Material and that the Licensor has authority to license.&lt;br /&gt;
&lt;br /&gt;
  h. Licensor means the individual(s) or entity(ies) granting rights&lt;br /&gt;
     under this Public License.&lt;br /&gt;
&lt;br /&gt;
  i. Share means to provide material to the public by any means or&lt;br /&gt;
     process that requires permission under the Licensed Rights, such&lt;br /&gt;
     as reproduction, public display, public performance, distribution,&lt;br /&gt;
     dissemination, communication, or importation, and to make material&lt;br /&gt;
     available to the public including in ways that members of the&lt;br /&gt;
     public may access the material from a place and at a time&lt;br /&gt;
     individually chosen by them.&lt;br /&gt;
&lt;br /&gt;
  j. Sui Generis Database Rights means rights other than copyright&lt;br /&gt;
     resulting from Directive 96/9/EC of the European Parliament and of&lt;br /&gt;
     the Council of 11 March 1996 on the legal protection of databases,&lt;br /&gt;
     as amended and/or succeeded, as well as other essentially&lt;br /&gt;
     equivalent rights anywhere in the world.&lt;br /&gt;
&lt;br /&gt;
  k. You means the individual or entity exercising the Licensed Rights&lt;br /&gt;
     under this Public License. Your has a corresponding meaning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 2 -- Scope.&lt;br /&gt;
&lt;br /&gt;
  a. License grant.&lt;br /&gt;
&lt;br /&gt;
       1. Subject to the terms and conditions of this Public License,&lt;br /&gt;
          the Licensor hereby grants You a worldwide, royalty-free,&lt;br /&gt;
          non-sublicensable, non-exclusive, irrevocable license to&lt;br /&gt;
          exercise the Licensed Rights in the Licensed Material to:&lt;br /&gt;
&lt;br /&gt;
            a. reproduce and Share the Licensed Material, in whole or&lt;br /&gt;
               in part; and&lt;br /&gt;
&lt;br /&gt;
            b. produce, reproduce, and Share Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       2. Exceptions and Limitations. For the avoidance of doubt, where&lt;br /&gt;
          Exceptions and Limitations apply to Your use, this Public&lt;br /&gt;
          License does not apply, and You do not need to comply with&lt;br /&gt;
          its terms and conditions.&lt;br /&gt;
&lt;br /&gt;
       3. Term. The term of this Public License is specified in Section&lt;br /&gt;
          6(a).&lt;br /&gt;
&lt;br /&gt;
       4. Media and formats; technical modifications allowed. The&lt;br /&gt;
          Licensor authorizes You to exercise the Licensed Rights in&lt;br /&gt;
          all media and formats whether now known or hereafter created,&lt;br /&gt;
          and to make technical modifications necessary to do so. The&lt;br /&gt;
          Licensor waives and/or agrees not to assert any right or&lt;br /&gt;
          authority to forbid You from making technical modifications&lt;br /&gt;
          necessary to exercise the Licensed Rights, including&lt;br /&gt;
          technical modifications necessary to circumvent Effective&lt;br /&gt;
          Technological Measures. For purposes of this Public License,&lt;br /&gt;
          simply making modifications authorized by this Section 2(a)&lt;br /&gt;
          (4) never produces Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       5. Downstream recipients.&lt;br /&gt;
&lt;br /&gt;
            a. Offer from the Licensor -- Licensed Material. Every&lt;br /&gt;
               recipient of the Licensed Material automatically&lt;br /&gt;
               receives an offer from the Licensor to exercise the&lt;br /&gt;
               Licensed Rights under the terms and conditions of this&lt;br /&gt;
               Public License.&lt;br /&gt;
&lt;br /&gt;
            b. No downstream restrictions. You may not offer or impose&lt;br /&gt;
               any additional or different terms or conditions on, or&lt;br /&gt;
               apply any Effective Technological Measures to, the&lt;br /&gt;
               Licensed Material if doing so restricts exercise of the&lt;br /&gt;
               Licensed Rights by any recipient of the Licensed&lt;br /&gt;
               Material.&lt;br /&gt;
&lt;br /&gt;
       6. No endorsement. Nothing in this Public License constitutes or&lt;br /&gt;
          may be construed as permission to assert or imply that You&lt;br /&gt;
          are, or that Your use of the Licensed Material is, connected&lt;br /&gt;
          with, or sponsored, endorsed, or granted official status by,&lt;br /&gt;
          the Licensor or others designated to receive attribution as&lt;br /&gt;
          provided in Section 3(a)(1)(A)(i).&lt;br /&gt;
&lt;br /&gt;
  b. Other rights.&lt;br /&gt;
&lt;br /&gt;
       1. Moral rights, such as the right of integrity, are not&lt;br /&gt;
          licensed under this Public License, nor are publicity,&lt;br /&gt;
          privacy, and/or other similar personality rights; however, to&lt;br /&gt;
          the extent possible, the Licensor waives and/or agrees not to&lt;br /&gt;
          assert any such rights held by the Licensor to the limited&lt;br /&gt;
          extent necessary to allow You to exercise the Licensed&lt;br /&gt;
          Rights, but not otherwise.&lt;br /&gt;
&lt;br /&gt;
       2. Patent and trademark rights are not licensed under this&lt;br /&gt;
          Public License.&lt;br /&gt;
&lt;br /&gt;
       3. To the extent possible, the Licensor waives any right to&lt;br /&gt;
          collect royalties from You for the exercise of the Licensed&lt;br /&gt;
          Rights, whether directly or through a collecting society&lt;br /&gt;
          under any voluntary or waivable statutory or compulsory&lt;br /&gt;
          licensing scheme. In all other cases the Licensor expressly&lt;br /&gt;
          reserves any right to collect such royalties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 3 -- License Conditions.&lt;br /&gt;
&lt;br /&gt;
Your exercise of the Licensed Rights is expressly made subject to the&lt;br /&gt;
following conditions.&lt;br /&gt;
&lt;br /&gt;
  a. Attribution.&lt;br /&gt;
&lt;br /&gt;
       1. If You Share the Licensed Material (including in modified&lt;br /&gt;
          form), You must:&lt;br /&gt;
&lt;br /&gt;
            a. retain the following if it is supplied by the Licensor&lt;br /&gt;
               with the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
                 i. identification of the creator(s) of the Licensed&lt;br /&gt;
                    Material and any others designated to receive&lt;br /&gt;
                    attribution, in any reasonable manner requested by&lt;br /&gt;
                    the Licensor (including by pseudonym if&lt;br /&gt;
                    designated);&lt;br /&gt;
&lt;br /&gt;
                ii. a copyright notice;&lt;br /&gt;
&lt;br /&gt;
               iii. a notice that refers to this Public License;&lt;br /&gt;
&lt;br /&gt;
                iv. a notice that refers to the disclaimer of&lt;br /&gt;
                    warranties;&lt;br /&gt;
&lt;br /&gt;
                 v. a URI or hyperlink to the Licensed Material to the&lt;br /&gt;
                    extent reasonably practicable;&lt;br /&gt;
&lt;br /&gt;
            b. indicate if You modified the Licensed Material and&lt;br /&gt;
               retain an indication of any previous modifications; and&lt;br /&gt;
&lt;br /&gt;
            c. indicate the Licensed Material is licensed under this&lt;br /&gt;
               Public License, and include the text of, or the URI or&lt;br /&gt;
               hyperlink to, this Public License.&lt;br /&gt;
&lt;br /&gt;
       2. You may satisfy the conditions in Section 3(a)(1) in any&lt;br /&gt;
          reasonable manner based on the medium, means, and context in&lt;br /&gt;
          which You Share the Licensed Material. For example, it may be&lt;br /&gt;
          reasonable to satisfy the conditions by providing a URI or&lt;br /&gt;
          hyperlink to a resource that includes the required&lt;br /&gt;
          information.&lt;br /&gt;
&lt;br /&gt;
       3. If requested by the Licensor, You must remove any of the&lt;br /&gt;
          information required by Section 3(a)(1)(A) to the extent&lt;br /&gt;
          reasonably practicable.&lt;br /&gt;
&lt;br /&gt;
       4. If You Share Adapted Material You produce, the Adapter&#039;s&lt;br /&gt;
          License You apply must not prevent recipients of the Adapted&lt;br /&gt;
          Material from complying with this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 4 -- Sui Generis Database Rights.&lt;br /&gt;
&lt;br /&gt;
Where the Licensed Rights include Sui Generis Database Rights that&lt;br /&gt;
apply to Your use of the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
  a. for the avoidance of doubt, Section 2(a)(1) grants You the right&lt;br /&gt;
     to extract, reuse, reproduce, and Share all or a substantial&lt;br /&gt;
     portion of the contents of the database;&lt;br /&gt;
&lt;br /&gt;
  b. if You include all or a substantial portion of the database&lt;br /&gt;
     contents in a database in which You have Sui Generis Database&lt;br /&gt;
     Rights, then the database in which You have Sui Generis Database&lt;br /&gt;
     Rights (but not its individual contents) is Adapted Material; and&lt;br /&gt;
&lt;br /&gt;
  c. You must comply with the conditions in Section 3(a) if You Share&lt;br /&gt;
     all or a substantial portion of the contents of the database.&lt;br /&gt;
&lt;br /&gt;
For the avoidance of doubt, this Section 4 supplements and does not&lt;br /&gt;
replace Your obligations under this Public License where the Licensed&lt;br /&gt;
Rights include other Copyright and Similar Rights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 5 -- Disclaimer of Warranties and Limitation of Liability.&lt;br /&gt;
&lt;br /&gt;
  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE&lt;br /&gt;
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS&lt;br /&gt;
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF&lt;br /&gt;
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,&lt;br /&gt;
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,&lt;br /&gt;
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR&lt;br /&gt;
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,&lt;br /&gt;
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT&lt;br /&gt;
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT&lt;br /&gt;
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE&lt;br /&gt;
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,&lt;br /&gt;
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,&lt;br /&gt;
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,&lt;br /&gt;
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR&lt;br /&gt;
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN&lt;br /&gt;
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR&lt;br /&gt;
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR&lt;br /&gt;
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  c. The disclaimer of warranties and limitation of liability provided&lt;br /&gt;
     above shall be interpreted in a manner that, to the extent&lt;br /&gt;
     possible, most closely approximates an absolute disclaimer and&lt;br /&gt;
     waiver of all liability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 6 -- Term and Termination.&lt;br /&gt;
&lt;br /&gt;
  a. This Public License applies for the term of the Copyright and&lt;br /&gt;
     Similar Rights licensed here. However, if You fail to comply with&lt;br /&gt;
     this Public License, then Your rights under this Public License&lt;br /&gt;
     terminate automatically.&lt;br /&gt;
&lt;br /&gt;
  b. Where Your right to use the Licensed Material has terminated under&lt;br /&gt;
     Section 6(a), it reinstates:&lt;br /&gt;
&lt;br /&gt;
       1. automatically as of the date the violation is cured, provided&lt;br /&gt;
          it is cured within 30 days of Your discovery of the&lt;br /&gt;
          violation; or&lt;br /&gt;
&lt;br /&gt;
       2. upon express reinstatement by the Licensor.&lt;br /&gt;
&lt;br /&gt;
     For the avoidance of doubt, this Section 6(b) does not affect any&lt;br /&gt;
     right the Licensor may have to seek remedies for Your violations&lt;br /&gt;
     of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. For the avoidance of doubt, the Licensor may also offer the&lt;br /&gt;
     Licensed Material under separate terms or conditions or stop&lt;br /&gt;
     distributing the Licensed Material at any time; however, doing so&lt;br /&gt;
     will not terminate this Public License.&lt;br /&gt;
&lt;br /&gt;
  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 7 -- Other Terms and Conditions.&lt;br /&gt;
&lt;br /&gt;
  a. The Licensor shall not be bound by any additional or different&lt;br /&gt;
     terms or conditions communicated by You unless expressly agreed.&lt;br /&gt;
&lt;br /&gt;
  b. Any arrangements, understandings, or agreements regarding the&lt;br /&gt;
     Licensed Material not stated herein are separate from and&lt;br /&gt;
     independent of the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 8 -- Interpretation.&lt;br /&gt;
&lt;br /&gt;
  a. For the avoidance of doubt, this Public License does not, and&lt;br /&gt;
     shall not be interpreted to, reduce, limit, restrict, or impose&lt;br /&gt;
     conditions on any use of the Licensed Material that could lawfully&lt;br /&gt;
     be made without permission under this Public License.&lt;br /&gt;
&lt;br /&gt;
  b. To the extent possible, if any provision of this Public License is&lt;br /&gt;
     deemed unenforceable, it shall be automatically reformed to the&lt;br /&gt;
     minimum extent necessary to make it enforceable. If the provision&lt;br /&gt;
     cannot be reformed, it shall be severed from this Public License&lt;br /&gt;
     without affecting the enforceability of the remaining terms and&lt;br /&gt;
     conditions.&lt;br /&gt;
&lt;br /&gt;
  c. No term or condition of this Public License will be waived and no&lt;br /&gt;
     failure to comply consented to unless expressly agreed to by the&lt;br /&gt;
     Licensor.&lt;br /&gt;
&lt;br /&gt;
  d. Nothing in this Public License constitutes or may be interpreted&lt;br /&gt;
     as a limitation upon, or waiver of, any privileges and immunities&lt;br /&gt;
     that apply to the Licensor or You, including from the legal&lt;br /&gt;
     processes of any jurisdiction or authority.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons is not a party to its public&lt;br /&gt;
licenses. Notwithstanding, Creative Commons may elect to apply one of&lt;br /&gt;
its public licenses to material it publishes and in those instances&lt;br /&gt;
will be considered the “Licensor.” The text of the Creative Commons&lt;br /&gt;
public licenses is dedicated to the public domain under the CC0 Public&lt;br /&gt;
Domain Dedication. Except for the limited purpose of indicating that&lt;br /&gt;
material is shared under a Creative Commons public license or as&lt;br /&gt;
otherwise permitted by the Creative Commons policies published at&lt;br /&gt;
creativecommons.org/policies, Creative Commons does not authorize the&lt;br /&gt;
use of the trademark &amp;quot;Creative Commons&amp;quot; or any other trademark or logo&lt;br /&gt;
of Creative Commons without its prior written consent including,&lt;br /&gt;
without limitation, in connection with any unauthorized modifications&lt;br /&gt;
to any of its public licenses or any other arrangements,&lt;br /&gt;
understandings, or agreements concerning use of licensed material. For&lt;br /&gt;
the avoidance of doubt, this paragraph does not form part of the&lt;br /&gt;
public licenses.&lt;br /&gt;
&lt;br /&gt;
Creative Commons may be contacted at creativecommons.org.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=116</id>
		<title>Sdfcntutorials:著作权</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=116"/>
		<updated>2025-08-20T01:43:45Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;```&lt;br /&gt;
Attribution 4.0 International&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Corporation (&amp;quot;Creative Commons&amp;quot;) is not a law firm and&lt;br /&gt;
does not provide legal services or legal advice. Distribution of&lt;br /&gt;
Creative Commons public licenses does not create a lawyer-client or&lt;br /&gt;
other relationship. Creative Commons makes its licenses and related&lt;br /&gt;
information available on an &amp;quot;as-is&amp;quot; basis. Creative Commons gives no&lt;br /&gt;
warranties regarding its licenses, any material licensed under their&lt;br /&gt;
terms and conditions, or any related information. Creative Commons&lt;br /&gt;
disclaims all liability for damages resulting from their use to the&lt;br /&gt;
fullest extent possible.&lt;br /&gt;
&lt;br /&gt;
Using Creative Commons Public Licenses&lt;br /&gt;
&lt;br /&gt;
Creative Commons public licenses provide a standard set of terms and&lt;br /&gt;
conditions that creators and other rights holders may use to share&lt;br /&gt;
original works of authorship and other material subject to copyright&lt;br /&gt;
and certain other rights specified in the public license below. The&lt;br /&gt;
following considerations are for informational purposes only, are not&lt;br /&gt;
exhaustive, and do not form part of our licenses.&lt;br /&gt;
&lt;br /&gt;
     Considerations for licensors: Our public licenses are&lt;br /&gt;
     intended for use by those authorized to give the public&lt;br /&gt;
     permission to use material in ways otherwise restricted by&lt;br /&gt;
     copyright and certain other rights. Our licenses are&lt;br /&gt;
     irrevocable. Licensors should read and understand the terms&lt;br /&gt;
     and conditions of the license they choose before applying it.&lt;br /&gt;
     Licensors should also secure all rights necessary before&lt;br /&gt;
     applying our licenses so that the public can reuse the&lt;br /&gt;
     material as expected. Licensors should clearly mark any&lt;br /&gt;
     material not subject to the license. This includes other CC-&lt;br /&gt;
     licensed material, or material used under an exception or&lt;br /&gt;
     limitation to copyright. More considerations for licensors:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensors&lt;br /&gt;
&lt;br /&gt;
     Considerations for the public: By using one of our public&lt;br /&gt;
     licenses, a licensor grants the public permission to use the&lt;br /&gt;
     licensed material under specified terms and conditions. If&lt;br /&gt;
     the licensor&#039;s permission is not necessary for any reason--for&lt;br /&gt;
     example, because of any applicable exception or limitation to&lt;br /&gt;
     copyright--then that use is not regulated by the license. Our&lt;br /&gt;
     licenses grant only permissions under copyright and certain&lt;br /&gt;
     other rights that a licensor has authority to grant. Use of&lt;br /&gt;
     the licensed material may still be restricted for other&lt;br /&gt;
     reasons, including because others have copyright or other&lt;br /&gt;
     rights in the material. A licensor may make special requests,&lt;br /&gt;
     such as asking that all changes be marked or described.&lt;br /&gt;
     Although not required by our licenses, you are encouraged to&lt;br /&gt;
     respect those requests where reasonable. More considerations&lt;br /&gt;
     for the public:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensees&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Attribution 4.0 International Public License&lt;br /&gt;
&lt;br /&gt;
By exercising the Licensed Rights (defined below), You accept and agree&lt;br /&gt;
to be bound by the terms and conditions of this Creative Commons&lt;br /&gt;
Attribution 4.0 International Public License (&amp;quot;Public License&amp;quot;). To the&lt;br /&gt;
extent this Public License may be interpreted as a contract, You are&lt;br /&gt;
granted the Licensed Rights in consideration of Your acceptance of&lt;br /&gt;
these terms and conditions, and the Licensor grants You such rights in&lt;br /&gt;
consideration of benefits the Licensor receives from making the&lt;br /&gt;
Licensed Material available under these terms and conditions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 1 -- Definitions.&lt;br /&gt;
&lt;br /&gt;
  a. Adapted Material means material subject to Copyright and Similar&lt;br /&gt;
     Rights that is derived from or based upon the Licensed Material&lt;br /&gt;
     and in which the Licensed Material is translated, altered,&lt;br /&gt;
     arranged, transformed, or otherwise modified in a manner requiring&lt;br /&gt;
     permission under the Copyright and Similar Rights held by the&lt;br /&gt;
     Licensor. For purposes of this Public License, where the Licensed&lt;br /&gt;
     Material is a musical work, performance, or sound recording,&lt;br /&gt;
     Adapted Material is always produced where the Licensed Material is&lt;br /&gt;
     synched in timed relation with a moving image.&lt;br /&gt;
&lt;br /&gt;
  b. Adapter&#039;s License means the license You apply to Your Copyright&lt;br /&gt;
     and Similar Rights in Your contributions to Adapted Material in&lt;br /&gt;
     accordance with the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. Copyright and Similar Rights means copyright and/or similar rights&lt;br /&gt;
     closely related to copyright including, without limitation,&lt;br /&gt;
     performance, broadcast, sound recording, and Sui Generis Database&lt;br /&gt;
     Rights, without regard to how the rights are labeled or&lt;br /&gt;
     categorized. For purposes of this Public License, the rights&lt;br /&gt;
     specified in Section 2(b)(1)-(2) are not Copyright and Similar&lt;br /&gt;
     Rights.&lt;br /&gt;
&lt;br /&gt;
  d. Effective Technological Measures means those measures that, in the&lt;br /&gt;
     absence of proper authority, may not be circumvented under laws&lt;br /&gt;
     fulfilling obligations under Article 11 of the WIPO Copyright&lt;br /&gt;
     Treaty adopted on December 20, 1996, and/or similar international&lt;br /&gt;
     agreements.&lt;br /&gt;
&lt;br /&gt;
  e. Exceptions and Limitations means fair use, fair dealing, and/or&lt;br /&gt;
     any other exception or limitation to Copyright and Similar Rights&lt;br /&gt;
     that applies to Your use of the Licensed Material.&lt;br /&gt;
&lt;br /&gt;
  f. Licensed Material means the artistic or literary work, database,&lt;br /&gt;
     or other material to which the Licensor applied this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
  g. Licensed Rights means the rights granted to You subject to the&lt;br /&gt;
     terms and conditions of this Public License, which are limited to&lt;br /&gt;
     all Copyright and Similar Rights that apply to Your use of the&lt;br /&gt;
     Licensed Material and that the Licensor has authority to license.&lt;br /&gt;
&lt;br /&gt;
  h. Licensor means the individual(s) or entity(ies) granting rights&lt;br /&gt;
     under this Public License.&lt;br /&gt;
&lt;br /&gt;
  i. Share means to provide material to the public by any means or&lt;br /&gt;
     process that requires permission under the Licensed Rights, such&lt;br /&gt;
     as reproduction, public display, public performance, distribution,&lt;br /&gt;
     dissemination, communication, or importation, and to make material&lt;br /&gt;
     available to the public including in ways that members of the&lt;br /&gt;
     public may access the material from a place and at a time&lt;br /&gt;
     individually chosen by them.&lt;br /&gt;
&lt;br /&gt;
  j. Sui Generis Database Rights means rights other than copyright&lt;br /&gt;
     resulting from Directive 96/9/EC of the European Parliament and of&lt;br /&gt;
     the Council of 11 March 1996 on the legal protection of databases,&lt;br /&gt;
     as amended and/or succeeded, as well as other essentially&lt;br /&gt;
     equivalent rights anywhere in the world.&lt;br /&gt;
&lt;br /&gt;
  k. You means the individual or entity exercising the Licensed Rights&lt;br /&gt;
     under this Public License. Your has a corresponding meaning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 2 -- Scope.&lt;br /&gt;
&lt;br /&gt;
  a. License grant.&lt;br /&gt;
&lt;br /&gt;
       1. Subject to the terms and conditions of this Public License,&lt;br /&gt;
          the Licensor hereby grants You a worldwide, royalty-free,&lt;br /&gt;
          non-sublicensable, non-exclusive, irrevocable license to&lt;br /&gt;
          exercise the Licensed Rights in the Licensed Material to:&lt;br /&gt;
&lt;br /&gt;
            a. reproduce and Share the Licensed Material, in whole or&lt;br /&gt;
               in part; and&lt;br /&gt;
&lt;br /&gt;
            b. produce, reproduce, and Share Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       2. Exceptions and Limitations. For the avoidance of doubt, where&lt;br /&gt;
          Exceptions and Limitations apply to Your use, this Public&lt;br /&gt;
          License does not apply, and You do not need to comply with&lt;br /&gt;
          its terms and conditions.&lt;br /&gt;
&lt;br /&gt;
       3. Term. The term of this Public License is specified in Section&lt;br /&gt;
          6(a).&lt;br /&gt;
&lt;br /&gt;
       4. Media and formats; technical modifications allowed. The&lt;br /&gt;
          Licensor authorizes You to exercise the Licensed Rights in&lt;br /&gt;
          all media and formats whether now known or hereafter created,&lt;br /&gt;
          and to make technical modifications necessary to do so. The&lt;br /&gt;
          Licensor waives and/or agrees not to assert any right or&lt;br /&gt;
          authority to forbid You from making technical modifications&lt;br /&gt;
          necessary to exercise the Licensed Rights, including&lt;br /&gt;
          technical modifications necessary to circumvent Effective&lt;br /&gt;
          Technological Measures. For purposes of this Public License,&lt;br /&gt;
          simply making modifications authorized by this Section 2(a)&lt;br /&gt;
          (4) never produces Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       5. Downstream recipients.&lt;br /&gt;
&lt;br /&gt;
            a. Offer from the Licensor -- Licensed Material. Every&lt;br /&gt;
               recipient of the Licensed Material automatically&lt;br /&gt;
               receives an offer from the Licensor to exercise the&lt;br /&gt;
               Licensed Rights under the terms and conditions of this&lt;br /&gt;
               Public License.&lt;br /&gt;
&lt;br /&gt;
            b. No downstream restrictions. You may not offer or impose&lt;br /&gt;
               any additional or different terms or conditions on, or&lt;br /&gt;
               apply any Effective Technological Measures to, the&lt;br /&gt;
               Licensed Material if doing so restricts exercise of the&lt;br /&gt;
               Licensed Rights by any recipient of the Licensed&lt;br /&gt;
               Material.&lt;br /&gt;
&lt;br /&gt;
       6. No endorsement. Nothing in this Public License constitutes or&lt;br /&gt;
          may be construed as permission to assert or imply that You&lt;br /&gt;
          are, or that Your use of the Licensed Material is, connected&lt;br /&gt;
          with, or sponsored, endorsed, or granted official status by,&lt;br /&gt;
          the Licensor or others designated to receive attribution as&lt;br /&gt;
          provided in Section 3(a)(1)(A)(i).&lt;br /&gt;
&lt;br /&gt;
  b. Other rights.&lt;br /&gt;
&lt;br /&gt;
       1. Moral rights, such as the right of integrity, are not&lt;br /&gt;
          licensed under this Public License, nor are publicity,&lt;br /&gt;
          privacy, and/or other similar personality rights; however, to&lt;br /&gt;
          the extent possible, the Licensor waives and/or agrees not to&lt;br /&gt;
          assert any such rights held by the Licensor to the limited&lt;br /&gt;
          extent necessary to allow You to exercise the Licensed&lt;br /&gt;
          Rights, but not otherwise.&lt;br /&gt;
&lt;br /&gt;
       2. Patent and trademark rights are not licensed under this&lt;br /&gt;
          Public License.&lt;br /&gt;
&lt;br /&gt;
       3. To the extent possible, the Licensor waives any right to&lt;br /&gt;
          collect royalties from You for the exercise of the Licensed&lt;br /&gt;
          Rights, whether directly or through a collecting society&lt;br /&gt;
          under any voluntary or waivable statutory or compulsory&lt;br /&gt;
          licensing scheme. In all other cases the Licensor expressly&lt;br /&gt;
          reserves any right to collect such royalties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 3 -- License Conditions.&lt;br /&gt;
&lt;br /&gt;
Your exercise of the Licensed Rights is expressly made subject to the&lt;br /&gt;
following conditions.&lt;br /&gt;
&lt;br /&gt;
  a. Attribution.&lt;br /&gt;
&lt;br /&gt;
       1. If You Share the Licensed Material (including in modified&lt;br /&gt;
          form), You must:&lt;br /&gt;
&lt;br /&gt;
            a. retain the following if it is supplied by the Licensor&lt;br /&gt;
               with the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
                 i. identification of the creator(s) of the Licensed&lt;br /&gt;
                    Material and any others designated to receive&lt;br /&gt;
                    attribution, in any reasonable manner requested by&lt;br /&gt;
                    the Licensor (including by pseudonym if&lt;br /&gt;
                    designated);&lt;br /&gt;
&lt;br /&gt;
                ii. a copyright notice;&lt;br /&gt;
&lt;br /&gt;
               iii. a notice that refers to this Public License;&lt;br /&gt;
&lt;br /&gt;
                iv. a notice that refers to the disclaimer of&lt;br /&gt;
                    warranties;&lt;br /&gt;
&lt;br /&gt;
                 v. a URI or hyperlink to the Licensed Material to the&lt;br /&gt;
                    extent reasonably practicable;&lt;br /&gt;
&lt;br /&gt;
            b. indicate if You modified the Licensed Material and&lt;br /&gt;
               retain an indication of any previous modifications; and&lt;br /&gt;
&lt;br /&gt;
            c. indicate the Licensed Material is licensed under this&lt;br /&gt;
               Public License, and include the text of, or the URI or&lt;br /&gt;
               hyperlink to, this Public License.&lt;br /&gt;
&lt;br /&gt;
       2. You may satisfy the conditions in Section 3(a)(1) in any&lt;br /&gt;
          reasonable manner based on the medium, means, and context in&lt;br /&gt;
          which You Share the Licensed Material. For example, it may be&lt;br /&gt;
          reasonable to satisfy the conditions by providing a URI or&lt;br /&gt;
          hyperlink to a resource that includes the required&lt;br /&gt;
          information.&lt;br /&gt;
&lt;br /&gt;
       3. If requested by the Licensor, You must remove any of the&lt;br /&gt;
          information required by Section 3(a)(1)(A) to the extent&lt;br /&gt;
          reasonably practicable.&lt;br /&gt;
&lt;br /&gt;
       4. If You Share Adapted Material You produce, the Adapter&#039;s&lt;br /&gt;
          License You apply must not prevent recipients of the Adapted&lt;br /&gt;
          Material from complying with this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 4 -- Sui Generis Database Rights.&lt;br /&gt;
&lt;br /&gt;
Where the Licensed Rights include Sui Generis Database Rights that&lt;br /&gt;
apply to Your use of the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
  a. for the avoidance of doubt, Section 2(a)(1) grants You the right&lt;br /&gt;
     to extract, reuse, reproduce, and Share all or a substantial&lt;br /&gt;
     portion of the contents of the database;&lt;br /&gt;
&lt;br /&gt;
  b. if You include all or a substantial portion of the database&lt;br /&gt;
     contents in a database in which You have Sui Generis Database&lt;br /&gt;
     Rights, then the database in which You have Sui Generis Database&lt;br /&gt;
     Rights (but not its individual contents) is Adapted Material; and&lt;br /&gt;
&lt;br /&gt;
  c. You must comply with the conditions in Section 3(a) if You Share&lt;br /&gt;
     all or a substantial portion of the contents of the database.&lt;br /&gt;
&lt;br /&gt;
For the avoidance of doubt, this Section 4 supplements and does not&lt;br /&gt;
replace Your obligations under this Public License where the Licensed&lt;br /&gt;
Rights include other Copyright and Similar Rights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 5 -- Disclaimer of Warranties and Limitation of Liability.&lt;br /&gt;
&lt;br /&gt;
  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE&lt;br /&gt;
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS&lt;br /&gt;
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF&lt;br /&gt;
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,&lt;br /&gt;
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,&lt;br /&gt;
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR&lt;br /&gt;
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,&lt;br /&gt;
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT&lt;br /&gt;
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT&lt;br /&gt;
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE&lt;br /&gt;
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,&lt;br /&gt;
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,&lt;br /&gt;
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,&lt;br /&gt;
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR&lt;br /&gt;
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN&lt;br /&gt;
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR&lt;br /&gt;
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR&lt;br /&gt;
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  c. The disclaimer of warranties and limitation of liability provided&lt;br /&gt;
     above shall be interpreted in a manner that, to the extent&lt;br /&gt;
     possible, most closely approximates an absolute disclaimer and&lt;br /&gt;
     waiver of all liability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 6 -- Term and Termination.&lt;br /&gt;
&lt;br /&gt;
  a. This Public License applies for the term of the Copyright and&lt;br /&gt;
     Similar Rights licensed here. However, if You fail to comply with&lt;br /&gt;
     this Public License, then Your rights under this Public License&lt;br /&gt;
     terminate automatically.&lt;br /&gt;
&lt;br /&gt;
  b. Where Your right to use the Licensed Material has terminated under&lt;br /&gt;
     Section 6(a), it reinstates:&lt;br /&gt;
&lt;br /&gt;
       1. automatically as of the date the violation is cured, provided&lt;br /&gt;
          it is cured within 30 days of Your discovery of the&lt;br /&gt;
          violation; or&lt;br /&gt;
&lt;br /&gt;
       2. upon express reinstatement by the Licensor.&lt;br /&gt;
&lt;br /&gt;
     For the avoidance of doubt, this Section 6(b) does not affect any&lt;br /&gt;
     right the Licensor may have to seek remedies for Your violations&lt;br /&gt;
     of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. For the avoidance of doubt, the Licensor may also offer the&lt;br /&gt;
     Licensed Material under separate terms or conditions or stop&lt;br /&gt;
     distributing the Licensed Material at any time; however, doing so&lt;br /&gt;
     will not terminate this Public License.&lt;br /&gt;
&lt;br /&gt;
  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 7 -- Other Terms and Conditions.&lt;br /&gt;
&lt;br /&gt;
  a. The Licensor shall not be bound by any additional or different&lt;br /&gt;
     terms or conditions communicated by You unless expressly agreed.&lt;br /&gt;
&lt;br /&gt;
  b. Any arrangements, understandings, or agreements regarding the&lt;br /&gt;
     Licensed Material not stated herein are separate from and&lt;br /&gt;
     independent of the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 8 -- Interpretation.&lt;br /&gt;
&lt;br /&gt;
  a. For the avoidance of doubt, this Public License does not, and&lt;br /&gt;
     shall not be interpreted to, reduce, limit, restrict, or impose&lt;br /&gt;
     conditions on any use of the Licensed Material that could lawfully&lt;br /&gt;
     be made without permission under this Public License.&lt;br /&gt;
&lt;br /&gt;
  b. To the extent possible, if any provision of this Public License is&lt;br /&gt;
     deemed unenforceable, it shall be automatically reformed to the&lt;br /&gt;
     minimum extent necessary to make it enforceable. If the provision&lt;br /&gt;
     cannot be reformed, it shall be severed from this Public License&lt;br /&gt;
     without affecting the enforceability of the remaining terms and&lt;br /&gt;
     conditions.&lt;br /&gt;
&lt;br /&gt;
  c. No term or condition of this Public License will be waived and no&lt;br /&gt;
     failure to comply consented to unless expressly agreed to by the&lt;br /&gt;
     Licensor.&lt;br /&gt;
&lt;br /&gt;
  d. Nothing in this Public License constitutes or may be interpreted&lt;br /&gt;
     as a limitation upon, or waiver of, any privileges and immunities&lt;br /&gt;
     that apply to the Licensor or You, including from the legal&lt;br /&gt;
     processes of any jurisdiction or authority.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons is not a party to its public&lt;br /&gt;
licenses. Notwithstanding, Creative Commons may elect to apply one of&lt;br /&gt;
its public licenses to material it publishes and in those instances&lt;br /&gt;
will be considered the “Licensor.” The text of the Creative Commons&lt;br /&gt;
public licenses is dedicated to the public domain under the CC0 Public&lt;br /&gt;
Domain Dedication. Except for the limited purpose of indicating that&lt;br /&gt;
material is shared under a Creative Commons public license or as&lt;br /&gt;
otherwise permitted by the Creative Commons policies published at&lt;br /&gt;
creativecommons.org/policies, Creative Commons does not authorize the&lt;br /&gt;
use of the trademark &amp;quot;Creative Commons&amp;quot; or any other trademark or logo&lt;br /&gt;
of Creative Commons without its prior written consent including,&lt;br /&gt;
without limitation, in connection with any unauthorized modifications&lt;br /&gt;
to any of its public licenses or any other arrangements,&lt;br /&gt;
understandings, or agreements concerning use of licensed material. For&lt;br /&gt;
the avoidance of doubt, this paragraph does not form part of the&lt;br /&gt;
public licenses.&lt;br /&gt;
&lt;br /&gt;
Creative Commons may be contacted at creativecommons.org.&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=115</id>
		<title>Sdfcntutorials:著作权</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=Sdfcntutorials:%E8%91%97%E4%BD%9C%E6%9D%83&amp;diff=115"/>
		<updated>2025-08-20T01:43:19Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​创建页面，内容为“Attribution 4.0 International  =======================================================================  Creative Commons Corporation (&amp;quot;Creative Commons&amp;quot;) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an &amp;quot;as-is&amp;quot; basis. Creative Commons gives no warranties regardin…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Attribution 4.0 International&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Corporation (&amp;quot;Creative Commons&amp;quot;) is not a law firm and&lt;br /&gt;
does not provide legal services or legal advice. Distribution of&lt;br /&gt;
Creative Commons public licenses does not create a lawyer-client or&lt;br /&gt;
other relationship. Creative Commons makes its licenses and related&lt;br /&gt;
information available on an &amp;quot;as-is&amp;quot; basis. Creative Commons gives no&lt;br /&gt;
warranties regarding its licenses, any material licensed under their&lt;br /&gt;
terms and conditions, or any related information. Creative Commons&lt;br /&gt;
disclaims all liability for damages resulting from their use to the&lt;br /&gt;
fullest extent possible.&lt;br /&gt;
&lt;br /&gt;
Using Creative Commons Public Licenses&lt;br /&gt;
&lt;br /&gt;
Creative Commons public licenses provide a standard set of terms and&lt;br /&gt;
conditions that creators and other rights holders may use to share&lt;br /&gt;
original works of authorship and other material subject to copyright&lt;br /&gt;
and certain other rights specified in the public license below. The&lt;br /&gt;
following considerations are for informational purposes only, are not&lt;br /&gt;
exhaustive, and do not form part of our licenses.&lt;br /&gt;
&lt;br /&gt;
     Considerations for licensors: Our public licenses are&lt;br /&gt;
     intended for use by those authorized to give the public&lt;br /&gt;
     permission to use material in ways otherwise restricted by&lt;br /&gt;
     copyright and certain other rights. Our licenses are&lt;br /&gt;
     irrevocable. Licensors should read and understand the terms&lt;br /&gt;
     and conditions of the license they choose before applying it.&lt;br /&gt;
     Licensors should also secure all rights necessary before&lt;br /&gt;
     applying our licenses so that the public can reuse the&lt;br /&gt;
     material as expected. Licensors should clearly mark any&lt;br /&gt;
     material not subject to the license. This includes other CC-&lt;br /&gt;
     licensed material, or material used under an exception or&lt;br /&gt;
     limitation to copyright. More considerations for licensors:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensors&lt;br /&gt;
&lt;br /&gt;
     Considerations for the public: By using one of our public&lt;br /&gt;
     licenses, a licensor grants the public permission to use the&lt;br /&gt;
     licensed material under specified terms and conditions. If&lt;br /&gt;
     the licensor&#039;s permission is not necessary for any reason--for&lt;br /&gt;
     example, because of any applicable exception or limitation to&lt;br /&gt;
     copyright--then that use is not regulated by the license. Our&lt;br /&gt;
     licenses grant only permissions under copyright and certain&lt;br /&gt;
     other rights that a licensor has authority to grant. Use of&lt;br /&gt;
     the licensed material may still be restricted for other&lt;br /&gt;
     reasons, including because others have copyright or other&lt;br /&gt;
     rights in the material. A licensor may make special requests,&lt;br /&gt;
     such as asking that all changes be marked or described.&lt;br /&gt;
     Although not required by our licenses, you are encouraged to&lt;br /&gt;
     respect those requests where reasonable. More considerations&lt;br /&gt;
     for the public:&lt;br /&gt;
    wiki.creativecommons.org/Considerations_for_licensees&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons Attribution 4.0 International Public License&lt;br /&gt;
&lt;br /&gt;
By exercising the Licensed Rights (defined below), You accept and agree&lt;br /&gt;
to be bound by the terms and conditions of this Creative Commons&lt;br /&gt;
Attribution 4.0 International Public License (&amp;quot;Public License&amp;quot;). To the&lt;br /&gt;
extent this Public License may be interpreted as a contract, You are&lt;br /&gt;
granted the Licensed Rights in consideration of Your acceptance of&lt;br /&gt;
these terms and conditions, and the Licensor grants You such rights in&lt;br /&gt;
consideration of benefits the Licensor receives from making the&lt;br /&gt;
Licensed Material available under these terms and conditions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 1 -- Definitions.&lt;br /&gt;
&lt;br /&gt;
  a. Adapted Material means material subject to Copyright and Similar&lt;br /&gt;
     Rights that is derived from or based upon the Licensed Material&lt;br /&gt;
     and in which the Licensed Material is translated, altered,&lt;br /&gt;
     arranged, transformed, or otherwise modified in a manner requiring&lt;br /&gt;
     permission under the Copyright and Similar Rights held by the&lt;br /&gt;
     Licensor. For purposes of this Public License, where the Licensed&lt;br /&gt;
     Material is a musical work, performance, or sound recording,&lt;br /&gt;
     Adapted Material is always produced where the Licensed Material is&lt;br /&gt;
     synched in timed relation with a moving image.&lt;br /&gt;
&lt;br /&gt;
  b. Adapter&#039;s License means the license You apply to Your Copyright&lt;br /&gt;
     and Similar Rights in Your contributions to Adapted Material in&lt;br /&gt;
     accordance with the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. Copyright and Similar Rights means copyright and/or similar rights&lt;br /&gt;
     closely related to copyright including, without limitation,&lt;br /&gt;
     performance, broadcast, sound recording, and Sui Generis Database&lt;br /&gt;
     Rights, without regard to how the rights are labeled or&lt;br /&gt;
     categorized. For purposes of this Public License, the rights&lt;br /&gt;
     specified in Section 2(b)(1)-(2) are not Copyright and Similar&lt;br /&gt;
     Rights.&lt;br /&gt;
&lt;br /&gt;
  d. Effective Technological Measures means those measures that, in the&lt;br /&gt;
     absence of proper authority, may not be circumvented under laws&lt;br /&gt;
     fulfilling obligations under Article 11 of the WIPO Copyright&lt;br /&gt;
     Treaty adopted on December 20, 1996, and/or similar international&lt;br /&gt;
     agreements.&lt;br /&gt;
&lt;br /&gt;
  e. Exceptions and Limitations means fair use, fair dealing, and/or&lt;br /&gt;
     any other exception or limitation to Copyright and Similar Rights&lt;br /&gt;
     that applies to Your use of the Licensed Material.&lt;br /&gt;
&lt;br /&gt;
  f. Licensed Material means the artistic or literary work, database,&lt;br /&gt;
     or other material to which the Licensor applied this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
  g. Licensed Rights means the rights granted to You subject to the&lt;br /&gt;
     terms and conditions of this Public License, which are limited to&lt;br /&gt;
     all Copyright and Similar Rights that apply to Your use of the&lt;br /&gt;
     Licensed Material and that the Licensor has authority to license.&lt;br /&gt;
&lt;br /&gt;
  h. Licensor means the individual(s) or entity(ies) granting rights&lt;br /&gt;
     under this Public License.&lt;br /&gt;
&lt;br /&gt;
  i. Share means to provide material to the public by any means or&lt;br /&gt;
     process that requires permission under the Licensed Rights, such&lt;br /&gt;
     as reproduction, public display, public performance, distribution,&lt;br /&gt;
     dissemination, communication, or importation, and to make material&lt;br /&gt;
     available to the public including in ways that members of the&lt;br /&gt;
     public may access the material from a place and at a time&lt;br /&gt;
     individually chosen by them.&lt;br /&gt;
&lt;br /&gt;
  j. Sui Generis Database Rights means rights other than copyright&lt;br /&gt;
     resulting from Directive 96/9/EC of the European Parliament and of&lt;br /&gt;
     the Council of 11 March 1996 on the legal protection of databases,&lt;br /&gt;
     as amended and/or succeeded, as well as other essentially&lt;br /&gt;
     equivalent rights anywhere in the world.&lt;br /&gt;
&lt;br /&gt;
  k. You means the individual or entity exercising the Licensed Rights&lt;br /&gt;
     under this Public License. Your has a corresponding meaning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 2 -- Scope.&lt;br /&gt;
&lt;br /&gt;
  a. License grant.&lt;br /&gt;
&lt;br /&gt;
       1. Subject to the terms and conditions of this Public License,&lt;br /&gt;
          the Licensor hereby grants You a worldwide, royalty-free,&lt;br /&gt;
          non-sublicensable, non-exclusive, irrevocable license to&lt;br /&gt;
          exercise the Licensed Rights in the Licensed Material to:&lt;br /&gt;
&lt;br /&gt;
            a. reproduce and Share the Licensed Material, in whole or&lt;br /&gt;
               in part; and&lt;br /&gt;
&lt;br /&gt;
            b. produce, reproduce, and Share Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       2. Exceptions and Limitations. For the avoidance of doubt, where&lt;br /&gt;
          Exceptions and Limitations apply to Your use, this Public&lt;br /&gt;
          License does not apply, and You do not need to comply with&lt;br /&gt;
          its terms and conditions.&lt;br /&gt;
&lt;br /&gt;
       3. Term. The term of this Public License is specified in Section&lt;br /&gt;
          6(a).&lt;br /&gt;
&lt;br /&gt;
       4. Media and formats; technical modifications allowed. The&lt;br /&gt;
          Licensor authorizes You to exercise the Licensed Rights in&lt;br /&gt;
          all media and formats whether now known or hereafter created,&lt;br /&gt;
          and to make technical modifications necessary to do so. The&lt;br /&gt;
          Licensor waives and/or agrees not to assert any right or&lt;br /&gt;
          authority to forbid You from making technical modifications&lt;br /&gt;
          necessary to exercise the Licensed Rights, including&lt;br /&gt;
          technical modifications necessary to circumvent Effective&lt;br /&gt;
          Technological Measures. For purposes of this Public License,&lt;br /&gt;
          simply making modifications authorized by this Section 2(a)&lt;br /&gt;
          (4) never produces Adapted Material.&lt;br /&gt;
&lt;br /&gt;
       5. Downstream recipients.&lt;br /&gt;
&lt;br /&gt;
            a. Offer from the Licensor -- Licensed Material. Every&lt;br /&gt;
               recipient of the Licensed Material automatically&lt;br /&gt;
               receives an offer from the Licensor to exercise the&lt;br /&gt;
               Licensed Rights under the terms and conditions of this&lt;br /&gt;
               Public License.&lt;br /&gt;
&lt;br /&gt;
            b. No downstream restrictions. You may not offer or impose&lt;br /&gt;
               any additional or different terms or conditions on, or&lt;br /&gt;
               apply any Effective Technological Measures to, the&lt;br /&gt;
               Licensed Material if doing so restricts exercise of the&lt;br /&gt;
               Licensed Rights by any recipient of the Licensed&lt;br /&gt;
               Material.&lt;br /&gt;
&lt;br /&gt;
       6. No endorsement. Nothing in this Public License constitutes or&lt;br /&gt;
          may be construed as permission to assert or imply that You&lt;br /&gt;
          are, or that Your use of the Licensed Material is, connected&lt;br /&gt;
          with, or sponsored, endorsed, or granted official status by,&lt;br /&gt;
          the Licensor or others designated to receive attribution as&lt;br /&gt;
          provided in Section 3(a)(1)(A)(i).&lt;br /&gt;
&lt;br /&gt;
  b. Other rights.&lt;br /&gt;
&lt;br /&gt;
       1. Moral rights, such as the right of integrity, are not&lt;br /&gt;
          licensed under this Public License, nor are publicity,&lt;br /&gt;
          privacy, and/or other similar personality rights; however, to&lt;br /&gt;
          the extent possible, the Licensor waives and/or agrees not to&lt;br /&gt;
          assert any such rights held by the Licensor to the limited&lt;br /&gt;
          extent necessary to allow You to exercise the Licensed&lt;br /&gt;
          Rights, but not otherwise.&lt;br /&gt;
&lt;br /&gt;
       2. Patent and trademark rights are not licensed under this&lt;br /&gt;
          Public License.&lt;br /&gt;
&lt;br /&gt;
       3. To the extent possible, the Licensor waives any right to&lt;br /&gt;
          collect royalties from You for the exercise of the Licensed&lt;br /&gt;
          Rights, whether directly or through a collecting society&lt;br /&gt;
          under any voluntary or waivable statutory or compulsory&lt;br /&gt;
          licensing scheme. In all other cases the Licensor expressly&lt;br /&gt;
          reserves any right to collect such royalties.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 3 -- License Conditions.&lt;br /&gt;
&lt;br /&gt;
Your exercise of the Licensed Rights is expressly made subject to the&lt;br /&gt;
following conditions.&lt;br /&gt;
&lt;br /&gt;
  a. Attribution.&lt;br /&gt;
&lt;br /&gt;
       1. If You Share the Licensed Material (including in modified&lt;br /&gt;
          form), You must:&lt;br /&gt;
&lt;br /&gt;
            a. retain the following if it is supplied by the Licensor&lt;br /&gt;
               with the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
                 i. identification of the creator(s) of the Licensed&lt;br /&gt;
                    Material and any others designated to receive&lt;br /&gt;
                    attribution, in any reasonable manner requested by&lt;br /&gt;
                    the Licensor (including by pseudonym if&lt;br /&gt;
                    designated);&lt;br /&gt;
&lt;br /&gt;
                ii. a copyright notice;&lt;br /&gt;
&lt;br /&gt;
               iii. a notice that refers to this Public License;&lt;br /&gt;
&lt;br /&gt;
                iv. a notice that refers to the disclaimer of&lt;br /&gt;
                    warranties;&lt;br /&gt;
&lt;br /&gt;
                 v. a URI or hyperlink to the Licensed Material to the&lt;br /&gt;
                    extent reasonably practicable;&lt;br /&gt;
&lt;br /&gt;
            b. indicate if You modified the Licensed Material and&lt;br /&gt;
               retain an indication of any previous modifications; and&lt;br /&gt;
&lt;br /&gt;
            c. indicate the Licensed Material is licensed under this&lt;br /&gt;
               Public License, and include the text of, or the URI or&lt;br /&gt;
               hyperlink to, this Public License.&lt;br /&gt;
&lt;br /&gt;
       2. You may satisfy the conditions in Section 3(a)(1) in any&lt;br /&gt;
          reasonable manner based on the medium, means, and context in&lt;br /&gt;
          which You Share the Licensed Material. For example, it may be&lt;br /&gt;
          reasonable to satisfy the conditions by providing a URI or&lt;br /&gt;
          hyperlink to a resource that includes the required&lt;br /&gt;
          information.&lt;br /&gt;
&lt;br /&gt;
       3. If requested by the Licensor, You must remove any of the&lt;br /&gt;
          information required by Section 3(a)(1)(A) to the extent&lt;br /&gt;
          reasonably practicable.&lt;br /&gt;
&lt;br /&gt;
       4. If You Share Adapted Material You produce, the Adapter&#039;s&lt;br /&gt;
          License You apply must not prevent recipients of the Adapted&lt;br /&gt;
          Material from complying with this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 4 -- Sui Generis Database Rights.&lt;br /&gt;
&lt;br /&gt;
Where the Licensed Rights include Sui Generis Database Rights that&lt;br /&gt;
apply to Your use of the Licensed Material:&lt;br /&gt;
&lt;br /&gt;
  a. for the avoidance of doubt, Section 2(a)(1) grants You the right&lt;br /&gt;
     to extract, reuse, reproduce, and Share all or a substantial&lt;br /&gt;
     portion of the contents of the database;&lt;br /&gt;
&lt;br /&gt;
  b. if You include all or a substantial portion of the database&lt;br /&gt;
     contents in a database in which You have Sui Generis Database&lt;br /&gt;
     Rights, then the database in which You have Sui Generis Database&lt;br /&gt;
     Rights (but not its individual contents) is Adapted Material; and&lt;br /&gt;
&lt;br /&gt;
  c. You must comply with the conditions in Section 3(a) if You Share&lt;br /&gt;
     all or a substantial portion of the contents of the database.&lt;br /&gt;
&lt;br /&gt;
For the avoidance of doubt, this Section 4 supplements and does not&lt;br /&gt;
replace Your obligations under this Public License where the Licensed&lt;br /&gt;
Rights include other Copyright and Similar Rights.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 5 -- Disclaimer of Warranties and Limitation of Liability.&lt;br /&gt;
&lt;br /&gt;
  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE&lt;br /&gt;
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS&lt;br /&gt;
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF&lt;br /&gt;
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,&lt;br /&gt;
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,&lt;br /&gt;
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR&lt;br /&gt;
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,&lt;br /&gt;
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT&lt;br /&gt;
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT&lt;br /&gt;
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE&lt;br /&gt;
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,&lt;br /&gt;
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,&lt;br /&gt;
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,&lt;br /&gt;
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR&lt;br /&gt;
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN&lt;br /&gt;
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR&lt;br /&gt;
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR&lt;br /&gt;
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.&lt;br /&gt;
&lt;br /&gt;
  c. The disclaimer of warranties and limitation of liability provided&lt;br /&gt;
     above shall be interpreted in a manner that, to the extent&lt;br /&gt;
     possible, most closely approximates an absolute disclaimer and&lt;br /&gt;
     waiver of all liability.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 6 -- Term and Termination.&lt;br /&gt;
&lt;br /&gt;
  a. This Public License applies for the term of the Copyright and&lt;br /&gt;
     Similar Rights licensed here. However, if You fail to comply with&lt;br /&gt;
     this Public License, then Your rights under this Public License&lt;br /&gt;
     terminate automatically.&lt;br /&gt;
&lt;br /&gt;
  b. Where Your right to use the Licensed Material has terminated under&lt;br /&gt;
     Section 6(a), it reinstates:&lt;br /&gt;
&lt;br /&gt;
       1. automatically as of the date the violation is cured, provided&lt;br /&gt;
          it is cured within 30 days of Your discovery of the&lt;br /&gt;
          violation; or&lt;br /&gt;
&lt;br /&gt;
       2. upon express reinstatement by the Licensor.&lt;br /&gt;
&lt;br /&gt;
     For the avoidance of doubt, this Section 6(b) does not affect any&lt;br /&gt;
     right the Licensor may have to seek remedies for Your violations&lt;br /&gt;
     of this Public License.&lt;br /&gt;
&lt;br /&gt;
  c. For the avoidance of doubt, the Licensor may also offer the&lt;br /&gt;
     Licensed Material under separate terms or conditions or stop&lt;br /&gt;
     distributing the Licensed Material at any time; however, doing so&lt;br /&gt;
     will not terminate this Public License.&lt;br /&gt;
&lt;br /&gt;
  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public&lt;br /&gt;
     License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 7 -- Other Terms and Conditions.&lt;br /&gt;
&lt;br /&gt;
  a. The Licensor shall not be bound by any additional or different&lt;br /&gt;
     terms or conditions communicated by You unless expressly agreed.&lt;br /&gt;
&lt;br /&gt;
  b. Any arrangements, understandings, or agreements regarding the&lt;br /&gt;
     Licensed Material not stated herein are separate from and&lt;br /&gt;
     independent of the terms and conditions of this Public License.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Section 8 -- Interpretation.&lt;br /&gt;
&lt;br /&gt;
  a. For the avoidance of doubt, this Public License does not, and&lt;br /&gt;
     shall not be interpreted to, reduce, limit, restrict, or impose&lt;br /&gt;
     conditions on any use of the Licensed Material that could lawfully&lt;br /&gt;
     be made without permission under this Public License.&lt;br /&gt;
&lt;br /&gt;
  b. To the extent possible, if any provision of this Public License is&lt;br /&gt;
     deemed unenforceable, it shall be automatically reformed to the&lt;br /&gt;
     minimum extent necessary to make it enforceable. If the provision&lt;br /&gt;
     cannot be reformed, it shall be severed from this Public License&lt;br /&gt;
     without affecting the enforceability of the remaining terms and&lt;br /&gt;
     conditions.&lt;br /&gt;
&lt;br /&gt;
  c. No term or condition of this Public License will be waived and no&lt;br /&gt;
     failure to comply consented to unless expressly agreed to by the&lt;br /&gt;
     Licensor.&lt;br /&gt;
&lt;br /&gt;
  d. Nothing in this Public License constitutes or may be interpreted&lt;br /&gt;
     as a limitation upon, or waiver of, any privileges and immunities&lt;br /&gt;
     that apply to the Licensor or You, including from the legal&lt;br /&gt;
     processes of any jurisdiction or authority.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=======================================================================&lt;br /&gt;
&lt;br /&gt;
Creative Commons is not a party to its public&lt;br /&gt;
licenses. Notwithstanding, Creative Commons may elect to apply one of&lt;br /&gt;
its public licenses to material it publishes and in those instances&lt;br /&gt;
will be considered the “Licensor.” The text of the Creative Commons&lt;br /&gt;
public licenses is dedicated to the public domain under the CC0 Public&lt;br /&gt;
Domain Dedication. Except for the limited purpose of indicating that&lt;br /&gt;
material is shared under a Creative Commons public license or as&lt;br /&gt;
otherwise permitted by the Creative Commons policies published at&lt;br /&gt;
creativecommons.org/policies, Creative Commons does not authorize the&lt;br /&gt;
use of the trademark &amp;quot;Creative Commons&amp;quot; or any other trademark or logo&lt;br /&gt;
of Creative Commons without its prior written consent including,&lt;br /&gt;
without limitation, in connection with any unauthorized modifications&lt;br /&gt;
to any of its public licenses or any other arrangements,&lt;br /&gt;
understandings, or agreements concerning use of licensed material. For&lt;br /&gt;
the avoidance of doubt, this paragraph does not form part of the&lt;br /&gt;
public licenses.&lt;br /&gt;
&lt;br /&gt;
Creative Commons may be contacted at creativecommons.org.&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=114</id>
		<title>首页</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=114"/>
		<updated>2025-08-20T01:37:15Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;tutorials.sdfcn.org - sdf中文html教程说明&amp;lt;/strong&amp;gt;&lt;br /&gt;
* 基于[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]翻译而来，只是转述[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]的内容，某些内容可能过时，不对其中观点负责。&lt;br /&gt;
* 此教程翻译自传统的[https://sdf.org/?tutorials html教程]，并非新[https://wiki.sdf.org sdf教程维基]，但是今后也会进行翻译。&lt;br /&gt;
&lt;br /&gt;
* 除非另有声明，本网站内容采用[https://creativecommons.org/licenses/by/4.0/ Creative Commons Attribution] (CC BY 4.0) 授权。&lt;br /&gt;
&lt;br /&gt;
* 此教程目前为个人维护项目，如果想加入翻译请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
&lt;br /&gt;
* 若教程内容出现问题（如翻译问题等），也请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
2023.6.19 gao66 on sdf&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF、UNIX和INTERNET教程&#039;&#039;&#039; ==&lt;br /&gt;
&#039;&#039;&#039;SDF成员贡献教程，是为了与INTERNET、UNIX操作系统和编程语言感兴趣的现有和潜在的SDF用户分享知识，并提供帮助。本项目的目的是通过实际且有用的示例，帮助用户充分利用 SDF 和 UNIX 的丰富功能。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;两个教程项目&#039;&#039;&#039; ==&lt;br /&gt;
目前有两个重叠的教程项目：&lt;br /&gt;
&lt;br /&gt;
* 新的[https://wiki.sdf.org SDF教程维基]，可在wiki.sdf.org找到。&amp;lt;ref&amp;gt;中文翻译版本会放在https://wiki.sdf.org，目前还没有。 --译者注&amp;lt;/ref&amp;gt;它包含下面列出的所有（或几乎所有）HTML教程的移植版本，以及新的内容。它还包括搜索功能，以及一个标准化的页面格式。&lt;br /&gt;
*传统的[[#HTML教程]]，即是以下内容。这些教程包含了许多由SDF用户多年来创建和更新的基础和高级教程。&lt;br /&gt;
&lt;br /&gt;
===有兴趣做出贡献吗？===&lt;br /&gt;
&lt;br /&gt;
*向教程维基做贡献：教程维基的建立是为了方便添加和维护教程的内容。要在教程维基上做贡献，你需要为自己建立一个账户。发送电子邮件至 [mailto:membership@sdf.org membership@sdf.org] （mailto link）以获得一个具有写入权限的账户，以便能够在维基上贡献编辑和新内容。 &amp;lt;br /&amp;gt;教程维基页面可以在你的浏览器中直接编辑，如果你担心把事情搞乱，它有内置的预览和版本控制。如果你有任何使用维基的经验，这对你来说很容易。更多细节作为Dokuwiki页面链接到了维基本身上，包括：&lt;br /&gt;
**[https://www.dokuwiki.org/wiki:syntax 维基语法]&lt;br /&gt;
**[https://www.dokuwiki.org/manual 维基用户手册]&lt;br /&gt;
*向HTML教程做贡献：传统的HTML教程项目包括本页面和下面链接的所有教程页面。为了能够对HTML教程做出贡献，请阅读[[SDF HTML教程编辑指南|HTML教程编辑指南]]，该指南也在[https://wiki.sdf.org/doku.php?id=sdf_tutorial_editing_guide 此处]的维基页面提供&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF教程维基&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki.sdfcn.org/ SDF教程维基]&amp;lt;ref&amp;gt; 目前还不存在，今后会进行翻译  --译者注 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;&amp;lt;span id=&amp;quot;HTML教程&amp;quot;&amp;gt;HTML教程：目录&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[[#SDF基础知识]]&lt;br /&gt;
#[[#电子邮件]]&lt;br /&gt;
#[[#网站设置和托管功能]]&lt;br /&gt;
#[[#高级专题]]&lt;br /&gt;
#[[#SDF的互联网聊天中继（IRC）]]&lt;br /&gt;
#[[#SDF VoIP电话服务]]&lt;br /&gt;
#[[#SDF 拨号（Dialup）和DSL互联网服务]]（适用于Dialup和DSL成员）&lt;br /&gt;
#[[#SDF电台！/ ANONRADIO服务]]&lt;br /&gt;
#[[#SDF VPS服务]]（适用于metaArpa成员）&lt;br /&gt;
#[[#Cheat Sheets (文本编辑器）]]&lt;br /&gt;
#[[#Dotfile（配置文件）资料库]]&lt;br /&gt;
#[[#twenex.org - SDF公共访问 TWENEX 操作系统]]&lt;br /&gt;
#[[#在线隐私]]&lt;br /&gt;
#[[#复古计算]]&lt;br /&gt;
#[[#贝尔实验室的Plan 9项目]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF基础知识&amp;quot;&amp;gt;1. SDF基础知识===&lt;br /&gt;
&lt;br /&gt;
*[[从Shell中寻找帮助|寻找帮助]] - 如何在shell中取得帮助&lt;br /&gt;
*[[COM不是IRC]]（互联网聊天中继）- 聊天程序 &amp;quot;COM&amp;quot; 的介绍&lt;br /&gt;
*[[bboard]] - 对论坛 &amp;quot;bboard&amp;quot; 的介绍&lt;br /&gt;
*[[SDF 多用户环境中的个人责任|多用户系统的责任]] - 关于SDF多用户环境下用户责任的声明&lt;br /&gt;
*[[SDF SSH 主机密钥|主机密钥]] - SDF的SSH主机密钥的列表&lt;br /&gt;
*[[SDF 中的即时信息|即时通讯]] - 如何在SDF上使用即时通讯服务&lt;br /&gt;
*[[文件传输教程|文件传输]] - 如何将文件移入或移出SDF&lt;br /&gt;
*UNIX®的Shell之间的最终差异 - 比较shell的差异/相似性&lt;br /&gt;
*文件权限 - 更改文件权限&lt;br /&gt;
*基本的文件和shell操作 - 使用一些命令操作文件和目录&lt;br /&gt;
*ASCII游戏 - 只工作不玩乐只会使你自己成为一个无趣的SDFer&lt;br /&gt;
*如何捐赠及原因 - 解释你的朋友和你的家人（或你）应该如何以及为什么要帮助资助SDF的一个页面。&lt;br /&gt;
*传播关于SDF的信息&lt;br /&gt;
*为盲人用户的SDF&lt;br /&gt;
*使用微软Windows™ 的 telnet&lt;br /&gt;
*SDF上的按类别排序的软件&lt;br /&gt;
*SDF特有命令 - SDF特有的命令、脚本和程序的列表。&lt;br /&gt;
*Jabber IM服务器 - 使用SDF Jabber XMPP即时通讯服务器&lt;br /&gt;
*SDF上的游戏服务器 - 在SDF上运行的多人游戏服务器列表&lt;br /&gt;
*Tiny Tiny RSS - 在SDF中托管的RSS阅读器&lt;br /&gt;
*MetaArray（元数组） - 存储以及为MetaArpa成员提供的一些服务&lt;br /&gt;
*GNU 社区 - SDF的微博&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;电子邮件&amp;quot;&amp;gt;2. 电子邮件 ===&lt;br /&gt;
&lt;br /&gt;
* 为初学者提供的电子邮件教程&lt;br /&gt;
* 电子邮件基础知识&lt;br /&gt;
* 电子邮件的黑名单问题 - 别人收到你的SDF邮件的问题&lt;br /&gt;
* SDF灰名单 - 减少垃圾邮件的系统政策&lt;br /&gt;
* Mutt邮件的用户代理（User Agent）&lt;br /&gt;
* 高级电子邮件主题 - 转发信息，打击垃圾邮件&lt;br /&gt;
* 设置一段假期 - 发送自动邮件回复&lt;br /&gt;
* POP3、IMAP和SMTP 验证 - 在流行的邮件客户端设置POP3、IMAP和SMTP认证&lt;br /&gt;
* SDF上的Procmail（邮件过滤工具）- 一般的配置说明&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;网站设置和托管功能&amp;quot;&amp;gt;3. 网站设置和托管功能 ===&lt;br /&gt;
&lt;br /&gt;
* 网站 - 在SDF上建立一个网站&lt;br /&gt;
* 为网站建设者提供的资源&lt;br /&gt;
* 自定义错误页面 - 使用.htaccess创建自定义错误页面&lt;br /&gt;
* SDF上的Ruby on Rails&lt;br /&gt;
** Ruby on Rails - SDF上的Ruby on Rails&lt;br /&gt;
** 构建一个基本的Ruby on Rails应用程序&lt;br /&gt;
* SDF上的Trac - 设置和使用Trac实例&lt;br /&gt;
* Gopher - 构建你自己的Gopher空间&lt;br /&gt;
* 用Jekyll写博客&lt;br /&gt;
* Htaccess - Apache HTTP服务器的有用的.htaccess技巧和窍门&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;高级专题&amp;quot;&amp;gt;4. 高级专题 ===&lt;br /&gt;
&lt;br /&gt;
* 编程语言、代码开发和编译器 - 在SDF编写你自己的代码&lt;br /&gt;
*使用skey - 通过不安全的协议安全地登录&lt;br /&gt;
*Emacs教程 - Emacs基础知识，使用Emacs作为工作环境&lt;br /&gt;
*SSH - 使用SDF时，通过SSH保证安全和路由客户端应用程序&lt;br /&gt;
*SSHFS - 使用SSHFS在linux本地机器上挂载SDF文件夹&lt;br /&gt;
*EncFS - 使用EncFS来管理加密的文件夹&lt;br /&gt;
*PSSHFS - 在NetBSD本地机器上挂载SDF文件夹&lt;br /&gt;
*VPN - 连接到SDF VPN（PPTP和OpenVPN）&lt;br /&gt;
*rsync - 使用rsync备份$HOME&lt;br /&gt;
*CVS - 在SDF上使用CVS&lt;br /&gt;
*GCI - SDF绿色计算倡议（Green Computing Initiative）&lt;br /&gt;
*MDNS（动态dns）- 自动MDNS示例(MetaARPA)&lt;br /&gt;
*SDF上的RubyGems - 设置 &amp;quot;gem&amp;quot; 命令&lt;br /&gt;
*scmgit - GIT源代码控制管理介绍&lt;br /&gt;
*SDFARC中继列表 - SDF业余无线电俱乐部（SDF Amateur Radio Club）使用的中继器列表&lt;br /&gt;
*toobnix.org - SDF的用户视频库&lt;br /&gt;
*X11转发 - 设置和运行X11应用程序（MetaARPA）&lt;br /&gt;
*$HOME/bin - 用户在SDF的多架构环境中编译的程序（ARPA）&lt;br /&gt;
*Screen - 复用你的终端（MetaARPA）&lt;br /&gt;
*Tmux - Screen的替代方案（MetaARPA）&lt;br /&gt;
*Minecraft - SDF自己的*私人*Minecraft（我的世界）服务器&lt;br /&gt;
*Chicken - Scheme编程语言的一种实现&lt;br /&gt;
*ECL - 可嵌入的通用编程语言&lt;br /&gt;
*移动应用 - 移动设备的应用&lt;br /&gt;
*端口分配 - MetaARPA成员的端口分配和使用信息&lt;br /&gt;
*UUCP（Unix-to-Unix Copy） - 通过轮询SDF获得UUCP新闻组新闻（USENET News）和网络邮件&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF的互联网聊天中继（IRC）&amp;quot;&amp;gt;5. SDF的互联网中继聊天（IRC） ===&lt;br /&gt;
&lt;br /&gt;
* SDF IRC可接受使用政策&lt;br /&gt;
* SDF IRC 频道&lt;br /&gt;
* 用Irssi自动连接IRC频道&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VoIP电话服务&amp;quot;&amp;gt;6. SDF VoIP电话服务 ===&lt;br /&gt;
&lt;br /&gt;
* 基本设置&lt;br /&gt;
* 扩展目录&lt;br /&gt;
* 高级功能和设置&lt;br /&gt;
* 配置FreePBX&lt;br /&gt;
* 配置思科（Cisco）7940G电话&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF 拨号（Dialup）和DSL互联网服务&amp;quot;&amp;gt;7. SDF 拨号（Dialup）和DSL互联网服务（适用于Dialup和DSL成员） ===&lt;br /&gt;
&lt;br /&gt;
* SDF 拨号 - 介绍和初始账户配置&lt;br /&gt;
** 设备升级 - SDF拨号所需的设备和服务&lt;br /&gt;
** 设置 - WinXP - 在Windows XP上配置拨号&lt;br /&gt;
** 设置 - Lucid - 在Ubuntu Linux上配置拨号&lt;br /&gt;
* SDF SDL - 配置和使用SDF DSL&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF电台！/ ANONRADIO服务&amp;quot;&amp;gt;8. SDF电台！/ ANONRADIO服务 ===&lt;br /&gt;
&lt;br /&gt;
* 如何收听ANONRADIO&lt;br /&gt;
* 如何在ANONRADIO上成为DJ&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VPS服务&amp;quot;&amp;gt;9. SDF VPS服务（适用于MetaARPA成员） ===&lt;br /&gt;
&lt;br /&gt;
* NetBSD的设置和配置&lt;br /&gt;
* 安装一个OpenLDAP服务器&lt;br /&gt;
* Debian的设置和配置&lt;br /&gt;
* Ubuntu的设置和配置（WIP）&lt;br /&gt;
* Plan9的设置和配置&lt;br /&gt;
* CentOS的设置和配置&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Cheat Sheets (文本编辑器）&amp;quot;&amp;gt;10. 小贴士  ===&lt;br /&gt;
&lt;br /&gt;
* 适用于Vi、awk、sed等的小贴士&lt;br /&gt;
* Emacs小贴士&lt;br /&gt;
* ed小贴士&lt;br /&gt;
* Pico小贴士&lt;br /&gt;
* 生存下来的TECO&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;Dotfile（配置文件）资料库&amp;quot;&amp;gt;11. Dotfile（配置文件）资料库 ===&lt;br /&gt;
&lt;br /&gt;
* 浏览含有注解的Dotfiles - 寻找工作示例，帮助你配置你最喜欢的程序。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;twenex.org - SDF公共访问 TWENEX 操作系统&amp;quot;&amp;gt;12. twenex.org - SDF公共访问 TWENEX 操作系统 ===&lt;br /&gt;
&lt;br /&gt;
* TOPS-20互动教程 - twenex.org的互动教程（@TOPS20）的日志和摘要&lt;br /&gt;
* 进入TWENEX - 为中级用户提供的twenex.org系统之旅&lt;br /&gt;
* 在TWENEX上使用多个互动程序 - 关于如何在同一登录中使用多个程序的教程&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;在线隐私&amp;quot;&amp;gt;13. 在线隐私 ===&lt;br /&gt;
&lt;br /&gt;
* 隐私保护&lt;br /&gt;
* SDF的隐私政策&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;复古计算&amp;quot;&amp;gt;14. 复古计算 ===&lt;br /&gt;
&lt;br /&gt;
* 歇斯底里的Unix指南 - 庆祝UNIX操作系统50周年&lt;br /&gt;
* CDC 6500生存指南&lt;br /&gt;
* 基本程序&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;贝尔实验室的Plan 9项目&amp;quot;&amp;gt;15. 贝尔实验室的Plan 9项目 ===&lt;br /&gt;
&#039;&#039;&#039;贝尔实验室的Plan 9&#039;&#039;&#039;是一个研究性的操作系统，被设计为超越Unix的操作系统进化的下一步。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDF&#039;&#039;&#039;赞助了一系列的训练营来介绍新用户使用&#039;&#039;&#039;Plan 9&#039;&#039;&#039;。本节教程收集了营员们的发现。&lt;br /&gt;
&lt;br /&gt;
* 为SDF VPS基本单位进行Plan9设置和配置&lt;br /&gt;
* Plan 9 C语言编程&lt;br /&gt;
* Plan 9 Rc 生存指南&lt;br /&gt;
* (在此添加你的Plan 9教程的链接)&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&amp;lt;small&amp;gt;&#039;&#039;$Id: index.html,v 1.195 2025/03/05 00:30:45 peteyboy Exp $&#039;&#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=113</id>
		<title>从Shell中寻找帮助</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=113"/>
		<updated>2025-08-20T01:35:56Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;提示：你可以[[从Shell中寻找帮助#SDF 具体帮助|进一步]]查看 SDF 的具体帮助说明，如 FAQ！&lt;br /&gt;
&lt;br /&gt;
虽然 UNIX shell 看起来有点令人生畏和冰冷，它有两个字母的神秘命令、几十个命令行开关，而且没有动画回形针为你指明方向，但有几种不同的方法可以从系统中获得帮助。&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 使用手册（Manpages） ===&lt;br /&gt;
&lt;br /&gt;
==== RTFMing 权威指南 ====&lt;br /&gt;
获取帮助的最简单、最全面的方法就是阅读手册。在使用电脑的过程中，你可能在某个地方听说过 RTFM（Read The Fscking Manual），这就是那本“手册”。Man页面是每种 UNIX 的标准文档形式。学会使用它们。学会爱护它们。&lt;br /&gt;
&lt;br /&gt;
在哪里可以找到它们？其实很简单。想想一个命令(ls、rm、chmod、kill、grep）或一个程序（vi、mutt、snarf、majordomo），然后继续键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中&amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt;正是你想了解的命令的名称。正如你所看到的，手册被分成不同的部分。我们以 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 为例。&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
     mkdir - make directories&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
     mkdir creates the directories named as operands, in the order specified,&lt;br /&gt;
     using mode rwxrwxrwx (0777) as modified by the current umask(2).&lt;br /&gt;
&lt;br /&gt;
     The options are as follows:&lt;br /&gt;
&lt;br /&gt;
     -m      Set the file permission bits of the final created directory to&lt;br /&gt;
             the specified mode.  The mode argument can be in any of the for-&lt;br /&gt;
             mats specified to the chmod(1) utility.  If a symbolic mode is&lt;br /&gt;
             specified, the operation characters ``+&#039;&#039; and ``-&#039;&#039; are inter-&lt;br /&gt;
             preted relative to an initial mode of ``a=rwx&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
     -p      Create intermediate directories as required.  If this option is&lt;br /&gt;
             not specified, the full path prefix of each operand must already&lt;br /&gt;
             exist.  Intermediate directories are created with permission bits&lt;br /&gt;
             of rwxrwxrwx (0777) as modified by the current umask, plus write&lt;br /&gt;
             and search permission for the owner.  Do not consider it an error&lt;br /&gt;
             if the argument directory already exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     The user must have write permission in the parent directory.&lt;br /&gt;
                                                                               &lt;br /&gt;
EXIT STATUS&lt;br /&gt;
     mkdir exits 0 if successful, and &amp;gt;0 if an error occurred.&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
STANDARDS&lt;br /&gt;
     The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2&#039;&#039;) compat-&lt;br /&gt;
     ible.&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;以下为说明的翻译&amp;lt;ref&amp;gt;以下翻译内容可以按照行数相互对照，便于理解。 --译者注&amp;lt;/ref&amp;gt;：&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
名称&lt;br /&gt;
     mkdir - 创建目录&lt;br /&gt;
&lt;br /&gt;
语法&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
描述&lt;br /&gt;
     使用mkdir按照指定对象的顺序创建目录，&lt;br /&gt;
     默认使用当前由umask规定的模式 rwxrwxrwx (0777)&lt;br /&gt;
&lt;br /&gt;
     可选项如下：&lt;br /&gt;
&lt;br /&gt;
     -m      将最终创建目录的文件权限设置为指定模式。 &lt;br /&gt;
             模式参数可以是为 chmod(1) 工具指定的任何模式。 &lt;br /&gt;
             如果指定的是符号模式，操作符 ``+&#039;&#039; 和 ``-&#039;&#039; 将&lt;br /&gt;
             相对于初始模式 ``a=rwx&#039;&#039; 进行解释。&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
     -p      根据需要创建中间目录。 如果未指定该选项，&lt;br /&gt;
             则每个操作数的完整路径前缀必须已经存在。 &lt;br /&gt;
             创建的中间目录权限为 rwxrwxrwx (0777)，&lt;br /&gt;
             由当前 umask 修改，外加所有者的写入和搜索权限。&lt;br /&gt;
             如果参数目录已经存在，则不视为错误。&lt;br /&gt;
                 译者注：比如命令 mkdir -p intermediate/name，&lt;br /&gt;
                 其中intermediate就为中间目录，若中间目录不存在则创建一个。&lt;br /&gt;
                 若不加参数 -p 则会报错。&lt;br /&gt;
     用户必须有写入父目录的权限。&lt;br /&gt;
                                                                               &lt;br /&gt;
退出状态&lt;br /&gt;
     mkdir 如果成功则退出 0，如果出错则退出 &amp;gt;0。&lt;br /&gt;
&lt;br /&gt;
也请看&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
标准&lt;br /&gt;
     mkdir 工具有望与 IEEE Std 1003.2（&amp;quot;POSIX.2&amp;quot;）兼容。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;对于我们的 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 命令，显示的 man 页面有六个部分：名称（NAME）、语法（SYNOPSIS）、描述（DESCRIPTION）、退出状态（EXIT STATUS）、另见（SEE ALSO）和标准（STANDARDS）。NAME 部分只显示命令名称及其功能的简短描述。SYNOPSIS 部分简要介绍了命令的语法，以便查看输入的命令应该是什么样子。方括号 [ ] 中的项目为可选项。DESCRIPTION 部分详细描述了命令的工作原理，包括命令的各种选项或模式。退出状态（EXIT STATUS）部分描述了命令完成后（成功或失败）生成的状态代码。程序（如 shell 脚本）可以读取这些代码，以确定如何对命令结果做出反应。SEE ALSO 提供了相关命令或其他可能有用命令的交叉参考信息。最后，STANDARDS 部分列出了该命令符合哪些标准的信息。&lt;br /&gt;
&lt;br /&gt;
Man页面分为九个章节：&lt;br /&gt;
&lt;br /&gt;
# 用户指令（User commands)&lt;br /&gt;
# 系统调用和错误编号（System calls and error numbers）&lt;br /&gt;
# C 库中的函数 （Functions in the C libraries）&lt;br /&gt;
# 设备驱动程序 （Device drivers）&lt;br /&gt;
# 文件格式 （File formats）&lt;br /&gt;
# 游戏和其他娱乐 （Games and other diversions）&lt;br /&gt;
# 杂项信息 （Miscellaneous information）&lt;br /&gt;
# 系统维护和操作命令 （System maintenance and operation commands）&lt;br /&gt;
# 内核开发人员 （Kernal developers）&lt;br /&gt;
&lt;br /&gt;
在某些情况下，同一主题会出现在手册的多个章节中。例如，有一个 chmod 用户命令和一个 chmod() 系统调用。如何找到相应的 man 页？您可以告诉 man 您要查找的章节。如果你想查找用户命令，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man 1 chmod&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将显示用户命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 的Man页面。对具体章节的引用通常放在命令名称后面的括号中，如：chmod(1)&lt;br /&gt;
&lt;br /&gt;
如果你知道命令的名称，这一切都很好，但如果你记不住名称呢？&amp;lt;code&amp;gt;man -k&amp;lt;/code&amp;gt;可以用来搜索命令描述中的关键字。因此，如果你想查找邮件程序，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man -k editor&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;屏幕上将显示一系列关键字为 &amp;quot;editor&amp;quot;（编辑器）的命令。&lt;br /&gt;
&lt;br /&gt;
=== GNU 的 Info 系统 ===&lt;br /&gt;
对于 GNU 项目的程序，也可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 命令。如果你知道程序的名称，可以将其作为参数（就像使用 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 命令一样）。&lt;br /&gt;
&lt;br /&gt;
事实上，你可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 作为 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 的别名，因为 info 阅读器如果找不到 info 条目，就会直接显示 man 页面（但你不能指定 manpage 的章节）。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
不过，标准信息阅读器的导航方式有所不同，因为它是基于 &amp;lt;code&amp;gt;emacs&amp;lt;/code&amp;gt; 文本编辑器的。&lt;br /&gt;
&lt;br /&gt;
快速按键帮助（更多信息，请查阅 &amp;lt;code&amp;gt;info info&amp;lt;/code&amp;gt;）：&lt;br /&gt;
&lt;br /&gt;
SPACE, BACKSPACE&lt;br /&gt;
&lt;br /&gt;
      向前翻页，向后翻页&lt;br /&gt;
&lt;br /&gt;
TAB&lt;br /&gt;
&lt;br /&gt;
      将光标放到下一个菜单项或链接上（信息文件有超链接）&lt;br /&gt;
&lt;br /&gt;
RETURN&lt;br /&gt;
&lt;br /&gt;
      跳转到光标所在链接指向的位置&lt;br /&gt;
&lt;br /&gt;
l（是字母ell）&lt;br /&gt;
&lt;br /&gt;
      回到上次开始跳转的位置&lt;br /&gt;
&lt;br /&gt;
u n p&lt;br /&gt;
&lt;br /&gt;
      上一个(up)、下一个(next)、先前(previous)节点（信息文件采用分层结构）&lt;br /&gt;
&lt;br /&gt;
q&lt;br /&gt;
&lt;br /&gt;
      退出(quit)信息阅读器&lt;br /&gt;
&lt;br /&gt;
在大多数终端上，您还可以使用光标（箭头）进行移动。&lt;br /&gt;
&lt;br /&gt;
=== SDF 具体帮助 ===&lt;br /&gt;
&lt;br /&gt;
SDF 中还有许多工具可以用来获取更多帮助。在 shell 提示下键入以下命令。&lt;br /&gt;
&lt;br /&gt;
help&lt;br /&gt;
&lt;br /&gt;
            SDF 帮助系统。&lt;br /&gt;
&lt;br /&gt;
FAQ&lt;br /&gt;
&lt;br /&gt;
            常见问题集。键入 &amp;quot;g&amp;quot; 进入主题，键入 &amp;quot;l&amp;quot; 列出主题中的问题，键入 &amp;quot;t&amp;quot; 阅读常见问题解答。FAQ也可在 [https://sdf.org/?faq SDF 网站]上找到。&lt;br /&gt;
&lt;br /&gt;
helpdesk&lt;br /&gt;
&lt;br /&gt;
            如果您在man、help、FAQ或谷歌搜索中找不到答案，请向helpdesk帮助台提出问题，友好的社区成员会回答您的问题。任何具有 ARPA 身份的成员都可以作为服务员登录回答问题。请注意：您只能在帮助台发布与 SDF 系统直接相关的问题，而不能发布与一般 UNIX、编程或园艺相关的问题，这些问题属于 bboard！&lt;br /&gt;
&lt;br /&gt;
bboard&lt;br /&gt;
&lt;br /&gt;
            要进入 SDF 公告板系统 (BBOARD)，请在命令行键入 bboard。在 bboard 命令提示符下键入 h 和 ? 或在 [[Bboard|bboard 教程]]中，可以找到有关使用 BBOARD 的帮助。如果您有关于使用 SDF 系统的一般问题，请在 HELPDESK 中发帖。如果您有需要管理员干预的问题（如软件请求或会员询问），请在 REQUESTS 发帖询问。&lt;br /&gt;
&lt;br /&gt;
com&lt;br /&gt;
&lt;br /&gt;
            Com 和 bboard 是 SDF 社区的聚会场所。您也可以在那里提出您的问题。Bboard 和 faq 具有相同的界面。请参阅 [[COM不是IRC|COM 不是 IRC]] 了解如何使用 com。&lt;br /&gt;
&lt;br /&gt;
当然还有你现在正在阅读的教程，目录顶部链接为&amp;lt;nowiki/&amp;gt;http://sdf.org/index.cgi?tutorials&amp;lt;nowiki/&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&#039;&#039;$Id: fi&#039;&#039;&amp;lt;nowiki/&amp;gt;&amp;lt;nowiki/&amp;gt;&#039;&#039;ndinghelp.html,v 1.12 2024/07/24 2&#039;&#039;&amp;lt;nowiki/&amp;gt;&amp;lt;nowiki/&amp;gt;&#039;&#039;0:26:38 cseiler Exp $&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=112</id>
		<title>从Shell中寻找帮助</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=112"/>
		<updated>2025-08-20T01:35:45Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;提示：你可以[[从Shell中寻找帮助#SDF 具体帮助|进一步]]查看 SDF 的具体帮助说明，如 FAQ！&lt;br /&gt;
&lt;br /&gt;
虽然 UNIX shell 看起来有点令人生畏和冰冷，它有两个字母的神秘命令、几十个命令行开关，而且没有动画回形针为你指明方向，但有几种不同的方法可以从系统中获得帮助。&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 使用手册（Manpages） ===&lt;br /&gt;
&lt;br /&gt;
==== RTFMing 权威指南 ====&lt;br /&gt;
获取帮助的最简单、最全面的方法就是阅读手册。在使用电脑的过程中，你可能在某个地方听说过 RTFM（Read The Fscking Manual），这就是那本“手册”。Man页面是每种 UNIX 的标准文档形式。学会使用它们。学会爱护它们。&lt;br /&gt;
&lt;br /&gt;
在哪里可以找到它们？其实很简单。想想一个命令(ls、rm、chmod、kill、grep）或一个程序（vi、mutt、snarf、majordomo），然后继续键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中&amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt;正是你想了解的命令的名称。正如你所看到的，手册被分成不同的部分。我们以 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 为例。&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
     mkdir - make directories&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
     mkdir creates the directories named as operands, in the order specified,&lt;br /&gt;
     using mode rwxrwxrwx (0777) as modified by the current umask(2).&lt;br /&gt;
&lt;br /&gt;
     The options are as follows:&lt;br /&gt;
&lt;br /&gt;
     -m      Set the file permission bits of the final created directory to&lt;br /&gt;
             the specified mode.  The mode argument can be in any of the for-&lt;br /&gt;
             mats specified to the chmod(1) utility.  If a symbolic mode is&lt;br /&gt;
             specified, the operation characters ``+&#039;&#039; and ``-&#039;&#039; are inter-&lt;br /&gt;
             preted relative to an initial mode of ``a=rwx&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
     -p      Create intermediate directories as required.  If this option is&lt;br /&gt;
             not specified, the full path prefix of each operand must already&lt;br /&gt;
             exist.  Intermediate directories are created with permission bits&lt;br /&gt;
             of rwxrwxrwx (0777) as modified by the current umask, plus write&lt;br /&gt;
             and search permission for the owner.  Do not consider it an error&lt;br /&gt;
             if the argument directory already exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     The user must have write permission in the parent directory.&lt;br /&gt;
                                                                               &lt;br /&gt;
EXIT STATUS&lt;br /&gt;
     mkdir exits 0 if successful, and &amp;gt;0 if an error occurred.&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
STANDARDS&lt;br /&gt;
     The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2&#039;&#039;) compat-&lt;br /&gt;
     ible.&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;以下为说明的翻译&amp;lt;ref&amp;gt;以下翻译内容可以按照行数相互对照，便于理解。 --译者注&amp;lt;/ref&amp;gt;：&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
名称&lt;br /&gt;
     mkdir - 创建目录&lt;br /&gt;
&lt;br /&gt;
语法&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
描述&lt;br /&gt;
     使用mkdir按照指定对象的顺序创建目录，&lt;br /&gt;
     默认使用当前由umask规定的模式 rwxrwxrwx (0777)&lt;br /&gt;
&lt;br /&gt;
     可选项如下：&lt;br /&gt;
&lt;br /&gt;
     -m      将最终创建目录的文件权限设置为指定模式。 &lt;br /&gt;
             模式参数可以是为 chmod(1) 工具指定的任何模式。 &lt;br /&gt;
             如果指定的是符号模式，操作符 ``+&#039;&#039; 和 ``-&#039;&#039; 将&lt;br /&gt;
             相对于初始模式 ``a=rwx&#039;&#039; 进行解释。&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
     -p      根据需要创建中间目录。 如果未指定该选项，&lt;br /&gt;
             则每个操作数的完整路径前缀必须已经存在。 &lt;br /&gt;
             创建的中间目录权限为 rwxrwxrwx (0777)，&lt;br /&gt;
             由当前 umask 修改，外加所有者的写入和搜索权限。&lt;br /&gt;
             如果参数目录已经存在，则不视为错误。&lt;br /&gt;
                 译者注：比如命令 mkdir -p intermediate/name，&lt;br /&gt;
                 其中intermediate就为中间目录，若中间目录不存在则创建一个。&lt;br /&gt;
                 若不加参数 -p 则会报错。&lt;br /&gt;
     用户必须有写入父目录的权限。&lt;br /&gt;
                                                                               &lt;br /&gt;
退出状态&lt;br /&gt;
     mkdir 如果成功则退出 0，如果出错则退出 &amp;gt;0。&lt;br /&gt;
&lt;br /&gt;
也请看&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
标准&lt;br /&gt;
     mkdir 工具有望与 IEEE Std 1003.2（&amp;quot;POSIX.2&amp;quot;）兼容。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;对于我们的 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 命令，显示的 man 页面有六个部分：名称（NAME）、语法（SYNOPSIS）、描述（DESCRIPTION）、退出状态（EXIT STATUS）、另见（SEE ALSO）和标准（STANDARDS）。NAME 部分只显示命令名称及其功能的简短描述。SYNOPSIS 部分简要介绍了命令的语法，以便查看输入的命令应该是什么样子。方括号 [ ] 中的项目为可选项。DESCRIPTION 部分详细描述了命令的工作原理，包括命令的各种选项或模式。退出状态（EXIT STATUS）部分描述了命令完成后（成功或失败）生成的状态代码。程序（如 shell 脚本）可以读取这些代码，以确定如何对命令结果做出反应。SEE ALSO 提供了相关命令或其他可能有用命令的交叉参考信息。最后，STANDARDS 部分列出了该命令符合哪些标准的信息。&lt;br /&gt;
&lt;br /&gt;
Man页面分为九个章节：&lt;br /&gt;
&lt;br /&gt;
# 用户指令（User commands)&lt;br /&gt;
# 系统调用和错误编号（System calls and error numbers）&lt;br /&gt;
# C 库中的函数 （Functions in the C libraries）&lt;br /&gt;
# 设备驱动程序 （Device drivers）&lt;br /&gt;
# 文件格式 （File formats）&lt;br /&gt;
# 游戏和其他娱乐 （Games and other diversions）&lt;br /&gt;
# 杂项信息 （Miscellaneous information）&lt;br /&gt;
# 系统维护和操作命令 （System maintenance and operation commands）&lt;br /&gt;
# 内核开发人员 （Kernal developers）&lt;br /&gt;
&lt;br /&gt;
在某些情况下，同一主题会出现在手册的多个章节中。例如，有一个 chmod 用户命令和一个 chmod() 系统调用。如何找到相应的 man 页？您可以告诉 man 您要查找的章节。如果你想查找用户命令，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man 1 chmod&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将显示用户命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 的Man页面。对具体章节的引用通常放在命令名称后面的括号中，如：chmod(1)&lt;br /&gt;
&lt;br /&gt;
如果你知道命令的名称，这一切都很好，但如果你记不住名称呢？&amp;lt;code&amp;gt;man -k&amp;lt;/code&amp;gt;可以用来搜索命令描述中的关键字。因此，如果你想查找邮件程序，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man -k editor&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;屏幕上将显示一系列关键字为 &amp;quot;editor&amp;quot;（编辑器）的命令。&lt;br /&gt;
&lt;br /&gt;
=== GNU 的 Info 系统 ===&lt;br /&gt;
对于 GNU 项目的程序，也可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 命令。如果你知道程序的名称，可以将其作为参数（就像使用 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 命令一样）。&lt;br /&gt;
&lt;br /&gt;
事实上，你可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 作为 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 的别名，因为 info 阅读器如果找不到 info 条目，就会直接显示 man 页面（但你不能指定 manpage 的章节）。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
不过，标准信息阅读器的导航方式有所不同，因为它是基于 &amp;lt;code&amp;gt;emacs&amp;lt;/code&amp;gt; 文本编辑器的。&lt;br /&gt;
&lt;br /&gt;
快速按键帮助（更多信息，请查阅 &amp;lt;code&amp;gt;info info&amp;lt;/code&amp;gt;）：&lt;br /&gt;
&lt;br /&gt;
SPACE, BACKSPACE&lt;br /&gt;
&lt;br /&gt;
      向前翻页，向后翻页&lt;br /&gt;
&lt;br /&gt;
TAB&lt;br /&gt;
&lt;br /&gt;
      将光标放到下一个菜单项或链接上（信息文件有超链接）&lt;br /&gt;
&lt;br /&gt;
RETURN&lt;br /&gt;
&lt;br /&gt;
      跳转到光标所在链接指向的位置&lt;br /&gt;
&lt;br /&gt;
l（是字母ell）&lt;br /&gt;
&lt;br /&gt;
      回到上次开始跳转的位置&lt;br /&gt;
&lt;br /&gt;
u n p&lt;br /&gt;
&lt;br /&gt;
      上一个(up)、下一个(next)、先前(previous)节点（信息文件采用分层结构）&lt;br /&gt;
&lt;br /&gt;
q&lt;br /&gt;
&lt;br /&gt;
      退出(quit)信息阅读器&lt;br /&gt;
&lt;br /&gt;
在大多数终端上，您还可以使用光标（箭头）进行移动。&lt;br /&gt;
&lt;br /&gt;
=== SDF 具体帮助 ===&lt;br /&gt;
&lt;br /&gt;
SDF 中还有许多工具可以用来获取更多帮助。在 shell 提示下键入以下命令。&lt;br /&gt;
&lt;br /&gt;
help&lt;br /&gt;
&lt;br /&gt;
            SDF 帮助系统。&lt;br /&gt;
&lt;br /&gt;
FAQ&lt;br /&gt;
&lt;br /&gt;
            常见问题集。键入 &amp;quot;g&amp;quot; 进入主题，键入 &amp;quot;l&amp;quot; 列出主题中的问题，键入 &amp;quot;t&amp;quot; 阅读常见问题解答。FAQ也可在 [https://sdf.org/?faq SDF 网站]上找到。&lt;br /&gt;
&lt;br /&gt;
helpdesk&lt;br /&gt;
&lt;br /&gt;
            如果您在man、help、FAQ或谷歌搜索中找不到答案，请向helpdesk帮助台提出问题，友好的社区成员会回答您的问题。任何具有 ARPA 身份的成员都可以作为服务员登录回答问题。请注意：您只能在帮助台发布与 SDF 系统直接相关的问题，而不能发布与一般 UNIX、编程或园艺相关的问题，这些问题属于 bboard！&lt;br /&gt;
&lt;br /&gt;
bboard&lt;br /&gt;
&lt;br /&gt;
            要进入 SDF 公告板系统 (BBOARD)，请在命令行键入 bboard。在 bboard 命令提示符下键入 h 和 ? 或在 [[Bboard|bboard 教程]]中，可以找到有关使用 BBOARD 的帮助。如果您有关于使用 SDF 系统的一般问题，请在 HELPDESK 中发帖。如果您有需要管理员干预的问题（如软件请求或会员询问），请在 REQUESTS 发帖询问。&lt;br /&gt;
&lt;br /&gt;
com&lt;br /&gt;
&lt;br /&gt;
            Com 和 bboard 是 SDF 社区的聚会场所。您也可以在那里提出您的问题。Bboard 和 faq 具有相同的界面。请参阅 [[COM不是IRC|COM 不是 IRC]] 了解如何使用 com。&lt;br /&gt;
&lt;br /&gt;
当然还有你现在正在阅读的教程，目录顶部链接为&amp;lt;nowiki/&amp;gt;http://sdf.org/index.cgi?tutorials&amp;lt;nowiki/&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&#039;&#039;$Id: fi&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;ndinghelp.html,v 1.12 2024/07/24 2&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;0:26:38 cseiler Exp $&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=111</id>
		<title>从Shell中寻找帮助</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E4%BB%8EShell%E4%B8%AD%E5%AF%BB%E6%89%BE%E5%B8%AE%E5%8A%A9&amp;diff=111"/>
		<updated>2025-08-20T01:35:20Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;提示：你可以[[从Shell中寻找帮助#SDF 具体帮助|进一步]]查看 SDF 的具体帮助说明，如 FAQ！&lt;br /&gt;
&lt;br /&gt;
虽然 UNIX shell 看起来有点令人生畏和冰冷，它有两个字母的神秘命令、几十个命令行开关，而且没有动画回形针为你指明方向，但有几种不同的方法可以从系统中获得帮助。&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 使用手册（Manpages） ===&lt;br /&gt;
&lt;br /&gt;
==== RTFMing 权威指南 ====&lt;br /&gt;
获取帮助的最简单、最全面的方法就是阅读手册。在使用电脑的过程中，你可能在某个地方听说过 RTFM（Read The Fscking Manual），这就是那本“手册”。Man页面是每种 UNIX 的标准文档形式。学会使用它们。学会爱护它们。&lt;br /&gt;
&lt;br /&gt;
在哪里可以找到它们？其实很简单。想想一个命令(ls、rm、chmod、kill、grep）或一个程序（vi、mutt、snarf、majordomo），然后继续键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;其中&amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt;正是你想了解的命令的名称。正如你所看到的，手册被分成不同的部分。我们以 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 为例。&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
NAME&lt;br /&gt;
     mkdir - make directories&lt;br /&gt;
&lt;br /&gt;
SYNOPSIS&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
     mkdir creates the directories named as operands, in the order specified,&lt;br /&gt;
     using mode rwxrwxrwx (0777) as modified by the current umask(2).&lt;br /&gt;
&lt;br /&gt;
     The options are as follows:&lt;br /&gt;
&lt;br /&gt;
     -m      Set the file permission bits of the final created directory to&lt;br /&gt;
             the specified mode.  The mode argument can be in any of the for-&lt;br /&gt;
             mats specified to the chmod(1) utility.  If a symbolic mode is&lt;br /&gt;
             specified, the operation characters ``+&#039;&#039; and ``-&#039;&#039; are inter-&lt;br /&gt;
             preted relative to an initial mode of ``a=rwx&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
     -p      Create intermediate directories as required.  If this option is&lt;br /&gt;
             not specified, the full path prefix of each operand must already&lt;br /&gt;
             exist.  Intermediate directories are created with permission bits&lt;br /&gt;
             of rwxrwxrwx (0777) as modified by the current umask, plus write&lt;br /&gt;
             and search permission for the owner.  Do not consider it an error&lt;br /&gt;
             if the argument directory already exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     The user must have write permission in the parent directory.&lt;br /&gt;
                                                                               &lt;br /&gt;
EXIT STATUS&lt;br /&gt;
     mkdir exits 0 if successful, and &amp;gt;0 if an error occurred.&lt;br /&gt;
&lt;br /&gt;
SEE ALSO&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
STANDARDS&lt;br /&gt;
     The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2&#039;&#039;) compat-&lt;br /&gt;
     ible.&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;以下为说明的翻译&amp;lt;ref&amp;gt;以下翻译内容可以按照行数相互对照，便于理解。 --译者注&amp;lt;/ref&amp;gt;：&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
% man mkdir&lt;br /&gt;
MKDIR(1)                NetBSD General Commands Manual                &lt;br /&gt;
MKDIR(1)&lt;br /&gt;
&lt;br /&gt;
名称&lt;br /&gt;
     mkdir - 创建目录&lt;br /&gt;
&lt;br /&gt;
语法&lt;br /&gt;
     mkdir [-p] [-m mode] directory_name ...&lt;br /&gt;
&lt;br /&gt;
描述&lt;br /&gt;
     使用mkdir按照指定对象的顺序创建目录，&lt;br /&gt;
     默认使用当前由umask规定的模式 rwxrwxrwx (0777)&lt;br /&gt;
&lt;br /&gt;
     可选项如下：&lt;br /&gt;
&lt;br /&gt;
     -m      将最终创建目录的文件权限设置为指定模式。 &lt;br /&gt;
             模式参数可以是为 chmod(1) 工具指定的任何模式。 &lt;br /&gt;
             如果指定的是符号模式，操作符 ``+&#039;&#039; 和 ``-&#039;&#039; 将&lt;br /&gt;
             相对于初始模式 ``a=rwx&#039;&#039; 进行解释。&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
     -p      根据需要创建中间目录。 如果未指定该选项，&lt;br /&gt;
             则每个操作数的完整路径前缀必须已经存在。 &lt;br /&gt;
             创建的中间目录权限为 rwxrwxrwx (0777)，&lt;br /&gt;
             由当前 umask 修改，外加所有者的写入和搜索权限。&lt;br /&gt;
             如果参数目录已经存在，则不视为错误。&lt;br /&gt;
                 译者注：比如命令 mkdir -p intermediate/name，&lt;br /&gt;
                 其中intermediate就为中间目录，若中间目录不存在则创建一个。&lt;br /&gt;
                 若不加参数 -p 则会报错。&lt;br /&gt;
     用户必须有写入父目录的权限。&lt;br /&gt;
                                                                               &lt;br /&gt;
退出状态&lt;br /&gt;
     mkdir 如果成功则退出 0，如果出错则退出 &amp;gt;0。&lt;br /&gt;
&lt;br /&gt;
也请看&lt;br /&gt;
     chmod(1), rmdir(1), mkdir(2), umask(2)&lt;br /&gt;
&lt;br /&gt;
标准&lt;br /&gt;
     mkdir 工具有望与 IEEE Std 1003.2（&amp;quot;POSIX.2&amp;quot;）兼容。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NetBSD 2.0.2                   January 25, 1994                   NetBSD &lt;br /&gt;
2.0.2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;对于我们的 &amp;lt;code&amp;gt;mkdir&amp;lt;/code&amp;gt; 命令，显示的 man 页面有六个部分：名称（NAME）、语法（SYNOPSIS）、描述（DESCRIPTION）、退出状态（EXIT STATUS）、另见（SEE ALSO）和标准（STANDARDS）。NAME 部分只显示命令名称及其功能的简短描述。SYNOPSIS 部分简要介绍了命令的语法，以便查看输入的命令应该是什么样子。方括号 [ ] 中的项目为可选项。DESCRIPTION 部分详细描述了命令的工作原理，包括命令的各种选项或模式。退出状态（EXIT STATUS）部分描述了命令完成后（成功或失败）生成的状态代码。程序（如 shell 脚本）可以读取这些代码，以确定如何对命令结果做出反应。SEE ALSO 提供了相关命令或其他可能有用命令的交叉参考信息。最后，STANDARDS 部分列出了该命令符合哪些标准的信息。&lt;br /&gt;
&lt;br /&gt;
Man页面分为九个章节：&lt;br /&gt;
&lt;br /&gt;
# 用户指令（User commands)&lt;br /&gt;
# 系统调用和错误编号（System calls and error numbers）&lt;br /&gt;
# C 库中的函数 （Functions in the C libraries）&lt;br /&gt;
# 设备驱动程序 （Device drivers）&lt;br /&gt;
# 文件格式 （File formats）&lt;br /&gt;
# 游戏和其他娱乐 （Games and other diversions）&lt;br /&gt;
# 杂项信息 （Miscellaneous information）&lt;br /&gt;
# 系统维护和操作命令 （System maintenance and operation commands）&lt;br /&gt;
# 内核开发人员 （Kernal developers）&lt;br /&gt;
&lt;br /&gt;
在某些情况下，同一主题会出现在手册的多个章节中。例如，有一个 chmod 用户命令和一个 chmod() 系统调用。如何找到相应的 man 页？您可以告诉 man 您要查找的章节。如果你想查找用户命令，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man 1 chmod&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;这将显示用户命令 &amp;lt;code&amp;gt;chmod&amp;lt;/code&amp;gt; 的Man页面。对具体章节的引用通常放在命令名称后面的括号中，如：chmod(1)&lt;br /&gt;
&lt;br /&gt;
如果你知道命令的名称，这一切都很好，但如果你记不住名称呢？&amp;lt;code&amp;gt;man -k&amp;lt;/code&amp;gt;可以用来搜索命令描述中的关键字。因此，如果你想查找邮件程序，可以键入&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
% man -k editor&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;屏幕上将显示一系列关键字为 &amp;quot;editor&amp;quot;（编辑器）的命令。&lt;br /&gt;
&lt;br /&gt;
=== GNU 的 Info 系统 ===&lt;br /&gt;
对于 GNU 项目的程序，也可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 命令。如果你知道程序的名称，可以将其作为参数（就像使用 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 命令一样）。&lt;br /&gt;
&lt;br /&gt;
事实上，你可以使用 &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; 作为 &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; 的别名，因为 info 阅读器如果找不到 info 条目，就会直接显示 man 页面（但你不能指定 manpage 的章节）。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
不过，标准信息阅读器的导航方式有所不同，因为它是基于 &amp;lt;code&amp;gt;emacs&amp;lt;/code&amp;gt; 文本编辑器的。&lt;br /&gt;
&lt;br /&gt;
快速按键帮助（更多信息，请查阅 &amp;lt;code&amp;gt;info info&amp;lt;/code&amp;gt;）：&lt;br /&gt;
&lt;br /&gt;
SPACE, BACKSPACE&lt;br /&gt;
&lt;br /&gt;
      向前翻页，向后翻页&lt;br /&gt;
&lt;br /&gt;
TAB&lt;br /&gt;
&lt;br /&gt;
      将光标放到下一个菜单项或链接上（信息文件有超链接）&lt;br /&gt;
&lt;br /&gt;
RETURN&lt;br /&gt;
&lt;br /&gt;
      跳转到光标所在链接指向的位置&lt;br /&gt;
&lt;br /&gt;
l（是字母ell）&lt;br /&gt;
&lt;br /&gt;
      回到上次开始跳转的位置&lt;br /&gt;
&lt;br /&gt;
u n p&lt;br /&gt;
&lt;br /&gt;
      上一个(up)、下一个(next)、先前(previous)节点（信息文件采用分层结构）&lt;br /&gt;
&lt;br /&gt;
q&lt;br /&gt;
&lt;br /&gt;
      退出(quit)信息阅读器&lt;br /&gt;
&lt;br /&gt;
在大多数终端上，您还可以使用光标（箭头）进行移动。&lt;br /&gt;
&lt;br /&gt;
=== SDF 具体帮助 ===&lt;br /&gt;
&lt;br /&gt;
SDF 中还有许多工具可以用来获取更多帮助。在 shell 提示下键入以下命令。&lt;br /&gt;
&lt;br /&gt;
help&lt;br /&gt;
&lt;br /&gt;
            SDF 帮助系统。&lt;br /&gt;
&lt;br /&gt;
FAQ&lt;br /&gt;
&lt;br /&gt;
            常见问题集。键入 &amp;quot;g&amp;quot; 进入主题，键入 &amp;quot;l&amp;quot; 列出主题中的问题，键入 &amp;quot;t&amp;quot; 阅读常见问题解答。FAQ也可在 [https://sdf.org/?faq SDF 网站]上找到。&lt;br /&gt;
&lt;br /&gt;
helpdesk&lt;br /&gt;
&lt;br /&gt;
            如果您在man、help、FAQ或谷歌搜索中找不到答案，请向helpdesk帮助台提出问题，友好的社区成员会回答您的问题。任何具有 ARPA 身份的成员都可以作为服务员登录回答问题。请注意：您只能在帮助台发布与 SDF 系统直接相关的问题，而不能发布与一般 UNIX、编程或园艺相关的问题，这些问题属于 bboard！&lt;br /&gt;
&lt;br /&gt;
bboard&lt;br /&gt;
&lt;br /&gt;
            要进入 SDF 公告板系统 (BBOARD)，请在命令行键入 bboard。在 bboard 命令提示符下键入 h 和 ? 或在 [[Bboard|bboard 教程]]中，可以找到有关使用 BBOARD 的帮助。如果您有关于使用 SDF 系统的一般问题，请在 HELPDESK 中发帖。如果您有需要管理员干预的问题（如软件请求或会员询问），请在 REQUESTS 发帖询问。&lt;br /&gt;
&lt;br /&gt;
com&lt;br /&gt;
&lt;br /&gt;
            Com 和 bboard 是 SDF 社区的聚会场所。您也可以在那里提出您的问题。Bboard 和 faq 具有相同的界面。请参阅 [[COM不是IRC|COM 不是 IRC]] 了解如何使用 com。&lt;br /&gt;
&lt;br /&gt;
当然还有你现在正在阅读的教程，目录顶部链接为&amp;lt;nowiki/&amp;gt;http://sdf.org/index.cgi?tutorials&amp;lt;nowiki/&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&#039;&#039;$Id: findinghelp.html,v 1.12 2024/07/24 20:26:38 cseiler Exp $&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=110</id>
		<title>文件传输教程</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=110"/>
		<updated>2025-08-20T01:32:45Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本教程讨论了将数据从本地（或外部）机器输入和输出 SDF 的各种方法。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;代办事项：&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* x/y/zmodem 传输&lt;br /&gt;
* kermit 传输&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 简介 ===&lt;br /&gt;
要在 SDF 和您的本地（或任何其他外部）机器之间传输数据，有多种方法。它们的可用性取决于您在 SDF 的会员级别（请参阅常见[http://sdf.org/index.cgi?faq?MEMBERS FAQ, 会员部分]以获取更多信息），外部系统及其连接。&lt;br /&gt;
&lt;br /&gt;
=== FTP - File Transfer Protocol ===&lt;br /&gt;
[http://en.wikipedia.org/wiki/File_Transfer_Protocol FTP (File Transfer Protocol)] 在 SDF 上仅用于 &#039;&#039;&#039;下载&#039;&#039;&#039; 公共文件，这是出于安全原因。对于私人文件的上传和下载，必须使用 [[文件传输教程#scp 和 sftp - secure copying 和 ftp|scp 和 sftp]]。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;注意：ARPA 会员可以允许通过 FTP 进行上&amp;amp;下载；然而，如果可能的话，最好使用 scp 或 sftp，因为 FTP 是不加密的，而且你的密码也必须在明文状态下传输。&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
对于下载，将你的 FTP 程序指向 sdf.org，并使用匿名 FTP 来读取数据（用户名 &amp;lt;code&amp;gt;anonymous&amp;lt;/code&amp;gt; ，密码 &amp;lt;code&amp;gt;&#039;&#039;yourlogin&#039;&#039;@sdf.org&amp;lt;/code&amp;gt; , 或您其他的电子邮件地址）。&lt;br /&gt;
&lt;br /&gt;
=== scp 和 sftp - secure copying 和 ftp ===&lt;br /&gt;
scp 和 sftp 是基于 ssh（secure shell）的安全数据传输方式。如果您之前只使用过 ftp，您会惊讶于使用 scp 的便捷性和好处。&lt;br /&gt;
&lt;br /&gt;
假设您已登录到 sdf，并希望将一些图片从您的家用计算机（在本例中命名为 foo）传输到您的 sdf 主目录。您需要使用以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;scp *.jpg me@sdf.org :/your/remote/home/&amp;lt;/syntaxhighlight&amp;gt;我们来分解一下这个命令：&lt;br /&gt;
&lt;br /&gt;
scp&lt;br /&gt;
&lt;br /&gt;
该命令本身。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;.jpg&lt;br /&gt;
&lt;br /&gt;
您想要传输的文件。&lt;br /&gt;
&lt;br /&gt;
me@sdf.org&lt;br /&gt;
&lt;br /&gt;
您希望连接的服务器的用户名。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;/your/remote/home/&lt;br /&gt;
&lt;br /&gt;
你想要上传的目录。&lt;br /&gt;
&lt;br /&gt;
除非你已经安装了 ssh 授权密钥，否则系统会提示你输入用户名和密码。之后，你应该会看到类似以下的输出：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
[me@local Pictures]# scp *.jpg me@sdf.org:~/your/remote/home&lt;br /&gt;
IMG_016.jpg 100% 1802KB 45.7KB/s 00:39&lt;br /&gt;
IMG_017.jpg 100% 1253KB 46.1KB/s 00:40&lt;br /&gt;
IMG_018.jpg 100% 1243KB 48.6KB/s 00:25&lt;br /&gt;
IMG_020.jpg 100% 1131KB 45.9KB/s 00:39&lt;br /&gt;
[foo@local Pictures]#&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;在 SDF 上，你需要成为 ARPA 会员才能使用它们。请查阅 scp 和 ssh 的手册页以获取更多信息和使用选项。&lt;br /&gt;
&lt;br /&gt;
在 Windows 机器上，你可以使用 PuTTY 程序 。&lt;br /&gt;
&lt;br /&gt;
=== ssh 和 tar - 安全复制目录 ===&lt;br /&gt;
tar 归档工具可以与 ssh 配合使用，快速复制整个目录树：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar cf - &#039;&#039;target_dir&#039;&#039; | ssh me@freeshell.org &amp;quot; tar xf - -C ~/&#039;&#039;path&#039;&#039;/ &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
注意：此技巧需要本地和远程系统上安装兼容版本的 tar 工具。&lt;br /&gt;
&lt;br /&gt;
=== Gopher 和 HTTP - 利用互联网进行下载 ===&lt;br /&gt;
要从本地机器上的SDF中获取数据，当然可以将它们发布到你的Gopher或网站上。请查阅[http://sdf.org/index.cgi?faq?GOPHER 常见问题解答（FAQ）中的GOPHER部分]以及[http://sdf.org/index.cgi?tutorials/building_a_website 网站教程]，以获取有关如何设置这些网站的详细信息。&lt;br /&gt;
&lt;br /&gt;
请注意，HTTP 流量受带宽限制，具体取决于您的会员级别；如果您的流量超过配额，您的网站将被暂时封锁！&lt;br /&gt;
&lt;br /&gt;
要防止任何人访问，请参阅常见问题解答（FAQ）中[http://sdf.org/index.cgi?faq?WEB?04 密码保护]的部分。&lt;br /&gt;
&lt;br /&gt;
=== 终端（Terminal） - 通过终端直接复制 ===&lt;br /&gt;
对于传输少量文本数据（脚本、表格、源代码片段）的情况，建议直接在终端中进行复制粘贴！如果你是[http://sdf.org/index.cgi?faq?MEMBERS?01 MetaARPA]，那么你可以利用&amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;及其内置的复制功能在不同屏幕之间传输数据。&lt;br /&gt;
&lt;br /&gt;
要在终端中将文本输入追加到SDF上的文件中，您可以使用您喜欢的文本编辑器打开SDF上的文件。或者直接使用命令 &amp;lt;code&amp;gt;cat &amp;gt;&amp;gt;file&amp;lt;/code&amp;gt;，将数据发送到终端（通过粘贴功能），并以一行仅包含 ^D (CTRL-D) 的内容结束--要在终端中这样做，请点击 RETURN、CTRL-D、RETURN；这将关闭 &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt; 正在读取的标准输入。&lt;br /&gt;
&lt;br /&gt;
=== 电子邮件 - 仅用于小文件 ===&lt;br /&gt;
如果您需要传输二进制数据，但不能使用 scp（因为您不是 [http://sdf.org/index.cgi?faq?MEMBERS?01 ARPA]，这很可惜），那么您可能需要通过电子邮件传输文件。为此，您需要将要输入 SDF 的数据附加到一封邮件中，然后发送到您在 SDF 上的地址（&#039;&#039;yourlogin&#039;&#039;@sdf.org）。在 SDF 上，您可以阅读邮件，并将附件保存到需要数据的地方（例如，您的主目录，您可以使用 &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 将其移动到该目录）。&lt;br /&gt;
&lt;br /&gt;
这对大附件可能不起作用，因为无处不在的电子邮件系统并不是为文件传输而设计的。如果你需要经常传输大文件，你应该认真考虑成为 ARPA！&lt;br /&gt;
&lt;br /&gt;
=== 术语表 ===&lt;br /&gt;
ARPA 和 MetaARPA&lt;br /&gt;
&lt;br /&gt;
            这些是SDF上的额外会员等级，可使用更多功能，提供更大空间，并带来支持SDF的良好体验！&lt;br /&gt;
&lt;br /&gt;
下载（download）&lt;br /&gt;
&lt;br /&gt;
            将数据从SDF传输到本地机器；想象SDF位于某个高处，以便所有人都能看到它——然后你从SDF下载数据。&lt;br /&gt;
&lt;br /&gt;
[http://www.chiark.greenend.org.uk/~sgtatham/putty PuTTY]&lt;br /&gt;
&lt;br /&gt;
            这是一套适用于 Windows 电脑的软件，用于 ssh 和 scp 连接。&lt;br /&gt;
&lt;br /&gt;
[http://sdf.org/ SDF]&lt;br /&gt;
&lt;br /&gt;
            Super Dimensional Fortress - 如果你不知道那是什么，那你为什么要读这篇文章？&amp;lt;&#039;&#039;wink&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
terminal （终端）&lt;br /&gt;
&lt;br /&gt;
            用于以文本模式连接到计算机的设备（更准确的定义请参见相应的[http://en.wikipedia.org/wiki/Computer_terminal 维基百科条目]），或在本教程中仅指以文本模式访问SDF的窗口。如果你使用的是Windows系统，这可能是Telnet窗口（或建议使用PuTTY通过SSH进行安全连接——即使不属于ARPA，这也同样可行），而在Linux机器上则是一个xterm窗口。&lt;br /&gt;
&lt;br /&gt;
upload （上传）&lt;br /&gt;
&lt;br /&gt;
            将数据从本地机器传输到SDF；请参阅下载（download）。&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: filetransfer.html,v 1.17 2020/01/01 22:27:19 niro Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=109</id>
		<title>文件传输教程</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=109"/>
		<updated>2025-08-20T01:27:48Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本教程讨论了将数据从本地（或外部）机器输入和输出 SDF 的各种方法。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;代办事项：&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* x/y/zmodem 传输&lt;br /&gt;
* kermit 传输&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 简介 ===&lt;br /&gt;
要在 SDF 和您的本地（或任何其他外部）机器之间传输数据，有多种方法。它们的可用性取决于您在 SDF 的会员级别（请参阅常见[http://sdf.org/index.cgi?faq?MEMBERS FAQ, 会员部分]以获取更多信息），外部系统及其连接。&lt;br /&gt;
&lt;br /&gt;
=== FTP - File Transfer Protocol ===&lt;br /&gt;
[http://en.wikipedia.org/wiki/File_Transfer_Protocol FTP (File Transfer Protocol)] 在 SDF 上仅用于 &#039;&#039;&#039;下载&#039;&#039;&#039; 公共文件，这是出于安全原因。对于私人文件的上传和下载，必须使用 [[文件传输教程#scp 和 sftp - secure copying 和 ftp|scp 和 sftp]]。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;注意：ARPA 会员可以允许通过 FTP 进行上&amp;amp;下载；然而，如果可能的话，最好使用 scp 或 sftp，因为 FTP 是不加密的，而且你的密码也必须在明文状态下传输。&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
对于下载，将你的 FTP 程序指向 sdf.org，并使用匿名 FTP 来读取数据（用户名 &amp;lt;code&amp;gt;anonymous&amp;lt;/code&amp;gt; ，密码 &amp;lt;code&amp;gt;&#039;&#039;yourlogin&#039;&#039;@sdf.org&amp;lt;/code&amp;gt; , 或您其他的电子邮件地址）。&lt;br /&gt;
&lt;br /&gt;
=== scp 和 sftp - secure copying 和 ftp ===&lt;br /&gt;
scp 和 sftp 是基于 ssh（secure shell）的安全数据传输方式。如果您之前只使用过 ftp，您会惊讶于使用 scp 的便捷性和好处。&lt;br /&gt;
&lt;br /&gt;
假设您已登录到 sdf，并希望将一些图片从您的家用计算机（在本例中命名为 foo）传输到您的 sdf 主目录。您需要使用以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;scp *.jpg me@sdf.org :/your/remote/home/&amp;lt;/syntaxhighlight&amp;gt;我们来分解一下这个命令：&lt;br /&gt;
&lt;br /&gt;
scp&lt;br /&gt;
&lt;br /&gt;
该命令本身。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;.jpg&lt;br /&gt;
&lt;br /&gt;
您想要传输的文件。&lt;br /&gt;
&lt;br /&gt;
me@sdf.org&lt;br /&gt;
&lt;br /&gt;
您希望连接的服务器的用户名。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;/your/remote/home/&lt;br /&gt;
&lt;br /&gt;
你想要上传的目录。&lt;br /&gt;
&lt;br /&gt;
除非你已经安装了 ssh 授权密钥，否则系统会提示你输入用户名和密码。之后，你应该会看到类似以下的输出：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
[me@local Pictures]# scp *.jpg me@sdf.org:~/your/remote/home&lt;br /&gt;
IMG_016.jpg 100% 1802KB 45.7KB/s 00:39&lt;br /&gt;
IMG_017.jpg 100% 1253KB 46.1KB/s 00:40&lt;br /&gt;
IMG_018.jpg 100% 1243KB 48.6KB/s 00:25&lt;br /&gt;
IMG_020.jpg 100% 1131KB 45.9KB/s 00:39&lt;br /&gt;
[foo@local Pictures]#&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;在 SDF 上，你需要成为 ARPA 会员才能使用它们。请查阅 scp 和 ssh 的手册页以获取更多信息和使用选项。&lt;br /&gt;
&lt;br /&gt;
在 Windows 机器上，你可以使用 PuTTY 程序 。&lt;br /&gt;
&lt;br /&gt;
=== ssh 和 tar - 安全复制目录 ===&lt;br /&gt;
tar 归档工具可以与 ssh 配合使用，快速复制整个目录树：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar cf - &#039;&#039;target_dir&#039;&#039; | ssh me@freeshell.org &amp;quot; tar xf - -C ~/&#039;&#039;path&#039;&#039;/ &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
注意：此技巧需要本地和远程系统上安装兼容版本的 tar 工具。&lt;br /&gt;
&lt;br /&gt;
=== Gopher 和 HTTP - 利用互联网进行下载 ===&lt;br /&gt;
要从本地机器上的SDF中获取数据，当然可以将它们发布到你的Gopher或网站上。请查阅[http://sdf.org/index.cgi?faq?GOPHER 常见问题解答（FAQ）中的GOPHER部分]以及[http://sdf.org/index.cgi?tutorials/building_a_website 网站教程]，以获取有关如何设置这些网站的详细信息。&lt;br /&gt;
&lt;br /&gt;
请注意，HTTP 流量受带宽限制，具体取决于您的会员级别；如果您的流量超过配额，您的网站将被暂时封锁！&lt;br /&gt;
&lt;br /&gt;
要防止任何人访问，请参阅常见问题解答（FAQ）中[http://sdf.org/index.cgi?faq?WEB?04 密码保护]的部分。&lt;br /&gt;
&lt;br /&gt;
=== 终端（Terminal） - 通过终端直接复制 ===&lt;br /&gt;
对于传输少量文本数据（脚本、表格、源代码片段）的情况，建议直接在终端中进行复制粘贴！如果你是[http://sdf.org/index.cgi?faq?MEMBERS?01 MetaARPA]，那么你可以利用&amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;及其内置的复制功能在不同屏幕之间传输数据。&lt;br /&gt;
&lt;br /&gt;
要在终端中将文本输入追加到SDF上的文件中，您可以使用您喜欢的文本编辑器打开SDF上的文件。或者直接使用命令 &amp;lt;code&amp;gt;cat &amp;gt;&amp;gt;file&amp;lt;/code&amp;gt;，将数据发送到终端（通过粘贴功能），并以一行仅包含 ^D (CTRL-D) 的内容结束--要在终端中这样做，请点击 RETURN、CTRL-D、RETURN；这将关闭 &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt; 正在读取的标准输入。&lt;br /&gt;
&lt;br /&gt;
=== 电子邮件 - 仅用于小文件 ===&lt;br /&gt;
如果您需要传输二进制数据，但不能使用 scp（因为您不是 [http://sdf.org/index.cgi?faq?MEMBERS?01 ARPA]，这很可惜），那么您可能需要通过电子邮件传输文件。为此，您需要将要输入 SDF 的数据附加到一封邮件中，然后发送到您在 SDF 上的地址（&#039;&#039;yourlogin&#039;&#039;@sdf.org）。在 SDF 上，您可以阅读邮件，并将附件保存到需要数据的地方（例如，您的主目录，您可以使用 &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; 将其移动到该目录）。&lt;br /&gt;
&lt;br /&gt;
这对大附件可能不起作用，因为无处不在的电子邮件系统并不是为文件传输而设计的。如果你需要经常传输大文件，你应该认真考虑成为 ARPA！&lt;br /&gt;
&lt;br /&gt;
=== 术语表 ===&lt;br /&gt;
ARPA 和 MetaARPA&lt;br /&gt;
&lt;br /&gt;
这些是SDF上的额外会员等级，可使用更多功能，提供更大空间，并带来支持SDF的良好体验！&lt;br /&gt;
&lt;br /&gt;
下载（download）&lt;br /&gt;
&lt;br /&gt;
将数据从SDF传输到本地机器；想象SDF位于某个高处，以便所有人都能看到它——然后你从SDF下载数据。&lt;br /&gt;
&lt;br /&gt;
[http://www.chiark.greenend.org.uk/~sgtatham/putty PuTTY]&lt;br /&gt;
&lt;br /&gt;
这是一套适用于 Windows 电脑的软件，用于 ssh 和 scp 连接。&lt;br /&gt;
&lt;br /&gt;
[http://sdf.org/ SDF]&lt;br /&gt;
&lt;br /&gt;
Super Dimensional Fortress - 如果你不知道那是什么，那你为什么要读这篇文章？&amp;lt;&#039;&#039;wink&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
terminal （终端）&lt;br /&gt;
&lt;br /&gt;
用于以文本模式连接到计算机的设备（更准确的定义请参见相应的[http://en.wikipedia.org/wiki/Computer_terminal 维基百科条目]），或在本教程中仅指以文本模式访问SDF的窗口。如果你使用的是Windows系统，这可能是Telnet窗口（或建议使用PuTTY通过SSH进行安全连接——即使不属于ARPA，这也同样可行），而在Linux机器上则是一个xterm窗口。&lt;br /&gt;
&lt;br /&gt;
upload （上传）&lt;br /&gt;
&lt;br /&gt;
将数据从本地机器传输到SDF；请参阅下载（download）。&lt;br /&gt;
----&#039;&#039;&amp;lt;small&amp;gt;$Id: filetransfer.html,v 1.17 2020/01/01 22:27:19 niro Exp $&amp;lt;/small&amp;gt;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=108</id>
		<title>文件传输教程</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E6%96%87%E4%BB%B6%E4%BC%A0%E8%BE%93%E6%95%99%E7%A8%8B&amp;diff=108"/>
		<updated>2025-08-19T09:29:45Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;本教程讨论了将数据从本地（或外部）机器输入和输出 SDF 的各种方法。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;代办事项：&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* x/y/zmodem 传输&lt;br /&gt;
* kermit 传输&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 简介 ===&lt;br /&gt;
要在 SDF 和您的本地（或任何其他外部）机器之间传输数据，有多种方法。它们的可用性取决于您在 SDF 的会员级别（请参阅常见[http://sdf.org/index.cgi?faq?MEMBERS FAQ, 会员部分]以获取更多信息），外部系统及其连接。&lt;br /&gt;
&lt;br /&gt;
=== FTP - File Transfer Protocol ===&lt;br /&gt;
FTP (File Transfer Protocol) 在 SDF 上仅用于 &#039;&#039;&#039;下载&#039;&#039;&#039; 公共文件，这是出于安全原因。对于私人文件的上传和下载，必须使用 scp 和 sftp。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;注意：ARPA 会员可以允许通过 FTP 进行上&amp;amp;下载；然而，如果可能的话，最好使用 scp 或 sftp，因为 FTP 是不加密的，而且你的密码也必须在明文状态下传输。&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
对于下载，将你的 FTP 程序指向 sdf.org，并使用匿名 FTP 来读取数据（用户名 &amp;lt;code&amp;gt;anonymous&amp;lt;/code&amp;gt; ，密码 &amp;lt;code&amp;gt;&#039;&#039;yourlogin&#039;&#039;@sdf.org&amp;lt;/code&amp;gt; , 或您其他的电子邮件地址）。&lt;br /&gt;
&lt;br /&gt;
=== scp 和 sftp - secure copying 和 ftp ===&lt;br /&gt;
scp 和 sftp 是基于 ssh（secure shell）的安全数据传输方式。如果您之前只使用过 ftp，您会惊讶于使用 scp 的便捷性和好处。&lt;br /&gt;
&lt;br /&gt;
假设您已登录到 sdf，并希望将一些图片从您的家用计算机（在本例中命名为 foo）传输到您的 sdf 主目录。您需要使用以下命令：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;scp *.jpg me@sdf.org :/your/remote/home/&amp;lt;/syntaxhighlight&amp;gt;我们来分解一下这个命令：&lt;br /&gt;
&lt;br /&gt;
scp&lt;br /&gt;
&lt;br /&gt;
该命令本身。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;.jpg&lt;br /&gt;
&lt;br /&gt;
您想要传输的文件。&lt;br /&gt;
&lt;br /&gt;
me@sdf.org&lt;br /&gt;
&lt;br /&gt;
您希望连接的服务器的用户名。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;:&amp;lt;/nowiki&amp;gt;/your/remote/home/&lt;br /&gt;
&lt;br /&gt;
你想要上传的目录。&lt;br /&gt;
&lt;br /&gt;
除非你已经安装了 ssh 授权密钥，否则系统会提示你输入用户名和密码。之后，你应该会看到类似以下的输出：&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
[me@local Pictures]# scp *.jpg me@sdf.org:~/your/remote/home&lt;br /&gt;
IMG_016.jpg 100% 1802KB 45.7KB/s 00:39&lt;br /&gt;
IMG_017.jpg 100% 1253KB 46.1KB/s 00:40&lt;br /&gt;
IMG_018.jpg 100% 1243KB 48.6KB/s 00:25&lt;br /&gt;
IMG_020.jpg 100% 1131KB 45.9KB/s 00:39&lt;br /&gt;
[foo@local Pictures]#&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;在 SDF 上，你需要成为 ARPA 会员才能使用它们。请查阅 scp 和 ssh 的手册页以获取更多信息和使用选项。&lt;br /&gt;
&lt;br /&gt;
在 Windows 机器上，你可以使用 PuTTY 程序 。&lt;br /&gt;
&lt;br /&gt;
=== ssh 和 tar - 安全复制目录 ===&lt;br /&gt;
tar 归档工具可以与 ssh 配合使用，快速复制整个目录树：&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
	<entry>
		<id>https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=107</id>
		<title>首页</title>
		<link rel="alternate" type="text/html" href="https://tutorials.sdfcn.org/index.php?title=%E9%A6%96%E9%A1%B5&amp;diff=107"/>
		<updated>2025-08-19T09:11:24Z</updated>

		<summary type="html">&lt;p&gt;Gao66：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;tutorials.sdfcn.org - sdf中文html教程说明&amp;lt;/strong&amp;gt;&lt;br /&gt;
* 基于[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]翻译而来，只是转述[https://sdf.org/?tutorials SDF, UNIX and INTERNET tutorials]的内容，某些内容可能过时，不对其中观点负责。&lt;br /&gt;
* 此教程翻译自传统的[https://sdf.org/?tutorials html教程]，并非新[https://wiki.sdf.org sdf教程维基]，但是今后也会进行翻译。&lt;br /&gt;
&lt;br /&gt;
* 除非另有声明，本网站内容采用[https://creativecommons.org/licenses/by/4.0/ Creative Commons Attribution] (CC BY 4.0) 授权。&lt;br /&gt;
&lt;br /&gt;
* 此教程目前为个人维护项目，如有问题请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
&lt;br /&gt;
* 若教程内容出现问题（如翻译问题等），也请联系[mailto:gao66@sdf.org gao66@sdf.org]。&lt;br /&gt;
2023.6.19 gao66 on sdf&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF、UNIX和INTERNET教程&#039;&#039;&#039; ==&lt;br /&gt;
&#039;&#039;&#039;SDF成员贡献教程，是为了与INTERNET、UNIX操作系统和编程语言感兴趣的现有和潜在的SDF用户分享知识，并提供帮助。本项目的目的是通过实际且有用的示例，帮助用户充分利用 SDF 和 UNIX 的丰富功能。&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;两个教程项目&#039;&#039;&#039; ==&lt;br /&gt;
目前有两个重叠的教程项目：&lt;br /&gt;
&lt;br /&gt;
* 新的[https://wiki.sdf.org SDF教程维基]，可在wiki.sdf.org找到。&amp;lt;ref&amp;gt;中文翻译版本会放在https://wiki.sdf.org，目前还没有。 --译者注&amp;lt;/ref&amp;gt;它包含下面列出的所有（或几乎所有）HTML教程的移植版本，以及新的内容。它还包括搜索功能，以及一个标准化的页面格式。&lt;br /&gt;
*传统的[[#HTML教程]]，即是以下内容。这些教程包含了许多由SDF用户多年来创建和更新的基础和高级教程。&lt;br /&gt;
&lt;br /&gt;
===有兴趣做出贡献吗？===&lt;br /&gt;
&lt;br /&gt;
*向教程维基做贡献：教程维基的建立是为了方便添加和维护教程的内容。要在教程维基上做贡献，你需要为自己建立一个账户。发送电子邮件至 [mailto:membership@sdf.org membership@sdf.org] （mailto link）以获得一个具有写入权限的账户，以便能够在维基上贡献编辑和新内容。 &amp;lt;br /&amp;gt;教程维基页面可以在你的浏览器中直接编辑，如果你担心把事情搞乱，它有内置的预览和版本控制。如果你有任何使用维基的经验，这对你来说很容易。更多细节作为Dokuwiki页面链接到了维基本身上，包括：&lt;br /&gt;
**[https://www.dokuwiki.org/wiki:syntax 维基语法]&lt;br /&gt;
**[https://www.dokuwiki.org/manual 维基用户手册]&lt;br /&gt;
*向HTML教程做贡献：传统的HTML教程项目包括本页面和下面链接的所有教程页面。为了能够对HTML教程做出贡献，请阅读[[SDF HTML教程编辑指南|HTML教程编辑指南]]，该指南也在[https://wiki.sdf.org/doku.php?id=sdf_tutorial_editing_guide 此处]的维基页面提供&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;SDF教程维基&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[https://wiki.sdfcn.org/ SDF教程维基]&amp;lt;ref&amp;gt; 目前还不存在，今后会进行翻译  --译者注 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;&amp;lt;span id=&amp;quot;HTML教程&amp;quot;&amp;gt;HTML教程：目录&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
#[[#SDF基础知识]]&lt;br /&gt;
#[[#电子邮件]]&lt;br /&gt;
#[[#网站设置和托管功能]]&lt;br /&gt;
#[[#高级专题]]&lt;br /&gt;
#[[#SDF的互联网聊天中继（IRC）]]&lt;br /&gt;
#[[#SDF VoIP电话服务]]&lt;br /&gt;
#[[#SDF 拨号（Dialup）和DSL互联网服务]]（适用于Dialup和DSL成员）&lt;br /&gt;
#[[#SDF电台！/ ANONRADIO服务]]&lt;br /&gt;
#[[#SDF VPS服务]]（适用于metaArpa成员）&lt;br /&gt;
#[[#Cheat Sheets (文本编辑器）]]&lt;br /&gt;
#[[#Dotfile（配置文件）资料库]]&lt;br /&gt;
#[[#twenex.org - SDF公共访问 TWENEX 操作系统]]&lt;br /&gt;
#[[#在线隐私]]&lt;br /&gt;
#[[#复古计算]]&lt;br /&gt;
#[[#贝尔实验室的Plan 9项目]]&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF基础知识&amp;quot;&amp;gt;1. SDF基础知识===&lt;br /&gt;
&lt;br /&gt;
*[[从Shell中寻找帮助|寻找帮助]] - 如何在shell中取得帮助&lt;br /&gt;
*[[COM不是IRC]]（互联网聊天中继）- 聊天程序 &amp;quot;COM&amp;quot; 的介绍&lt;br /&gt;
*[[bboard]] - 对论坛 &amp;quot;bboard&amp;quot; 的介绍&lt;br /&gt;
*[[SDF 多用户环境中的个人责任|多用户系统的责任]] - 关于SDF多用户环境下用户责任的声明&lt;br /&gt;
*[[SDF SSH 主机密钥|主机密钥]] - SDF的SSH主机密钥的列表&lt;br /&gt;
*[[SDF 中的即时信息|即时通讯]] - 如何在SDF上使用即时通讯服务&lt;br /&gt;
*[[文件传输教程|文件传输]] - 如何将文件移入或移出SDF&lt;br /&gt;
*UNIX®的Shell之间的最终差异 - 比较shell的差异/相似性&lt;br /&gt;
*文件权限 - 更改文件权限&lt;br /&gt;
*基本的文件和shell操作 - 使用一些命令操作文件和目录&lt;br /&gt;
*ASCII游戏 - 只工作不玩乐只会使你自己成为一个无趣的SDFer&lt;br /&gt;
*如何捐赠及原因 - 解释你的朋友和你的家人（或你）应该如何以及为什么要帮助资助SDF的一个页面。&lt;br /&gt;
*传播关于SDF的信息&lt;br /&gt;
*为盲人用户的SDF&lt;br /&gt;
*使用微软Windows™ 的 telnet&lt;br /&gt;
*SDF上的按类别排序的软件&lt;br /&gt;
*SDF特有命令 - SDF特有的命令、脚本和程序的列表。&lt;br /&gt;
*Jabber IM服务器 - 使用SDF Jabber XMPP即时通讯服务器&lt;br /&gt;
*SDF上的游戏服务器 - 在SDF上运行的多人游戏服务器列表&lt;br /&gt;
*Tiny Tiny RSS - 在SDF中托管的RSS阅读器&lt;br /&gt;
*MetaArray（元数组） - 存储以及为MetaArpa成员提供的一些服务&lt;br /&gt;
*GNU 社区 - SDF的微博&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;电子邮件&amp;quot;&amp;gt;2. 电子邮件 ===&lt;br /&gt;
&lt;br /&gt;
* 为初学者提供的电子邮件教程&lt;br /&gt;
* 电子邮件基础知识&lt;br /&gt;
* 电子邮件的黑名单问题 - 别人收到你的SDF邮件的问题&lt;br /&gt;
* SDF灰名单 - 减少垃圾邮件的系统政策&lt;br /&gt;
* Mutt邮件的用户代理（User Agent）&lt;br /&gt;
* 高级电子邮件主题 - 转发信息，打击垃圾邮件&lt;br /&gt;
* 设置一段假期 - 发送自动邮件回复&lt;br /&gt;
* POP3、IMAP和SMTP 验证 - 在流行的邮件客户端设置POP3、IMAP和SMTP认证&lt;br /&gt;
* SDF上的Procmail（邮件过滤工具）- 一般的配置说明&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;网站设置和托管功能&amp;quot;&amp;gt;3. 网站设置和托管功能 ===&lt;br /&gt;
&lt;br /&gt;
* 网站 - 在SDF上建立一个网站&lt;br /&gt;
* 为网站建设者提供的资源&lt;br /&gt;
* 自定义错误页面 - 使用.htaccess创建自定义错误页面&lt;br /&gt;
* SDF上的Ruby on Rails&lt;br /&gt;
** Ruby on Rails - SDF上的Ruby on Rails&lt;br /&gt;
** 构建一个基本的Ruby on Rails应用程序&lt;br /&gt;
* SDF上的Trac - 设置和使用Trac实例&lt;br /&gt;
* Gopher - 构建你自己的Gopher空间&lt;br /&gt;
* 用Jekyll写博客&lt;br /&gt;
* Htaccess - Apache HTTP服务器的有用的.htaccess技巧和窍门&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;高级专题&amp;quot;&amp;gt;4. 高级专题 ===&lt;br /&gt;
&lt;br /&gt;
* 编程语言、代码开发和编译器 - 在SDF编写你自己的代码&lt;br /&gt;
*使用skey - 通过不安全的协议安全地登录&lt;br /&gt;
*Emacs教程 - Emacs基础知识，使用Emacs作为工作环境&lt;br /&gt;
*SSH - 使用SDF时，通过SSH保证安全和路由客户端应用程序&lt;br /&gt;
*SSHFS - 使用SSHFS在linux本地机器上挂载SDF文件夹&lt;br /&gt;
*EncFS - 使用EncFS来管理加密的文件夹&lt;br /&gt;
*PSSHFS - 在NetBSD本地机器上挂载SDF文件夹&lt;br /&gt;
*VPN - 连接到SDF VPN（PPTP和OpenVPN）&lt;br /&gt;
*rsync - 使用rsync备份$HOME&lt;br /&gt;
*CVS - 在SDF上使用CVS&lt;br /&gt;
*GCI - SDF绿色计算倡议（Green Computing Initiative）&lt;br /&gt;
*MDNS（动态dns）- 自动MDNS示例(MetaARPA)&lt;br /&gt;
*SDF上的RubyGems - 设置 &amp;quot;gem&amp;quot; 命令&lt;br /&gt;
*scmgit - GIT源代码控制管理介绍&lt;br /&gt;
*SDFARC中继列表 - SDF业余无线电俱乐部（SDF Amateur Radio Club）使用的中继器列表&lt;br /&gt;
*toobnix.org - SDF的用户视频库&lt;br /&gt;
*X11转发 - 设置和运行X11应用程序（MetaARPA）&lt;br /&gt;
*$HOME/bin - 用户在SDF的多架构环境中编译的程序（ARPA）&lt;br /&gt;
*Screen - 复用你的终端（MetaARPA）&lt;br /&gt;
*Tmux - Screen的替代方案（MetaARPA）&lt;br /&gt;
*Minecraft - SDF自己的*私人*Minecraft（我的世界）服务器&lt;br /&gt;
*Chicken - Scheme编程语言的一种实现&lt;br /&gt;
*ECL - 可嵌入的通用编程语言&lt;br /&gt;
*移动应用 - 移动设备的应用&lt;br /&gt;
*端口分配 - MetaARPA成员的端口分配和使用信息&lt;br /&gt;
*UUCP（Unix-to-Unix Copy） - 通过轮询SDF获得UUCP新闻组新闻（USENET News）和网络邮件&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF的互联网聊天中继（IRC）&amp;quot;&amp;gt;5. SDF的互联网中继聊天（IRC） ===&lt;br /&gt;
&lt;br /&gt;
* SDF IRC可接受使用政策&lt;br /&gt;
* SDF IRC 频道&lt;br /&gt;
* 用Irssi自动连接IRC频道&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VoIP电话服务&amp;quot;&amp;gt;6. SDF VoIP电话服务 ===&lt;br /&gt;
&lt;br /&gt;
* 基本设置&lt;br /&gt;
* 扩展目录&lt;br /&gt;
* 高级功能和设置&lt;br /&gt;
* 配置FreePBX&lt;br /&gt;
* 配置思科（Cisco）7940G电话&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF 拨号（Dialup）和DSL互联网服务&amp;quot;&amp;gt;7. SDF 拨号（Dialup）和DSL互联网服务（适用于Dialup和DSL成员） ===&lt;br /&gt;
&lt;br /&gt;
* SDF 拨号 - 介绍和初始账户配置&lt;br /&gt;
** 设备升级 - SDF拨号所需的设备和服务&lt;br /&gt;
** 设置 - WinXP - 在Windows XP上配置拨号&lt;br /&gt;
** 设置 - Lucid - 在Ubuntu Linux上配置拨号&lt;br /&gt;
* SDF SDL - 配置和使用SDF DSL&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF电台！/ ANONRADIO服务&amp;quot;&amp;gt;8. SDF电台！/ ANONRADIO服务 ===&lt;br /&gt;
&lt;br /&gt;
* 如何收听ANONRADIO&lt;br /&gt;
* 如何在ANONRADIO上成为DJ&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;SDF VPS服务&amp;quot;&amp;gt;9. SDF VPS服务（适用于MetaARPA成员） ===&lt;br /&gt;
&lt;br /&gt;
* NetBSD的设置和配置&lt;br /&gt;
* 安装一个OpenLDAP服务器&lt;br /&gt;
* Debian的设置和配置&lt;br /&gt;
* Ubuntu的设置和配置（WIP）&lt;br /&gt;
* Plan9的设置和配置&lt;br /&gt;
* CentOS的设置和配置&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span id=&amp;quot;Cheat Sheets (文本编辑器）&amp;quot;&amp;gt;10. 小贴士  ===&lt;br /&gt;
&lt;br /&gt;
* 适用于Vi、awk、sed等的小贴士&lt;br /&gt;
* Emacs小贴士&lt;br /&gt;
* ed小贴士&lt;br /&gt;
* Pico小贴士&lt;br /&gt;
* 生存下来的TECO&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;Dotfile（配置文件）资料库&amp;quot;&amp;gt;11. Dotfile（配置文件）资料库 ===&lt;br /&gt;
&lt;br /&gt;
* 浏览含有注解的Dotfiles - 寻找工作示例，帮助你配置你最喜欢的程序。&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;twenex.org - SDF公共访问 TWENEX 操作系统&amp;quot;&amp;gt;12. twenex.org - SDF公共访问 TWENEX 操作系统 ===&lt;br /&gt;
&lt;br /&gt;
* TOPS-20互动教程 - twenex.org的互动教程（@TOPS20）的日志和摘要&lt;br /&gt;
* 进入TWENEX - 为中级用户提供的twenex.org系统之旅&lt;br /&gt;
* 在TWENEX上使用多个互动程序 - 关于如何在同一登录中使用多个程序的教程&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;在线隐私&amp;quot;&amp;gt;13. 在线隐私 ===&lt;br /&gt;
&lt;br /&gt;
* 隐私保护&lt;br /&gt;
* SDF的隐私政策&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;复古计算&amp;quot;&amp;gt;14. 复古计算 ===&lt;br /&gt;
&lt;br /&gt;
* 歇斯底里的Unix指南 - 庆祝UNIX操作系统50周年&lt;br /&gt;
* CDC 6500生存指南&lt;br /&gt;
* 基本程序&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;span id=&amp;quot;贝尔实验室的Plan 9项目&amp;quot;&amp;gt;15. 贝尔实验室的Plan 9项目 ===&lt;br /&gt;
&#039;&#039;&#039;贝尔实验室的Plan 9&#039;&#039;&#039;是一个研究性的操作系统，被设计为超越Unix的操作系统进化的下一步。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SDF&#039;&#039;&#039;赞助了一系列的训练营来介绍新用户使用&#039;&#039;&#039;Plan 9&#039;&#039;&#039;。本节教程收集了营员们的发现。&lt;br /&gt;
&lt;br /&gt;
* 为SDF VPS基本单位进行Plan9设置和配置&lt;br /&gt;
* Plan 9 C语言编程&lt;br /&gt;
* Plan 9 Rc 生存指南&lt;br /&gt;
* (在此添加你的Plan 9教程的链接)&lt;br /&gt;
&lt;br /&gt;
注释：&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
----&amp;lt;small&amp;gt;&#039;&#039;$Id: index.html,v 1.195 2025/03/05 00:30:45 peteyboy Exp $&#039;&#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gao66</name></author>
	</entry>
</feed>