[
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Posix "
                    }
                ]
            },
            "bbox": [
                147,
                93,
                196,
                107
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "GNU "
                    }
                ]
            },
            "bbox": [
                147,
                112,
                189,
                124
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Makefile "
                    }
                ]
            },
            "bbox": [
                147,
                131,
                221,
                143
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Cmake "
                    }
                ]
            },
            "bbox": [
                147,
                149,
                208,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Bash "
                    }
                ]
            },
            "bbox": [
                147,
                168,
                191,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Shell "
                    }
                ]
            },
            "bbox": [
                147,
                186,
                191,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Powershell "
                    }
                ]
            },
            "bbox": [
                147,
                204,
                242,
                218
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "BSD "
                    }
                ]
            },
            "bbox": [
                147,
                223,
                184,
                236
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux包括内核、系统调用、应用程序"
                    }
                ]
            },
            "bbox": [
                147,
                241,
                445,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "GNU GPL V2V3 "
                    }
                ]
            },
            "bbox": [
                147,
                260,
                273,
                274
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "开源软件"
                    }
                ]
            },
            "bbox": [
                147,
                279,
                221,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Tty 终端设备"
                    }
                ]
            },
            "bbox": [
                147,
                297,
                250,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Pty 虚拟设备"
                    }
                ]
            },
            "bbox": [
                147,
                316,
                250,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Pts ptm "
                    }
                ]
            },
            "bbox": [
                147,
                335,
                215,
                350
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 接口"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                233,
                367
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "终端用户 GUI/TUICLI "
                    }
                ]
            },
            "bbox": [
                147,
                370,
                319,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "程序员 system call"
                    }
                ]
            },
            "bbox": [
                147,
                388,
                297,
                406
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Linux——操作系统介绍"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                448,
                440,
                470
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/0a519fcf88d6f52f0584df04cc94bdd1a7e1488dd602bd171a23f240a56d0d59.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                512,
                401,
                659
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "历史背景"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                684,
                258,
                707
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "贝尔实验室开发 Multics （multiplexed information and compuing service）系统，但失败"
                    }
                ]
            },
            "bbox": [
                144,
                751,
                801,
                766
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Ken Thompson（C 语言之父）利用汇编语言开发了 File Server System（Unics，即 UNIX 的原型）；"
                    }
                ]
            },
            "bbox": [
                144,
                769,
                848,
                803
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "发明了 C 语言，而后写出了 UNIX 的内核；"
                    }
                ]
            },
            "bbox": [
                146,
                806,
                450,
                821
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Dennis Rirchie和Ken Thompson发明了C语言，而后贝尔实验室开发了他们自己的一个操作系统UNIX 。"
                    }
                ]
            },
            "bbox": [
                144,
                837,
                838,
                869
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Bill Joy 修改了 UNIX 源码称为，BSD"
                    }
                ]
            },
            "bbox": [
                146,
                885,
                411,
                900
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "UNIX 最初免费发布并因此在大学里受到欢迎。后来，UNIX 实现了 TCP/IP 协议栈。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                734,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "UNIX 开始变得商业化，它的价格也变得非常昂贵。而唯一低廉的选择就是 MINIX，这是一个功能有限的类似 UNIX 的操作系统。"
                    }
                ]
            },
            "bbox": [
                144,
                123,
                833,
                155
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "计划开发一个比 MINIX 性能更好的操作系统，即LInux。于是开发出了Linux。"
                    }
                ]
            },
            "bbox": [
                144,
                172,
                692,
                186
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 是类 Unix 系统（POSIX）"
                    }
                ]
            },
            "bbox": [
                144,
                202,
                366,
                215
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "包含："
                    }
                ]
            },
            "bbox": [
                146,
                231,
                191,
                244
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户级接口 各种管理器"
                    }
                ]
            },
            "bbox": [
                146,
                262,
                315,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "程序员级接口 系统调用"
                    }
                ]
            },
            "bbox": [
                146,
                292,
                315,
                305
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "适用于多种硬件平台、分布式系统和嵌入式系统的应用"
                    }
                ]
            },
            "bbox": [
                144,
                322,
                534,
                335
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux的内核结构是模块结构，可以动态加载，适于嵌入式系统"
                    }
                ]
            },
            "bbox": [
                144,
                351,
                591,
                365
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Kernel.org "
                    }
                ]
            },
            "bbox": [
                146,
                382,
                226,
                395
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "内核版本 双树系统（稳定树、开发树）"
                    }
                ]
            },
            "bbox": [
                146,
                412,
                415,
                425
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "x.y.z y-偶数-稳定树 y-奇数-开发树"
                    }
                ]
            },
            "bbox": [
                144,
                442,
                389,
                456
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux不是一个完整的操作系统"
                    }
                ]
            },
            "bbox": [
                146,
                472,
                369,
                485
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "负责控制硬件设备、文件系统、进程调度等"
                    }
                ]
            },
            "bbox": [
                146,
                502,
                453,
                514
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不包括应用程序如编辑器/多媒体/网络"
                    }
                ]
            },
            "bbox": [
                146,
                532,
                415,
                545
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux的发行版是完整的操作系统"
                    }
                ]
            },
            "bbox": [
                146,
                562,
                384,
                575
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "DistroWatch.com: Put the fun back into computing. Use Linux, BSD. "
                    }
                ]
            },
            "bbox": [
                144,
                592,
                630,
                605
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如 Ubuntu"
                    }
                ]
            },
            "bbox": [
                146,
                623,
                221,
                634
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "GNU（GNU’S NOT UNIX）项目："
                    }
                ]
            },
            "bbox": [
                144,
                712,
                386,
                725
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "产品：GCC、Emacs、Bash Shell、GLIBC；"
                    }
                ]
            },
            "bbox": [
                144,
                741,
                462,
                753
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "倡导 自由软件 ；“ ” GNU 的软件缺乏一个开放的平台运行，只能在 UNIX 上运行；"
                    }
                ]
            },
            "bbox": [
                144,
                770,
                702,
                784
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "自由软件指用户可以对软件做任何修改，甚至再发行，但是始终要挂着 GPL (GENERAL PUBLIC"
                    }
                ]
            },
            "bbox": [
                144,
                800,
                830,
                814
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LINCENSE)的版权；自由软件是可以卖的，但是不能只卖软件，而是卖服务、手册等；"
                    }
                ]
            },
            "bbox": [
                144,
                819,
                754,
                833
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "GNU开发一个完全的类Unix操作系统"
                    }
                ]
            },
            "bbox": [
                144,
                850,
                418,
                863
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "GNU 的内核是 Linux，GNU/Linux"
                    }
                ]
            },
            "bbox": [
                146,
                879,
                389,
                892
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "自由软件 Free Sofrware"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                319,
                107
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "基金会FSF"
                    }
                ]
            },
            "bbox": [
                147,
                124,
                233,
                137
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "自由和免费"
                    }
                ]
            },
            "bbox": [
                147,
                154,
                230,
                167
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "自由软件关乎权利，≠免费软件"
                    }
                ]
            },
            "bbox": [
                147,
                184,
                374,
                197
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "自由软件可以是商业化软件"
                    }
                ]
            },
            "bbox": [
                147,
                214,
                342,
                227
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "为了避免 GNU 开发的自由软件被其它人用作专利软件，因此创建 GPL（general public lincense）版权声明"
                    }
                ]
            },
            "bbox": [
                146,
                243,
                826,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "开源软件 Open Source Software"
                    }
                ]
            },
            "bbox": [
                147,
                292,
                379,
                305
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "是一种软件开发方法"
                    }
                ]
            },
            "bbox": [
                147,
                322,
                295,
                335
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "完全开放源代码、接受各种测试 "
                    }
                ]
            },
            "bbox": [
                147,
                351,
                374,
                365
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux也是开源软件"
                    }
                ]
            },
            "bbox": [
                147,
                382,
                287,
                395
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "MIT 开发了 GUI,成立了研发 Xfree86"
                    }
                ]
            },
            "bbox": [
                147,
                412,
                406,
                425
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 本身只是操作系统的内核。内核是使其它程序能够运行的基础。它实现了多任务和硬件管理，用户或者系统管理员交互运行的所有程序实际上都运行在内核之上。"
                    }
                ]
            },
            "bbox": [
                146,
                441,
                836,
                473
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/4ba8e4415c6e24e415d18508714a7954f70ddb5016e33c13e4acc25ace803787.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                146,
                516,
                381,
                776
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Unix 哲学强调构建简单、紧凑、清晰、模块化且可扩展的代码，便于开发者（非原始创建者）维护和复用。该哲学推崇可组合性，而非整体式设计。"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                823,
                853
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "虚拟机软件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                99,
                285,
                122
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "虚拟机软件"
                    }
                ]
            },
            "bbox": [
                146,
                166,
                240,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Virtual Machine "
                    }
                ]
            },
            "bbox": [
                144,
                184,
                282,
                198
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。virtual box：是开源的轻量级虚拟机平台。完整安装包很小，功能相对也很精简。不能通过文件拖拽的方式文件共享，而是通过“映射网络驱动器”的方式与主机通过共享文件夹共享文件。"
                    }
                ]
            },
            "bbox": [
                144,
                202,
                847,
                273
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "virtual PC适合做Windows虚拟机。作为微软自已的产品，在Windows平台下使用非常方便，占用内存小，启动快，联网方面。无需桥接、NAT等，直接作为同一子网的一台普通计算机使用，无需任何网络设置即可上网。"
                    }
                ]
            },
            "bbox": [
                144,
                277,
                847,
                330
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "VMWare软件兼容性好，快照功能很快捷方便，适合调试极易产生蓝屏的软件和工具。可以 虚 拟 两 块 甚 至 更 多 网 卡 ， 使 用 桥 接 Bridge 或 者 NAT 方 式 访 问 网 络 。"
                    }
                ]
            },
            "bbox": [
                144,
                332,
                847,
                367
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/f73e58b67db2b3b16663459f8f1330b3de9638cd30fe88f57765ea265078db41.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                369,
                826,
                655
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/c4cc693edd1733f45c9c7957013d135b333ada1b5e084a985479b579076f4ff2.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                89,
                455,
                300
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/ea4990f4ce5ddbc5bcc3e3f8b30815683e141672e48a936e6cf71d0e078cd762.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                467,
                108,
                778,
                300
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·虚拟机名称自己输入。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·虚拟机位置一般选择在空间比较大的数据磁盘分区中，如D盘、E盘。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                149,
                306,
                438,
                344
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·安装Cent0S7的磁盘建议不小于10GB，用于学习RAID的数据盘可以设置为5GB。·虚拟磁盘拆分成多个文件适合在不支持单个文件大于4GB的文件系统中需要使用。"
                    }
                ]
            },
            "bbox": [
                468,
                306,
                759,
                351
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "创建一台新虚拟机"
                    }
                ],
                "level": 1
            },
            "bbox": [
                188,
                376,
                552,
                410
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "新建虚拟机向导"
                    }
                ]
            },
            "bbox": [
                169,
                434,
                238,
                445
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "已准备好创建虚拟机"
                    }
                ]
            },
            "bbox": [
                188,
                451,
                275,
                461
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "单击完成创建虚拟机，然后开始安装CentOS764位。"
                    }
                ]
            },
            "bbox": [
                208,
                462,
                428,
                470
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将使用下列设置创建虚拟机："
                    }
                ]
            },
            "bbox": [
                183,
                482,
                292,
                492
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "名称： CentOs764bit"
                    }
                ]
            },
            "bbox": [
                188,
                498,
                337,
                506
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "位置： C:\\VM\\CentOS71"
                    }
                ]
            },
            "bbox": [
                188,
                507,
                342,
                514
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "版本 Workstation14.x"
                    }
                ]
            },
            "bbox": [
                188,
                516,
                344,
                525
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "操作系统： CentOS764位"
                    }
                ]
            },
            "bbox": [
                188,
                526,
                339,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬盘： 20GB，拆分"
                    }
                ]
            },
            "bbox": [
                188,
                545,
                321,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "内存： 1024MB"
                    }
                ]
            },
            "bbox": [
                188,
                554,
                309,
                562
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "网络适配器： NAT"
                    }
                ]
            },
            "bbox": [
                188,
                563,
                292,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "其他设备： CD/DVD，USB控制器，打印机，声卡"
                    }
                ]
            },
            "bbox": [
                188,
                573,
                411,
                582
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "自定义硬件（C）.."
                    }
                ]
            },
            "bbox": [
                210,
                592,
                278,
                602
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建后开启此虚拟机（P）"
                    }
                ]
            },
            "bbox": [
                183,
                609,
                287,
                620
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                326,
                640,
                381,
                651
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "完成"
                    }
                ]
            },
            "bbox": [
                413,
                642,
                433,
                650
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "取消 "
                    }
                ]
            },
            "bbox": [
                482,
                642,
                502,
                650
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·虚拟机的主要配置"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·通过自定义硬件修改配置 "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                556,
                442,
                747,
                488
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·内存：调整大小 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·处理器：调整数量"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·网络：调整连接模式"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·其他：不需要的可以移除"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                591,
                500,
                784,
                583
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "自定义硬件—－内存"
                    }
                ],
                "level": 1
            },
            "bbox": [
                181,
                98,
                482,
                124
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/8069ea3ae0b512643d7f2276a2f0d0f8ceca2e70f4006177ae96ecc8742a1945.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                157,
                141,
                463,
                321
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·虚拟机配置的内存就是实际用的内存容量"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·根据原始硬件系统配置调整 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·建议不少于2GB，1GB也可"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                485,
                166,
                650,
                235
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "自定义硬件一一处理器"
                    }
                ],
                "level": 1
            },
            "bbox": [
                171,
                348,
                544,
                374
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/2b779ef161074c865f8e2ed7398957de48ce9094eaf3f719362bbf9656dac5c8.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                149,
                393,
                480,
                588
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·根据硬件配置设置 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·1CPU/2内核 "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                510,
                419,
                631,
                458
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "自定义硬件--网络适配器"
                    }
                ],
                "level": 1
            },
            "bbox": [
                213,
                596,
                618,
                623
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/11d7bede9b31bc91bcc38142f288822937f97c645c7420d08968c4674ca9235c.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                193,
                640,
                494,
                820
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·勾选启动时连接 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·网络连接选择桥接模式或者NAT模式"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                512,
                664,
                714,
                699
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "安装目标和分区设置"
                    }
                ],
                "level": 1
            },
            "bbox": [
                201,
                105,
                594,
                139
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/7f9b484fb10b23e2e20dad376e7d31bdad2f2073307c4b0f1575b8d731bd9739.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                169,
                148,
                494,
                363
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·有黄色和红色提示的是需要进一步设置的"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·图中所示是安装目标和分区的设置 "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                176,
                368,
                470,
                401
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/5785f2c2b607682942e966e6aca69c2db4ce66d157148815f7a5f102b704472c.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                512,
                148,
                838,
                363
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·有自动分区和用户自定义分区两种 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·选择lwillconfigurepartitioning "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                519,
                368,
                791,
                401
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "设置分区模式和挂载点"
                    }
                ],
                "level": 1
            },
            "bbox": [
                189,
                432,
                460,
                455
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/3b717c769939e6009352a104a9d7bf7867b6e1d7dda5f54a1b99df9a7a1398d2.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                161,
                466,
                438,
                649
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·默认选择LVM分区模式"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·我们先选择使用标准分区模式（standard）"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                168,
                653,
                426,
                681
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/f4bd8a76f3cfd2f92e8effc08d10f06220963094dd3727d0c4981cd127436091.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                455,
                466,
                732,
                649
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·点击“+”按钮新建挂载点（mountpoint）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·这就是在进行分区设置了"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                460,
                653,
                719,
                681
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "设置分区和文件系统"
                    }
                ],
                "level": 1
            },
            "bbox": [
                196,
                99,
                450,
                123
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/8f3893e7a5be3ef3617b0bec0b424b7e6ac96d616fa2ed03a555a35ff968e38a.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                168,
                135,
                453,
                325
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·设置挂载点mountpoint "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·设置分区大小capacity "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·容量空着不填写就是分配剩余所有容量"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                173,
                331,
                420,
                374
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/236e87da7b7e73df5e7a6020b65b66f74f3b4c19f911ab59296cf457b1031d13.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                472,
                135,
                759,
                325
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·至少设置两个分区：swap（交换）和/（根）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·Swap大小与内存容量相近 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·根分区选择ext4文件系统"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                475,
                331,
                729,
                374
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                715,
                379,
                729,
                386
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "分区设置方案确认"
                    }
                ],
                "level": 1
            },
            "bbox": [
                184,
                397,
                450,
                422
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/df6ee3b9d3442f4acc21317bbaa6053dfc77f16e34d74a23afd258d948c91905.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                176,
                437,
                443,
                608
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·如果有多块磁盘，可以考虑把用户/home挂载点划分到单独磁盘上"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·还可以把启动/boot单独划分分区"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·左图所示是两个分区：/和swap "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                467,
                442,
                657,
                510
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "选择服务器软件包"
                    }
                ],
                "level": 1
            },
            "bbox": [
                166,
                98,
                442,
                123
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/67d9e31c0e75f77def79da7570d39c90036ed63b441c8d303ddfa3d771d66aed.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                130,
                400,
                303
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·生产用服务器可以考虑Minimal Install"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·学习建议选用带有桌面管理器的环境"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·ServerwithGUI或者GNOMEDesktop "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                147,
                305,
                374,
                344
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/a3ee5eed4e61893192dfa00f0e8723cb49591a62d6147d5298c530788d80d12d.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                415,
                130,
                670,
                300
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·进行软件包依赖检查"
                    }
                ]
            },
            "bbox": [
                418,
                305,
                539,
                317
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "checking software dependencies "
                    }
                ]
            },
            "bbox": [
                445,
                319,
                613,
                330
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "29 "
                    }
                ]
            },
            "bbox": [
                630,
                348,
                643,
                356
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "配置网络和主机名"
                    }
                ],
                "level": 1
            },
            "bbox": [
                159,
                368,
                413,
                392
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/101094ec5cc8493113345e2da45eddba4ee1ace1d7f2ffa4a1a0a599661b56a1.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                399,
                621,
                588
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "三种网络模式"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                594,
                258,
                608
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "·桥接模式（Bridged）"
                    }
                ],
                "level": 1
            },
            "bbox": [
                157,
                623,
                354,
                639
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "桥接模式就是将主机网卡与虚拟机虚拟的网卡利用虚拟网桥进行通信。在桥接的作用下，类似于把物理主机虚拟为一个交换机，所有桥接设置的虚拟机连接到这个交换机的一个接口上，物理主机也同样插在这个交换机当中。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "桥接模式使用vMneto。虚拟机和主机就如同插在同一台交换机上的两台主机。如果路由器开启了DHCP服务，主机和虚拟机能够自动获得IP地址。否则，需要仿照主机网卡手动配置，设置一个同网段的不同的IP地址即可。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                184,
                640,
                610,
                781
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在桥接模式，虚拟机ip地址需要与主机在同一个网段，如果需要联网，则网关与DNS需要与主机网卡一致。"
                    }
                ]
            },
            "bbox": [
                157,
                96,
                601,
                118
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/de9ec9cd1e50b12c0a553fa434bf4e1ee55c7bee6c31e88e4b3abc1c9ba8a3ea.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                196,
                126,
                615,
                319
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/1f2c577c5aa91380b64876a271b2c053b5ea35ae85b1c2c3e90beb8c06b21a76.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                338,
                668,
                495
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/e337bbb71dfd19e3dc71aa3e7d76e8f6b5c2806922c8b6df2a4fde7c058bc53a.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                502,
                697,
                869
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/55ec8f2eca97a65c1771438437ed4fc3361d14f90f6db50c383a95ca1fee9be6.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                87,
                482,
                340
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "网络地址转换模式（NAT）"
                    }
                ]
            },
            "bbox": [
                146,
                351,
                349,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "桥接模式配置简单，但如果网络环境是ip资源很缺少或对ip管理比较严格的话，那桥接模式就不适用了。要使用vmware的NAT模式。"
                    }
                ]
            },
            "bbox": [
                144,
                370,
                848,
                405
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/2bccc9986ca379d3208f97794ae09243b20745bfbedd3fad74155a86656b5b7f.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                152,
                407,
                744,
                659
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在NAT模式中，主机网卡直接与虚拟 NAT设备相连，然后虚拟 NAT设备与虚拟DHCP服务器一起连接在虚拟交换机VMnet8上，这样就实现了虚拟机联网。"
                    }
                ]
            },
            "bbox": [
                144,
                667,
                848,
                702
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "VMware Network Adapter VMnet8 虚拟网卡主要是为了实现主机与虚拟机之间的通信。"
                    }
                ]
            },
            "bbox": [
                144,
                705,
                831,
                721
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置虚拟机中NAT模式的选项"
                    }
                ]
            },
            "bbox": [
                146,
                722,
                386,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "打开 vmware，点击“编辑”下的“虚拟网络编辑器”"
                    }
                ]
            },
            "bbox": [
                144,
                741,
                564,
                758
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置NAT参数及DHCP参数。"
                    }
                ]
            },
            "bbox": [
                146,
                760,
                376,
                775
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/2b9a00a77deed2856f72a54693e08d84ec9127d250fc43d94cbe4f0fa258673d.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                90,
                668,
                444
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/1094e136a3f1b7d356e21e396b3a9bd9369e0aeec7e3b7d7996c2e856fcf6819.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                444,
                608,
                709
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/a6e05baaae21f007356b392d8cd5002e26b342bae4266c45f3979b615f171865.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                89,
                541,
                329
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/ad0b83e95b6f4d0489dd7e3cd05e80a3101300f2f738c48865a255ec2f3271c1.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                329,
                487,
                535
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "学习工具"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                560,
                258,
                582
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在线查看Linux内核代码"
                    }
                ]
            },
            "bbox": [
                144,
                625,
                344,
                640
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "http://https://elixir.bootlin.com/linux/latest/source "
                    }
                ]
            },
            "bbox": [
                146,
                644,
                566,
                659
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "http://lxr.linux.no "
                    }
                ]
            },
            "bbox": [
                147,
                663,
                292,
                678
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "下载某版本内核源码文件"
                    }
                ]
            },
            "bbox": [
                147,
                681,
                344,
                697
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Kernel.org "
                    }
                ]
            },
            "bbox": [
                147,
                700,
                238,
                715
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "解压缩到本地文件系统目录"
                    }
                ]
            },
            "bbox": [
                147,
                718,
                361,
                734
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用工具阅读源码"
                    }
                ]
            },
            "bbox": [
                147,
                737,
                292,
                753
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Source insight "
                    }
                ]
            },
            "bbox": [
                147,
                756,
                268,
                771
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Vim+ctags "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                782,
                273,
                802
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 vim 中安装插件 ctags 后，就可以在终端方便地使用 vim 命令查看 Linux 源码内容了。"
                    }
                ]
            },
            "bbox": [
                144,
                810,
                828,
                827
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "安装 ctags 插件"
                    }
                ]
            },
            "bbox": [
                147,
                829,
                273,
                846
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "方法一：ctags 源码安装"
                    }
                ]
            },
            "bbox": [
                147,
                848,
                339,
                864
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "方法二：安装工具 apt-get、yum、pacman 等"
                    }
                ]
            },
            "bbox": [
                147,
                866,
                515,
                883
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "修改vim配置文件"
                    }
                ]
            },
            "bbox": [
                147,
                885,
                292,
                901
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编辑 vim 配置文件 sudo vim /etc/vim/vimrc"
                    }
                ]
            },
            "bbox": [
                146,
                93,
                497,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "添加如下内容："
                    }
                ]
            },
            "bbox": [
                146,
                112,
                265,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "set tags=/home/stu01/src/linux-4.12/tags "
                    }
                ]
            },
            "bbox": [
                146,
                130,
                497,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "set autochdir "
                    }
                ]
            },
            "bbox": [
                146,
                149,
                265,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "利用 ctags 文件查看 Linux 源码信息"
                    }
                ]
            },
            "bbox": [
                146,
                167,
                431,
                181
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "源码安装ctags "
                    }
                ],
                "level": 1
            },
            "bbox": [
                193,
                193,
                326,
                211
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·下载源码 "
                    }
                ]
            },
            "bbox": [
                193,
                216,
                260,
                228
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "http://prddownloads.sourceforge.net/ctags-5.8.tar.gz  \nhttp://ctags.sourceforge.net/ "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                211,
                229,
                462,
                250
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·编译安装"
                    }
                ]
            },
            "bbox": [
                193,
                252,
                260,
                263
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "./configure "
                    }
                ]
            },
            "bbox": [
                210,
                265,
                265,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "make "
                    }
                ]
            },
            "bbox": [
                211,
                277,
                240,
                285
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "sudo make install "
                    }
                ]
            },
            "bbox": [
                211,
                286,
                295,
                294
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/bbbfc857a4773f70bf9965b2b61aff339af564b9c87abf928cd695b61ab720c7.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                297,
                267,
                510,
                317
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·生成索引 "
                    }
                ]
            },
            "bbox": [
                193,
                309,
                258,
                319
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- sudo ctags -R * //在Linux源码目录中执行"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                210,
                321,
                433,
                331
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·-R表示递归创建*表示所有文件"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·命令执行后生成一个tags目录"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                210,
                321,
                433,
                353
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "利用ctags文件查看Linux源码信息"
                    }
                ],
                "level": 1
            },
            "bbox": [
                161,
                372,
                453,
                390
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "· vim -t effective_prio "
                    }
                ]
            },
            "bbox": [
                161,
                403,
                319,
                416
            ]
        },
        {
            "type": "algorithm",
            "content": {
                "algorithm_caption": [],
                "algorithm_content": [
                    {
                        "type": "text",
                        "content": "static int effective_prio(struct task_struct \\*p)   \n{ p->normal_prio  "
                    },
                    {
                        "type": "equation_inline",
                        "content": "="
                    },
                    {
                        "type": "text",
                        "content": " normal_prio(p); /\\* If we are RT tasks or we were boosted to RT priority, \\* keep the priority unchanged. otherwise, update priority \\* to the normal priority: /\\* if (!rt_prio(p->prio)) return p->normal_prio; return p->prio; "
                    }
                ]
            },
            "bbox": [
                151,
                419,
                515,
                510
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-t之后是要显示的tag，包括变量名、数据结构名和函数名等。"
                    }
                ]
            },
            "bbox": [
                159,
                514,
                497,
                541
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Ctrl+] "
                    }
                ]
            },
            "bbox": [
                146,
                557,
                196,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当光标处于要查看的变量名、数据结构名、函数名处时，Ctrl+]可以跳转到相应的定义处"
                    }
                ]
            },
            "bbox": [
                146,
                574,
                830,
                589
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Ctrl+T "
                    }
                ]
            },
            "bbox": [
                147,
                593,
                201,
                606
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "返回前一次的位置处"
                    }
                ]
            },
            "bbox": [
                146,
                612,
                310,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ta "
                    }
                ]
            },
            "bbox": [
                146,
                633,
                166,
                643
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在命令模式下使用，可以显示变量等的定义"
                    }
                ]
            },
            "bbox": [
                146,
                649,
                485,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":ta normal_prio // 显示 normal_prio()的源码"
                    }
                ]
            },
            "bbox": [
                146,
                668,
                515,
                684
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "其他用法"
                    }
                ]
            },
            "bbox": [
                146,
                686,
                221,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "man ctags "
                    }
                ]
            },
            "bbox": [
                146,
                706,
                240,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Vim 中 help ctags"
                    }
                ]
            },
            "bbox": [
                146,
                724,
                292,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux中的软件发布"
                    }
                ]
            },
            "bbox": [
                146,
                760,
                304,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "二进制包"
                    }
                ]
            },
            "bbox": [
                147,
                778,
                221,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "rmp "
                    }
                ]
            },
            "bbox": [
                147,
                799,
                186,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "deb "
                    }
                ]
            },
            "bbox": [
                147,
                816,
                181,
                829
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "源码包 "
                    }
                ]
            },
            "bbox": [
                147,
                835,
                203,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tar "
                    }
                ]
            },
            "bbox": [
                147,
                854,
                174,
                866
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                147,
                873,
                194,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                147,
                892,
                174,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "rar "
                    }
                ]
            },
            "bbox": [
                147,
                96,
                174,
                105
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Rpm包 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                164,
                121,
                255,
                147
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·红帽包管理工具 (Red hat Package Manager)"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·安装"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                164,
                172,
                621,
                212
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": " rpm -ivh /home/user01/zsh-5.0.2-  31. e17. x86_64. rpm "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·RPM安装常用选项："
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                164,
                217,
                510,
                268
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-i:安装（Install）软件。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-U：升级（Upgrade）旧版本的软件。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-e:移除/删除 (Erase）软件。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "- v：显示详细的处理信息。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-h：显示安装进度。卸载不能用"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                188,
                272,
                497,
                368
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "如何查看安装的shell: "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "#cat /etc/shells "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "/bin/sh "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "/bin/bash "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "/usr/bin/sh "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "/usr/bin/bash "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "/bin/zsh "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                527,
                244,
                670,
                329
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·rpm-q 查询 "
                    }
                ]
            },
            "bbox": [
                166,
                404,
                285,
                420
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " rpm -q zsh "
                    }
                ]
            },
            "bbox": [
                189,
                423,
                273,
                434
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·常与下面参数组合使用"
                    }
                ]
            },
            "bbox": [
                188,
                436,
                369,
                450
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/02935e6da91fd2430156cca09e174fb52de43a966b64123620258b5da6976839.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                164,
                495,
                174,
                502
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-a 查询所有已经安装的软件包"
                    }
                ]
            },
            "bbox": [
                198,
                458,
                369,
                469
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-f查询文件所属哪个软件包，反向查询"
                    }
                ]
            },
            "bbox": [
                205,
                470,
                408,
                480
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-i显示已经安装的rpm软件包信息，后面直接跟包名"
                    }
                ]
            },
            "bbox": [
                203,
                481,
                478,
                489
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-|查询软件包中，文件安装的位置"
                    }
                ]
            },
            "bbox": [
                203,
                491,
                379,
                501
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-p 查询未安装软件包的相关信息,后面要跟软件的命名"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-R查询软件包的依赖性"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                164,
                495,
                495,
                521
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "rpm -qa」grep vi#不需要后缀 "
                    }
                ]
            },
            "bbox": [
                194,
                531,
                384,
                542
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": " rpm -qf /usr/sbin/ifconfig #查询ifconfig属于哪个安装包（配合 which) "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·卸载包 "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                164,
                545,
                581,
                585
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "rpm -e "
                    }
                ]
            },
            "bbox": [
                194,
                589,
                236,
                600
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "dhcp "
                    }
                ]
            },
            "bbox": [
                245,
                589,
                273,
                600
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#卸载包 (包名) "
                    }
                ]
            },
            "bbox": [
                287,
                589,
                376,
                600
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Deb包 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                171,
                653,
                326,
                696
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·Debian-based系统的安装包(.exe) "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·一般是软件源repository中安装"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·有时需要下载deb包手动安装"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                171,
                730,
                766,
                878
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/446ab45bba3405b4aea38f4da2662685aaa7b1cec87e36c6bf7c6963c4bda1f9.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                559,
                386,
                574,
                397
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                576,
                388,
                594,
                395
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Deb包 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                164,
                105,
                260,
                134
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "dpkg工具安装"
                    }
                ],
                "level": 1
            },
            "bbox": [
                164,
                149,
                321,
                172
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "安装：sudo dpkg -i deb文件名 sudo dpkg --install deb文件名  \ndo dpkg -i /home/user01/teamviewer_14.5.1691_amd64.def"
                    }
                ],
                "code_language": "batch"
            },
            "bbox": [
                193,
                181,
                665,
                244
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- 查看安装的应用：sudo dpkg -1 "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                193,
                258,
                500,
                277
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- 卸载：sudo dpkg -r 软件包 sudo dpkg -p 软件包"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                194,
                285,
                536,
                332
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "apt/apt-get工具安装"
                    }
                ],
                "level": 1
            },
            "bbox": [
                168,
                382,
                418,
                404
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- 安装：sudo apt install 软件名 sudo apt --fix-broken install"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                198,
                413,
                663,
                462
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "软件名"
                    }
                ]
            },
            "bbox": [
                198,
                468,
                265,
                488
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "GUI下可以直接双击deb文件开始安装"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                317,
                497,
                652,
                517
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- 卸载：sudo apt autoremove #卸载无用的依赖 sudo apt remove 软件名 #软件包"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                200,
                527,
                663,
                575
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "配置yum软件源"
                    }
                ],
                "level": 1
            },
            "bbox": [
                164,
                602,
                391,
                631
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- yum (yellowdog updater modified) "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                164,
                653,
                524,
                673
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- vim /etc/yum repos.d/Local(repo #新建源 "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                166,
                676,
                613,
                695
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "·yum clean all #清理缓存 "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                166,
                697,
                453,
                715
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- yum -y install dhclient "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                166,
                720,
                440,
                738
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "源码安装"
                    }
                ],
                "level": 1
            },
            "bbox": [
                179,
                105,
                346,
                140
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·./configure #也可能是其他"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "· make  #编译 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·make install #安装"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "· make clean #清理"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                181,
                167,
                532,
                266
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "终端 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                337,
                206,
                359
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "UNIX/Linux 本身是没有图形界面的，我们通常在 UNIX/Linux 发行版上看到的图形界面实际都只是运行在 Linux 系统之上的一套软件，"
                    }
                ]
            },
            "bbox": [
                144,
                403,
                847,
                437
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "而 Linux 上的这套软件以前是 XFree86，现在则是 xorg（X.Org），而这套软件又是通过X 窗口系统（X Window System，也常被称为 X11 或 X）实现的，X 本身只是工具包及架构协议，而 xorg 便是 X 架构规范的一个实现体，也就是说它是实现了 X 协议规范的一个提供图形界面服务的服务器，就像实现了 http 协议提供 web 服务的 Apache 。如果只有服务器也是不能实现一个完整的桌面环境的，当然还需要一个客户端，我们称为 XClient，像如下 几个 大家 熟 知也 最流行 的 实 现 了 客户 端 功 能 的 桌 面 环 境 KDE，GNOME，XFCE，LXDE 。"
                    }
                ]
            },
            "bbox": [
                144,
                439,
                848,
                568
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/d1c681e1fe1a10011942116f6d5ef4328214297d2c7d5aebf7c8f6e3cd4ce017.jpg"
                },
                "image_caption": [
                    {
                        "type": "text",
                        "content": "Linux/UNIX内核的XWindow图形架构"
                    }
                ],
                "image_footnote": []
            },
            "bbox": [
                179,
                583,
                779,
                826
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/1a26caf02e0a3644f55cd108f01f997a7845e4fa7b6e30f255e3b6b7ee2999f6.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                862,
                631,
                1000,
                822
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "终端 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                101,
                200,
                120
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们并不是直接利用操作系统，而是利用shell的中间程序来完成。在图形界面下为了实现让我们在一个窗口中完成用户输入和显示输出。"
                    }
                ]
            },
            "bbox": [
                144,
                161,
                847,
                195
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 系统还提供了一个叫做终端模拟器的程序（Terminal）。 下面是几个比较常见的终端模拟器：gnome-terminal，Konsole，xterm，rxvt，kvt，nxterm 和 eterm 。"
                    }
                ]
            },
            "bbox": [
                146,
                209,
                845,
                243
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不过要注意的是这里所说的终端（Terminal）和控制台（Console）是有区别的。"
                    }
                ]
            },
            "bbox": [
                146,
                256,
                712,
                272
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Tty 终端设备的统称 teletypewriters 电传打字机"
                    }
                ]
            },
            "bbox": [
                144,
                288,
                527,
                304
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "现在叫终端（terminal）"
                    }
                ]
            },
            "bbox": [
                146,
                306,
                334,
                321
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "终端是一种字符型设备"
                    }
                ]
            },
            "bbox": [
                146,
                325,
                329,
                340
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Tty1-tty6 表示文字界面，可以用 alt+ctrl+F1~F6 切换，F7 是返回图形界面"
                    }
                ]
            },
            "bbox": [
                144,
                343,
                727,
                359
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Pty 虚拟终端 "
                    }
                ]
            },
            "bbox": [
                146,
                362,
                253,
                378
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "远程 telnet 连接 到主 机或 使 用 xterm 时，需要 一 个 终 端 交 互 ， 这 就 是 虚 拟 终 端pty（pseudo-tty）"
                    }
                ]
            },
            "bbox": [
                144,
                380,
                847,
                416
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Pts/ptmx "
                    }
                ]
            },
            "bbox": [
                146,
                418,
                228,
                432
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "终端本质上是对应着 Linux 上的 /dev/tty 设备，Linux 的多用户登录就是通过不同的 /dev/tty 设备完成的，Linux 默认提供了 6 个纯命令行界面的 “terminal”（准确的说这里应该是 6 个 virtualconsoles）来让用户登录。在物理机系统上你可以通过使用[Ctrl]+[Alt]+[F1]～[F6]进行切换。当你切换到其中一个终端后想要切换回图形界面，你可以按下[Ctrl] "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ +"
                    },
                    {
                        "type": "text",
                        "content": "[Alt]+[F7]来完成。"
                    }
                ]
            },
            "bbox": [
                144,
                436,
                847,
                506
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 接口"
                    }
                ]
            },
            "bbox": [
                146,
                521,
                226,
                536
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "终端用户 GUI "
                    }
                ]
            },
            "bbox": [
                146,
                552,
                247,
                565
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "TUI/CLI "
                    }
                ]
            },
            "bbox": [
                146,
                582,
                206,
                594
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "程序员"
                    }
                ]
            },
            "bbox": [
                146,
                612,
                200,
                626
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "System call "
                    }
                ]
            },
            "bbox": [
                146,
                642,
                233,
                656
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "在进行目录切换的过程中请多使用Tab 键自动补全，可避免输入错误，连续按"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                680,
                848,
                699
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/632222554a3b57cb69fbf06e751c5fa3f9ce58795020d75068631e70d4dd8a29.jpg"
                },
                "table_caption": [
                    {
                        "type": "text",
                        "content": "两次Tab 可以显示全部候选结果"
                    }
                ],
                "table_footnote": [],
                "html": "<table><tr><td></td><td></td></tr><tr><td>按键</td><td>作用</td></tr><tr><td>Ctrl+d</td><td>键盘输入结束或退出终端</td></tr><tr><td>Ctrl+c</td><td>终止当前程序</td></tr><tr><td>按键</td><td>作用</td></tr><tr><td>Tab键</td><td>补全命令、目录、参数等</td></tr><tr><td>Ctrl+s</td><td>暂停当前程序,暂停后按下任意键恢复运行</td></tr><tr><td>Ctrl+z</td><td>将当前程序放到后台运行,恢复到前台为命令fg</td></tr><tr><td>Ctrl+a</td><td>将光标移至输入行头,相当于Home键</td></tr><tr><td>Ctrl+e</td><td>将光标移至输入行末,相当于End键</td></tr><tr><td>Ctrl+k</td><td>删除从光标所在位置到行末</td></tr><tr><td>Alt+Backspace</td><td>向前删除一个单词</td></tr><tr><td>Shift+PgUp</td><td>将终端显示向上滚动</td></tr><tr><td>Shift+PgDn</td><td>将终端显示向下滚动</td></tr><tr><td>Arrow up 向上键</td><td>恢复之前输入过的命令</td></tr><tr><td></td><td></td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                741,
                667,
                875
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                144,
                90,
                663,
                526
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "命令程序行"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                551,
                268,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这个 Shell（壳）。有壳就有核，这里的核就是指 UNIX/Linux 内核，Shell 是指“提供给使用者使用界面” 的软件（命令解析器），类似于 DOS （磁盘操作系统）下的 command（命令行）和后来的cmd.exe 。普通意义上的 Shell 就是可以接受用户输入命令的程序。它之所以被称作 Shell 是因为它隐藏了操作系统底层的细节。同样的 UNIX/Linux 下的图形用户界面 GNOME 和 KDE，有时也被叫做 虚拟“ shell”或“ 图形 shell”。"
                    }
                ]
            },
            "bbox": [
                144,
                611,
                848,
                700
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "UNIX/Linux 操作系统下的 Shell 既是用户交互的界面，也是控制系统的脚本语言。当然这一点也有别于 Windows 下的命令行，虽然该命令行也提供了很简单的控制语句。在 Windows 操作系统下，有些用户从来都不会直接使用 Shell，然而在 UNIX 系列操作系统下，Shell 仍然是控制系统启动、X11 启动和很多其它实用工具的脚本解释程序。"
                    }
                ]
            },
            "bbox": [
                144,
                705,
                840,
                776
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 UNIX/Linux 中比较流行的常见的 Shell 有 bash、zsh、ksh、csh 等等，Ubuntu 终端默认使用的是 bash，默认的桌面环境是 GNOME 或者 Unity（基于 GNOME）。"
                    }
                ]
            },
            "bbox": [
                144,
                790,
                848,
                824
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 linux 中，最最重要的就是命令，这就包含了 2 个过程，输入和输出"
                    }
                ]
            },
            "bbox": [
                144,
                846,
                640,
                860
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "linux 的哲学就是：没有结果就是最好的结果"
                    }
                ]
            },
            "bbox": [
                146,
                873,
                546,
                890
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "通配符"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                101,
                221,
                120
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通配符是一种特殊语句，主要有星号（*）和问号（?），用来对字符串进行模糊匹配（比如文件名、参数名）"
                    }
                ]
            },
            "bbox": [
                144,
                161,
                848,
                195
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "终端里面输入的通配符是由 Shell 处理的，不是由所涉及的命令语句处理的，它只会出现在命令的“ ” 参数值 里（它不能出现在命令名称里， 命令不记得，那就用 Tab补全）.总之，通配符实际上就是一种 Shell 实现的路径扩展功能。在通配符被处理后， Shell 会先完成该命令的重组，然后继续处理重组后的命令，直至执行该命令。"
                    }
                ]
            },
            "bbox": [
                144,
                198,
                850,
                268
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Shell 常用通配符："
                    }
                ]
            },
            "bbox": [
                146,
                291,
                277,
                305
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/80086919ee614846d369f986b2ef520723a3db2eb76af4c0e257bfaa884deabd.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>字符</td><td>含义</td></tr><tr><td>*</td><td>匹配0或多个字符</td></tr><tr><td>?</td><td>匹配任意一个字符</td></tr><tr><td>[list]</td><td>匹配list中的任意单一字符</td></tr><tr><td>^[list]</td><td>匹配除list中的任意单一字符以外的字符</td></tr><tr><td>[c1-c2]</td><td>匹配c1-c2中的任意单一字符如：[0-9][a-z]</td></tr><tr><td>{string1, string2, .}</td><td>匹配string1或string2(或更多)其一字符串</td></tr><tr><td>{c1..c2}</td><td>匹配c1-c2中全部字符如{1..10}</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                146,
                317,
                583,
                615
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "帮助命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                639,
                258,
                659
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Linux 环境中，如果你遇到困难，可以使用 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathfrak { m a n }"
                    },
                    {
                        "type": "text",
                        "content": "命令，它是 Manual pages 的缩写。"
                    }
                ]
            },
            "bbox": [
                144,
                705,
                737,
                720
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Man command "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                747,
                327,
                766
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Man [options] command "
                    }
                ]
            },
            "bbox": [
                144,
                807,
                354,
                822
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "为了便于查找，man 手册被进行了分册（分区段）处理，在 Research UNIX、BSD、OS X 和Linux 中，手册通常被分为 8 个区段，安排如下："
                    }
                ]
            },
            "bbox": [
                144,
                825,
                806,
                858
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/6b191c25045d909fb5fe19493805fc4a7dc8199a3f892fd0ab140627700a0597.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>区段</td><td>说明</td></tr><tr><td>1</td><td>一般命令</td></tr><tr><td>2</td><td>系统调用</td></tr><tr><td>3</td><td>库函数，涵盖了C标准函数库</td></tr><tr><td>4</td><td>特殊文件（通常是/dev中的设备）和驱动程序</td></tr><tr><td>5</td><td>文件格式和约定</td></tr><tr><td>6</td><td>游戏和屏保</td></tr><tr><td>7</td><td>杂项</td></tr><tr><td>8</td><td>系统管理命令和守护进程</td></tr><tr><td>9</td><td>其他（Linux特定的），用来存放内核例行程序的文档。</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                90,
                583,
                407
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "要查看相应区段的内容，就在 man 后面加上相应区段的数字即可，如："
                    }
                ]
            },
            "bbox": [
                146,
                437,
                645,
                451
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "$ man 1 ls "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                468,
                233,
                481
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "所有的手册页遵循一个常见的布局，为了通过简单的 ASCII 文本展示而被优化，而这种情况下可能没有任何形式的高亮或字体控制。一般包括以下部分内容："
                    }
                ]
            },
            "bbox": [
                144,
                514,
                842,
                548
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "NAME（名称）"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                564,
                253,
                577
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "该命令或函数的名称，接着是一行简介。"
                    }
                ]
            },
            "bbox": [
                206,
                594,
                489,
                608
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "SYNOPSIS（概要）"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                613,
                287,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "对于命令，正式的描述它如何运行，以及需要什么样的命令行参数。对于函数，介绍函数所需的参数，以及哪个头文件包含该函数的定义。"
                    }
                ]
            },
            "bbox": [
                206,
                643,
                786,
                675
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "DESCRIPTION（说明）"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                680,
                315,
                694
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令或函数功能的文本描述。"
                    }
                ]
            },
            "bbox": [
                206,
                709,
                410,
                722
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "OPTIONS "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                728,
                223,
                741
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "针对SYNOPSIS 部分中，有列举的所有可用的选项说明"
                    }
                ]
            },
            "bbox": [
                149,
                747,
                549,
                760
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "COMMANDS "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                766,
                245,
                778
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当这个程序在执行的时候，可以在此程序中下达的指令"
                    }
                ]
            },
            "bbox": [
                147,
                784,
                534,
                799
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "FILES "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                803,
                196,
                815
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这个程序或数据所使用或参考连接到的某些文件"
                    }
                ]
            },
            "bbox": [
                146,
                821,
                485,
                835
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "EXAMPLES（示例）"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                840,
                294,
                853
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "常用的一些示例。"
                    }
                ]
            },
            "bbox": [
                206,
                869,
                329,
                883
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "SEE ALSO（参见）"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                888,
                287,
                902
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "相关命令或函数的列表。"
                    }
                ]
            },
            "bbox": [
                206,
                93,
                376,
                107
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "也可能存在其它部分内容，但这些部分没有得到跨手册页的标准化。常见的例子包括：OPTIONS（ 选 项 ） ，EXIT STATUS（退出状态 ） ，ENVIRONMENT（环境） ，BUGS（ 程 序漏洞），FILES（文件），AUTHOR（作者），REPORTING BUGS（已知漏洞），HISTORY（历史）和COPYRIGHT（版权）。"
                    }
                ]
            },
            "bbox": [
                144,
                130,
                855,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 man 中使用搜索/<你要搜索的关键字>，查找完毕后你可以使用n键切换到下一个关键字所在处，shift "
                    },
                    {
                        "type": "equation_inline",
                        "content": "+ \\Pi"
                    },
                    {
                        "type": "text",
                        "content": "为上一个关键字所在处。使用Space（空格键）翻页，Enter（回车键）向下滚动一行，或者使用k,j（vim 编辑器的移动键）进行向前向后滚动一行。按下h键为显示使用帮助（因为 man 使用 less 作为阅读器，实为 less 工具的帮助），按下 q 退出。"
                    }
                ]
            },
            "bbox": [
                144,
                223,
                850,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "想要获得更详细的帮助，你还可以使用info命令，不过通常使用man就足够了。如果你知道某个命令的作用，只是想快速查看一些它的某个具体参数的作用，那么你可以使用--help参数，大部分命令都会带有这个参数，如："
                    }
                ]
            },
            "bbox": [
                144,
                307,
                843,
                360
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "$ ls --help "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                376,
                240,
                388
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "查看版本内核号"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                418,
                315,
                437
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "第一个种方法使用 uname 命令。"
                    }
                ]
            },
            "bbox": [
                146,
                478,
                366,
                492
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "常用的选项是-a，也可以使用-r。使用-a显示信息很长，包含不仅仅内核版本，所以也可以使用-r就是只是显示内核版本号。可以再配以-s和-m选项，显示稍微完整一些的信息，包括操作系统和硬件系统信息。"
                    }
                ]
            },
            "bbox": [
                144,
                508,
                843,
                558
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "第二种方法是查看/proc下的version文件，该文件中包含内核版本信息。因为只是一个文件，所以使用任何可以查看文件内容的方法都可以，例如使用cat命令。"
                    }
                ]
            },
            "bbox": [
                144,
                575,
                847,
                608
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "命令格式一般格式："
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                636,
                349,
                656
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cmd [options] [arguments] "
                    }
                ]
            },
            "bbox": [
                144,
                715,
                374,
                731
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "说明："
                    }
                ]
            },
            "bbox": [
                146,
                734,
                194,
                747
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "最简单的Shell命令只有命令名，复杂的Shell命令可以有多个选项和参数。"
                    }
                ]
            },
            "bbox": [
                144,
                752,
                726,
                768
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "选项和参数都作为Shell命令执行时的输入，它们之间用空格分隔开。"
                    }
                ]
            },
            "bbox": [
                144,
                771,
                680,
                785
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux区分大小写 "
                    }
                ]
            },
            "bbox": [
                146,
                790,
                287,
                804
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "单字符参数前使用一个减号（-）"
                    }
                ]
            },
            "bbox": [
                144,
                826,
                394,
                841
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "单词参数前使用两个减号（--）。"
                    }
                ]
            },
            "bbox": [
                144,
                845,
                400,
                860
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "多个单字符参数前可以只使用一个减号。"
                    }
                ]
            },
            "bbox": [
                144,
                864,
                457,
                878
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "操作对象（arguments）可以是文件也可以是目录，有些命令必须使用多个操作对象， 如"
                    }
                ]
            },
            "bbox": [
                144,
                882,
                847,
                898
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cp 命令必须指定源操作对象和目标操作对象。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                499,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "并非所有命令的格式都遵从以上规则，例如 dd、find 等"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                583,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令在正常执行结果后返回一个 0 值，如果命令出错，则返回一个非零值 (在 shell 中可用变量 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\$ 7"
                    },
                    {
                        "type": "text",
                        "content": "查看)。"
                    }
                ]
            },
            "bbox": [
                144,
                130,
                845,
                165
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "命令区别 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                210,
                245,
                229
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "内建命令实际上是 shell 程序的一部分，其中包含的是一些比较简单的 Linux 系统命令，这些命令是写在 bash 源码的 builtins 里面的，由 shell 程序识别并在 shell程序内部完成运行，通常在 Linux 系统加载运行时 shell 就被加载并驻留在系统内存中。而且解析内部命令 shell 不需要创建子进程，因此其执行速度比外部命令快。比如：history、cd、exit 等等。"
                    }
                ]
            },
            "bbox": [
                205,
                269,
                786,
                359
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "外部命令是 Linux 系统中的实用程序部分，因为实用程序的功能通常都比较强大，所以其包含的程序量也会很大，在系统加载时并不随系统一起被加载到内存中，而是在需要时才将其调入内存。虽然其不包含在 shell 中，但是其命令执行过程是由shell 程序控制的。外部命令是在 Bash 之外额外安装的，通常放在/bin，/usr/bin，/sbin，/usr/sbin 等等。比如：ls、vi 等。"
                    }
                ]
            },
            "bbox": [
                205,
                362,
                786,
                451
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们可以使用 type 命令来区分命令是内建的还是外部的。"
                    }
                ]
            },
            "bbox": [
                206,
                456,
                608,
                470
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Info "
                    }
                ]
            },
            "bbox": [
                171,
                486,
                203,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "与man功能相似的帮助，分页显示"
                    }
                ]
            },
            "bbox": [
                171,
                504,
                421,
                519
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Info [optinons] command "
                    }
                ]
            },
            "bbox": [
                171,
                523,
                351,
                537
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "help 命令是用于显示 shell 内建命令的简要帮助信息。帮助信息中显示有该命令的简要说明以及一些参数的使用以及说明，一定记住 help 命令只能用于显示内建命令的帮助信息，不然就会得到你刚刚得到的结果。其实外部命令基本上都有一个参数command —help。"
                    }
                ]
            },
            "bbox": [
                169,
                539,
                847,
                593
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Whatis "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                621,
                233,
                638
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查找一个存储所有相关命令信息的数据库，根据命令名返回相关结果"
                    }
                ]
            },
            "bbox": [
                144,
                678,
                680,
                695
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "- Usage: whatis [options] command\n- options: 选项（常用-d|-v|-r|-w|-l）\n- command: 命令名 "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                697,
                568,
                753
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "文件系统"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                795,
                258,
                816
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一种不同是体现在目录与存储介质（磁盘，内存，DVD 等）的关系上，以往的 Windows 一直是以存储介质为主的，主要以盘符（C 盘，D 盘...）及分区来实现文件管理，然后之下才是目录。"
                    }
                ]
            },
            "bbox": [
                144,
                860,
                847,
                895
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "然而 UNIX/Linux 恰好相反，UNIX 是以目录为主的，Linux 也继承了这一优良特性。 Linux 是以树形目录结构的形式来构建整个系统的，可以理解为树形目录是一个用户可操作系统的骨架。虽然本质上无论是目录结构还是操作系统内核都是存储在磁盘上的，但从逻辑上来说 Linux 的磁盘是“挂在”（挂载在）目录上的，每一个目录不仅能使用本地磁盘分区的文件系统，也可以使用网络上的文件系统。举例来说，可以利用网络文件系统（Network File System，NFS）服务器载入某特定目录等。Tip：目录是文件系统中的一个概念，因为目录本身也是文件，叫做目录文件，简称目录。在图形用户界面中，目录被表示为文件夹。主要区别在于，文件夹是一个逻辑概念，不一定映射到物理目录。目录是文件系统对象，而文件夹是图形用户界面对象。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                853,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若指代文档的容器，使用“文件夹”一词更为贴切。而“目录”一词则指代计算机上存储文档文件和文件夹的结构化列表方式，类似于电话簿包含姓名、号码和地址的列表，但并不包含实际文档本身。"
                    }
                ]
            },
            "bbox": [
                144,
                242,
                848,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Windows 系统中，文件夹 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathbf { \\bar { \\mathbf { \\tau } } } = \\mathbf { \\tau } _ { \\cdot }"
                    },
                    {
                        "type": "text",
                        "content": "虚拟文件夹 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ +"
                    },
                    {
                        "type": "text",
                        "content": "文件系统目录。"
                    }
                ]
            },
            "bbox": [
                146,
                298,
                557,
                312
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "FHS 定义"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                340,
                247,
                360
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "FHS 定义了两层规范，第一层是，/下面的各个目录应该要放什么文件数据，例如/etc 应该放置设置文件，/bin 与/sbin 则应该放置可执行文件等等。"
                    }
                ]
            },
            "bbox": [
                144,
                400,
                850,
                432
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "第二层则是针对 /usr 及/var 这两个目录的子目录来定义。例如 /var/log 放置系统日志文件，/usr/share 放置共享数据等等。"
                    }
                ]
            },
            "bbox": [
                144,
                437,
                850,
                469
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/5a0420fefef9e200b0d0038ac63a507d8d857db101a28ff6f1c8ed2f69eb23b0.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                470,
                342,
                623
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将目录定义为四种交互作用的形态，如下表所示："
                    }
                ]
            },
            "bbox": [
                146,
                640,
                494,
                656
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/7e3fec395ccd28586b338d1fc2c8fc090535d243a140909ddd2986159ffc0516.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td></td><td>可分享的shareable)</td><td>不可分享</td></tr><tr><td rowspan=\"2\">不可变的(static)</td><td>/usr(软件放置处)</td><td>/etc(配置)</td></tr><tr><td>/opt(第三方软件)</td><td>/boot(开)</td></tr><tr><td rowspan=\"2\">可变动的(variable)</td><td>/var/mail(用户邮件信箱)</td><td>/var/run</td></tr><tr><td>/var/news(新闻组)</td><td>/var/log</td></tr></table>",
                "table_type": "complex_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                674,
                1000,
                839
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "路径"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                101,
                200,
                120
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果你想进入某个具体的目录或者想获得某个目录的文件（目录本身也是文件）那就得用路径来找到了。"
                    }
                ]
            },
            "bbox": [
                144,
                161,
                848,
                195
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用cd 命令可以切换目录，在 Linux 里面使用. 表示当前目录，.. 表示上一级目录（注意，我们上一节介绍过的，以. 开头的文件都是隐藏文件，所以这两个目录必然也是隐藏的，你可以使用 ls -a命令查看隐藏文件）, - 表示上一次所在目录，～ 通常表示当前用户的 home 目录。使用 pwd 命令可以获取当前所在路径（绝对路径）。"
                    }
                ]
            },
            "bbox": [
                144,
                198,
                850,
                269
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "绝对路径"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                273,
                216,
                286
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "关于绝对路径，简单地说就是以根\" / \"目录为起点的完整路径，以你所要到的目录为终点，表现形式如： /usr/local/bin，表示根目录下的 usr 目录中的 local 目录中的 bin 目录。"
                    }
                ]
            },
            "bbox": [
                144,
                291,
                850,
                324
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "相对路径"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                328,
                216,
                342
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "相对路径，也就是相对于你当前的目录的路径，相对路径是以当前目录 . 为起点，以你所要到的目录为终点，表现形式如： usr/local/bin （这里假设你当前目录为根目录）。你可能注意到，我们表示相对路径实际并没有加上表示当前目录的那个 . ，而是直接以目录名开头，因为这个 usr 目录为/目录下的子目录，是可以省略这个 . 的（以后会讲到一个类似不能省略的情况）；如果是当前目录的上一级目录，则需要使用.. ，比如你当前目录为/home/shiyanlou 目录下，根目录就应该表示为../../ ，表示上一级目录（home 目录）的上一级目录（/ 目录）。"
                    }
                ]
            },
            "bbox": [
                144,
                346,
                847,
                455
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "文件类型"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                481,
                247,
                501
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "普通文件 ( - )"
                    }
                ]
            },
            "bbox": [
                146,
                560,
                253,
                576
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "目录 ( d ) "
                    }
                ]
            },
            "bbox": [
                147,
                579,
                221,
                594
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "符号链接 ( l ) "
                    }
                ]
            },
            "bbox": [
                147,
                598,
                250,
                613
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "字符设备文件 ( c )"
                    }
                ]
            },
            "bbox": [
                147,
                615,
                289,
                632
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "块设备文件 ( b )"
                    }
                ]
            },
            "bbox": [
                147,
                634,
                273,
                650
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "套接字 ( s )"
                    }
                ]
            },
            "bbox": [
                147,
                653,
                236,
                669
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命名管道 ( p )"
                    }
                ]
            },
            "bbox": [
                147,
                671,
                255,
                688
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "普通文件仅仅就是字节序列，Linux 并没有对其内容规定任何的结构。"
                    }
                ]
            },
            "bbox": [
                144,
                727,
                684,
                743
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "普通文件可以是程序源代码（c、 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ \\mathsf { C } } ^ { + + }"
                    },
                    {
                        "type": "text",
                        "content": "、python、perl等）、可执行文件（文件编辑器、数据库系统、出版工具、绘图工具等）、图片、声音、图像等。"
                    }
                ]
            },
            "bbox": [
                144,
                745,
                847,
                780
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 不会区别对待这些普通文件，只有处理这些文件的应用程序才会根据文件的内容赋予相应的含义。"
                    }
                ]
            },
            "bbox": [
                144,
                783,
                847,
                816
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在Linux环境下，只要是可执行的文件并具有可执行属性它就能执行，不管其文件名后缀是什么。但是对一些数据文件一般也遵循一些文件名后缀规则。"
                    }
                ]
            },
            "bbox": [
                144,
                820,
                847,
                854
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "目录文件是由一组目录项组成，目录项可以是对其他文件的指向也可以是其下的子目录指向。"
                    }
                ]
            },
            "bbox": [
                144,
                857,
                847,
                891
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一个文件的名称是存储在他的父目录中的，而并非同文件内容本身存储在一起。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                761,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬连接文件实际上就是在某目录中创建目录项，从而使不止一个目录可以引用到同一个文件。这种链接关系由 ln 命令行来建立。"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                850,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬链接并不是一种特殊类型的文件，只是因为在文件系统中允许不止一个目录项指向同一个文件。"
                    }
                ]
            },
            "bbox": [
                144,
                148,
                850,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户登录后，将会进入一个系统指定的专属目录，即用户的主目录，该目录名通常为用户的登录账号。如"
                    }
                ]
            },
            "bbox": [
                144,
                186,
                850,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户 bigdata 的主目录为：/home/bigdata"
                    }
                ]
            },
            "bbox": [
                144,
                223,
                489,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在创建用户时，系统管理员会给每个用户建立一个主目录，通常在 /home/ 目录下。"
                    }
                ]
            },
            "bbox": [
                144,
                241,
                794,
                258
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户对自己主目录的文件拥有所有权，可以在自己的主目录下进行相关操作。"
                    }
                ]
            },
            "bbox": [
                144,
                260,
                742,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每个用户名对应一个用户 ID 号（一个数字）；每个用户都被分配到一个指定的组 (group)中。"
                    }
                ]
            },
            "bbox": [
                144,
                278,
                850,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认情况下 RHEL/CentOS 在创建用户的同时会创建一个和用户同名的私有组。"
                    }
                ]
            },
            "bbox": [
                144,
                315,
                754,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "符号链接又称软链接，是指将一个文件指向另外一个文件的文件名。"
                    }
                ]
            },
            "bbox": [
                144,
                334,
                670,
                350
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这种符号链接的关系由 ln -s 命令行来建立。"
                    }
                ]
            },
            "bbox": [
                144,
                353,
                485,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬链接 "
                    }
                ]
            },
            "bbox": [
                144,
                372,
                205,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "链接文件和被链接文件必须位于同一个文件系统内"
                    }
                ]
            },
            "bbox": [
                144,
                390,
                539,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不能建立指向目录的硬链接"
                    }
                ]
            },
            "bbox": [
                144,
                407,
                363,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "软链接 "
                    }
                ]
            },
            "bbox": [
                144,
                426,
                205,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "链接文件和被链接文件可以位于不同文件系统"
                    }
                ]
            },
            "bbox": [
                144,
                445,
                505,
                461
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以建立指向目录的软链接"
                    }
                ]
            },
            "bbox": [
                144,
                464,
                363,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备文件"
                    }
                ]
            },
            "bbox": [
                144,
                483,
                221,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备是指计算机中的外围硬件装置，即除了CPU和内存以外的所有设备。通常，设备中含有数据寄存器或数据缓存器、设备控制器，它们用于完成设备同CPU或内存的数据交换。"
                    }
                ]
            },
            "bbox": [
                144,
                501,
                850,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Linux 下，为了屏蔽用户对设备访问的复杂性，采用了设备文件，即可以通过象访问普通文件一样的方式来对设备进行访问读写。"
                    }
                ]
            },
            "bbox": [
                144,
                538,
                847,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备文件用来访问硬件设备，包括硬盘、光驱、打印机等。每个硬件设备至少与一个设备文件相关联。"
                    }
                ]
            },
            "bbox": [
                144,
                575,
                850,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备文件分为：字符设备（如：键盘）和块设备（如：磁盘）。"
                    }
                ]
            },
            "bbox": [
                144,
                612,
                636,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备的使用方法"
                    }
                ]
            },
            "bbox": [
                144,
                631,
                275,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户可以用设备名来使用设备"
                    }
                ]
            },
            "bbox": [
                144,
                649,
                381,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户可以用访问文件的方法来使用设备"
                    }
                ]
            },
            "bbox": [
                144,
                668,
                450,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备名以文件系统中的设备文件的形式存在"
                    }
                ]
            },
            "bbox": [
                149,
                686,
                492,
                702
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "所有的设备文件存放在/dev 目录下"
                    }
                ]
            },
            "bbox": [
                149,
                705,
                425,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "几个特殊的设备"
                    }
                ]
            },
            "bbox": [
                149,
                724,
                278,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/dev/null －空设备 "
                    }
                ]
            },
            "bbox": [
                144,
                741,
                363,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/dev/zero －零设备 "
                    }
                ]
            },
            "bbox": [
                144,
                760,
                363,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux的目录结构 "
                    }
                ]
            },
            "bbox": [
                144,
                778,
                289,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 文件系统是一个目录树的结构，文件系统结构从一个根目录开始，根目录下可以有任意多个文件和子目录，子目录中又可以有任意多个文件和子目录。"
                    }
                ]
            },
            "bbox": [
                144,
                797,
                850,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 的这种文件系统结构使得一个目录和它包含的文件/子目录之间形成一种层次关系。"
                    }
                ]
            },
            "bbox": [
                144,
                834,
                831,
                850
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "大小写敏感"
                    }
                ]
            },
            "bbox": [
                144,
                853,
                240,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "以“.”开头的文件或目录是隐含的"
                    }
                ]
            },
            "bbox": [
                144,
                872,
                410,
                887
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/2c593a284b9247a11712bcf3e90b3d0fd57379c15277f13b41023975c749cd34.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                157,
                96,
                668,
                374
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "文件操作"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                413,
                247,
                435
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/ac4905c9acdcb05e8d37efb59ea5a75f46d6c69659da386574256c6a01b21874.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>cat</td><td>查看文件内容</td><td>more/less</td><td>查看文件内容</td></tr><tr><td>cd</td><td>切换工作目录</td><td>touch</td><td>改变文件的时间属性</td></tr><tr><td>chown</td><td>改变文件属权</td><td>mv</td><td>改名或移动文件</td></tr><tr><td>chmod</td><td>改变文件权限</td><td>pwd</td><td>显示当前所在的目录</td></tr><tr><td>clear</td><td>清除屏幕</td><td>rm</td><td>删除文件或目录</td></tr><tr><td>cp</td><td>拷贝文件</td><td>find</td><td>查找文件</td></tr><tr><td>In</td><td>创建文件链接</td><td>which</td><td>寻找命令</td></tr><tr><td>Is</td><td>显示目录内容</td><td>tar</td><td>文件打包</td></tr><tr><td>mkdir</td><td rowspan=\"2\">创建/删除空目录</td><td>[g]zip/unzip</td><td rowspan=\"2\">文件压缩和解压</td></tr><tr><td>rmdir</td><td>7za</td></tr><tr><td>Tree</td><td>显示目录树</td><td></td><td></td></tr></table>",
                "table_type": "complex_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                489,
                665,
                869
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "1．新建文件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                889,
                240,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用touch 命令生成新的空文件或更改现有文件的时间，关于touch 命令，其主要作用是来更改已有文件的时间戳的（比如，最近访问时间，最近修改时间），但其在不加任何参数的情况下，只指定一个文件名，则可以创建一个指定文件名的空白文件（不会覆盖已有同名文件）"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                848,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：touch [参数] <文件> …"
                    }
                ]
            },
            "bbox": [
                146,
                149,
                359,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "参数"
                    }
                ]
            },
            "bbox": [
                147,
                168,
                184,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-a : 只更改访问时间。"
                    }
                ]
            },
            "bbox": [
                146,
                187,
                295,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-m : 只更改修改时间。"
                    }
                ]
            },
            "bbox": [
                146,
                205,
                302,
                218
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-t <STAMP> : 使用[[CC]YY]MMDDhhmm[.ss]格式的时间而非当前时间。"
                    }
                ]
            },
            "bbox": [
                146,
                223,
                652,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-r <参考文件或目录 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathrm { > }"
                    },
                    {
                        "type": "text",
                        "content": ": 使用指定文件的时间属性而非当前时间。"
                    }
                ]
            },
            "bbox": [
                146,
                242,
                586,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "GNU/Linux 文件的3种类型的时间戳："
                    }
                ]
            },
            "bbox": [
                146,
                261,
                418,
                274
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "mtime: 最后修改时间 (ls -lt)"
                    }
                ]
            },
            "bbox": [
                146,
                279,
                349,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ctime: 状态改变时间 (ls -lc)"
                    }
                ]
            },
            "bbox": [
                146,
                298,
                342,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "atime: 最后访问时间 (ls -lu)"
                    }
                ]
            },
            "bbox": [
                146,
                317,
                346,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "说明"
                    }
                ]
            },
            "bbox": [
                147,
                335,
                184,
                348
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ctime并非文件创建时间。"
                    }
                ]
            },
            "bbox": [
                146,
                353,
                329,
                367
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "覆盖一个文件会改变mtime、ctime和atime三类时间。"
                    }
                ]
            },
            "bbox": [
                146,
                372,
                542,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "改变文件的访问权限或拥有者会改变文件的 ctime 和 atime。"
                    }
                ]
            },
            "bbox": [
                146,
                391,
                569,
                404
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "读文件会改变文件的atime。"
                    }
                ]
            },
            "bbox": [
                146,
                409,
                347,
                423
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "2. 新建目录"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                464,
                233,
                478
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用mkdir（make directories）命令可以创建一个空目录，也可同时指定创建目录的权限属性。"
                    }
                ]
            },
            "bbox": [
                144,
                482,
                823,
                495
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用-p 参数，同时创建父目录（如果不存在该父目录）"
                    }
                ]
            },
            "bbox": [
                146,
                502,
                531,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Rmdir 删除目录（空目录）"
                    }
                ]
            },
            "bbox": [
                146,
                520,
                334,
                533
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "1. 复制文件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                539,
                233,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 cp 命令（copy）复制一个文件到指定目录。"
                    }
                ]
            },
            "bbox": [
                146,
                557,
                489,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cp test father/son/grandson "
                    }
                ]
            },
            "bbox": [
                146,
                576,
                361,
                589
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：cp [参数] <源> <目标>"
                    }
                ]
            },
            "bbox": [
                146,
                594,
                356,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "说明"
                    }
                ]
            },
            "bbox": [
                147,
                613,
                184,
                626
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若复制的目标文件已存在，则被覆盖。"
                    }
                ]
            },
            "bbox": [
                146,
                631,
                413,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以将多个源文件复制到目标目录中。"
                    }
                ]
            },
            "bbox": [
                146,
                650,
                413,
                663
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以将源目录复制为指定的目标目录（目标目录不存在）。"
                    }
                ]
            },
            "bbox": [
                146,
                668,
                556,
                682
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以将源目录复制到指定的目标目录中。"
                    }
                ]
            },
            "bbox": [
                146,
                687,
                428,
                700
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/14ed4721e3bc826710a8fecd84d8a093df61910d5cde446afb4c16982e546f0d.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>参数</td><td>说明</td></tr><tr><td>-a</td><td>等价于 -dpR</td></tr><tr><td>-R, -r</td><td>递归地复制目录及目录内的所有项目</td></tr><tr><td>-p</td><td>在复制文件过程中保留文件属性，包括属主、组、权限与时间戳</td></tr><tr><td>-d</td><td>当复制符号链接的源文件时，目标文件也将创建符号链接且指向源文件所链接的原始文件</td></tr><tr><td>-f</td><td>强制复制，不管目标是否存在</td></tr><tr><td>-i</td><td>交互式复制，覆盖文件前需要确认</td></tr><tr><td>-u</td><td>只有当源文件的状态改变时间（ctime）比目标文件更新时或目标尚不存在时才进行复制</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                721,
                996,
                894
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                91,
                998,
                186
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "2. 复制目录"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                208,
                235,
                223
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果直接使用cp 命令复制一个目录的话，要成功复制目录需要加上 -r 或者-R 参数，表示递归复制，"
                    }
                ]
            },
            "bbox": [
                144,
                227,
                855,
                242
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "就是说有点目录及其下面的子目录层层进入复制的意思。"
                    }
                ]
            },
            "bbox": [
                144,
                244,
                542,
                260
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "1. 删除文件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                265,
                235,
                279
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 rm（remove files or directories）命令删除一个文件"
                    }
                ]
            },
            "bbox": [
                144,
                282,
                564,
                298
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "你如果想忽略这提示，直接删除文件，可以使用-f 参数强制删除："
                    }
                ]
            },
            "bbox": [
                144,
                300,
                608,
                316
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "2. 删除目录"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                319,
                235,
                334
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "跟复制目录一样，要删除一个目录，也需要加上-r 或-R 参数："
                    }
                ]
            },
            "bbox": [
                144,
                338,
                584,
                353
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "1. 移动文件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                357,
                235,
                370
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用mv（move or rename files）命令移动文件（剪切）。命令格式是mv 源目录文件 目的目录。"
                    }
                ]
            },
            "bbox": [
                144,
                375,
                838,
                390
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "2. 重命名文件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                394,
                250,
                409
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "mv 命令除了能移动文件外，还能给文件重命名。命令格式为mv 旧的文件名新的文件名。"
                    }
                ]
            },
            "bbox": [
                144,
                413,
                778,
                426
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "3. 批量重命名 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                432,
                248,
                445
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "要实现批量重命名，mv 命令就有点力不从心了，我们可以使用一个看起来更专业的命令 rename来实现。"
                    }
                ]
            },
            "bbox": [
                144,
                450,
                845,
                483
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Tree "
                    }
                ]
            },
            "bbox": [
                146,
                487,
                184,
                499
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "显示目录树 "
                    }
                ]
            },
            "bbox": [
                146,
                505,
                231,
                519
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "判断文件类型"
                    }
                ]
            },
            "bbox": [
                146,
                524,
                247,
                538
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件可以包含许多类型的数据"
                    }
                ]
            },
            "bbox": [
                146,
                542,
                359,
                557
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在打开前检查文件的类型来决定要使用的恰当命令或程序"
                    }
                ]
            },
            "bbox": [
                144,
                561,
                549,
                575
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令"
                    }
                ]
            },
            "bbox": [
                146,
                580,
                184,
                593
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "file [选项] <文件名>… "
                    }
                ]
            },
            "bbox": [
                146,
                598,
                304,
                613
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "stat [选项] <文件名>… "
                    }
                ]
            },
            "bbox": [
                146,
                617,
                309,
                631
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ln命令"
                    }
                ]
            },
            "bbox": [
                146,
                634,
                201,
                649
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "功能：创建链接文件。"
                    }
                ]
            },
            "bbox": [
                146,
                653,
                302,
                668
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：ln [参数] <被链接的文件> <链接文件名>"
                    }
                ]
            },
            "bbox": [
                144,
                671,
                480,
                687
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "参数："
                    }
                ]
            },
            "bbox": [
                146,
                690,
                189,
                703
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-s : 创建符号链接，而非硬链接。"
                    }
                ]
            },
            "bbox": [
                146,
                709,
                374,
                722
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-f : 强行创建链接，不论其是否存在。"
                    }
                ]
            },
            "bbox": [
                146,
                728,
                403,
                741
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-i : 覆盖原有文件之前先询问用户。"
                    }
                ]
            },
            "bbox": [
                146,
                746,
                386,
                760
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "举例："
                    }
                ]
            },
            "bbox": [
                146,
                765,
                189,
                778
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "ln somefile hardlinkfile "
                    }
                ]
            },
            "bbox": [
                149,
                783,
                339,
                796
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "ln -s somefile softlinkfile "
                    }
                ]
            },
            "bbox": [
                151,
                802,
                349,
                815
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "ln -s somedir softlinkfile "
                    }
                ]
            },
            "bbox": [
                151,
                820,
                347,
                833
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "标准输入输出"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                101,
                292,
                120
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当我们执行一个 shell 命令行时通常会自动打开三个标准文件，即标准输入文件（stdin），默认对应终端的键盘、标准输出文件（stdout）和标准错误输出文件（stderr），后两个文件都对应被重定向到终端的屏幕，以便我们能直接看到输出内容。"
                    }
                ]
            },
            "bbox": [
                144,
                179,
                848,
                231
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "进程将从标准输入文件中得到输入数据，将正常输出数据输出到标准输出文件，而将错误信息送到标准错误文件中。"
                    }
                ]
            },
            "bbox": [
                144,
                235,
                848,
                268
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "前两个命令都是用来打印文件内容到标准输出（终端），其中 cat 为正序显示，tac 为倒序显示。可以加上-n 参数显示行号"
                    }
                ]
            },
            "bbox": [
                144,
                272,
                848,
                306
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户登录后进入的目录通常是自己的主目录"
                    }
                ]
            },
            "bbox": [
                144,
                346,
                485,
                361
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可用 pwd 命令查看用户的当前目录"
                    }
                ]
            },
            "bbox": [
                146,
                365,
                433,
                380
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可用 cd 命令来切换目录"
                    }
                ]
            },
            "bbox": [
                147,
                384,
                339,
                398
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一些特殊字符的特殊含义："
                    }
                ]
            },
            "bbox": [
                147,
                401,
                352,
                417
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "“ .” 表示当前目录"
                    }
                ]
            },
            "bbox": [
                147,
                420,
                284,
                435
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "“..” 表示当前目录的上一级目录（父目录）"
                    }
                ]
            },
            "bbox": [
                147,
                439,
                465,
                454
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "“-” 表示用 cd 命令切换目录前所在的目录"
                    }
                ]
            },
            "bbox": [
                147,
                457,
                467,
                472
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "“~” 表示用户主目录的绝对路径名"
                    }
                ]
            },
            "bbox": [
                147,
                476,
                406,
                491
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "绝对路径"
                    }
                ]
            },
            "bbox": [
                147,
                495,
                221,
                508
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "以斜线（/）开头"
                    }
                ]
            },
            "bbox": [
                147,
                513,
                280,
                527
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "描述到文件位置的完整说明"
                    }
                ]
            },
            "bbox": [
                147,
                532,
                363,
                546
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "任何时候你想指定文件名的时候都可以使用"
                    }
                ]
            },
            "bbox": [
                147,
                550,
                485,
                565
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "相对路径"
                    }
                ]
            },
            "bbox": [
                147,
                569,
                221,
                583
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不以斜线（/）开头"
                    }
                ]
            },
            "bbox": [
                147,
                587,
                299,
                602
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "指定相对于你的当前工作目录而言的位置"
                    }
                ]
            },
            "bbox": [
                147,
                606,
                468,
                621
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以被用作指定文件名的简捷方式"
                    }
                ]
            },
            "bbox": [
                147,
                624,
                416,
                639
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "常用的文本文件提取命令"
                    }
                ]
            },
            "bbox": [
                147,
                643,
                344,
                657
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/5bc288026a114c60492984cbd26110bc4430675c2ede617923da5792c3d5f514.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>命令</td><td>功能</td></tr><tr><td>cat、tac</td><td>滚屏显示文本文件内容</td></tr><tr><td>more、less</td><td>分屏显示文本文件内容</td></tr><tr><td>head、tail</td><td>显示文本文件的前或后若干行\n(横向截取文本文件内容)</td></tr><tr><td>cut</td><td>纵向切割出文本指定的部分\n(纵向截取文本文件内容)</td></tr><tr><td>grep</td><td>在文本文件中查找指定的字符串\n(按关键字提取文本文件中匹配的行)</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                659,
                998,
                869
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                90,
                998,
                195
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "cat "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                241,
                189,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "真实功能命令的核心功能其实是读取输入并原样输出（concatenate 的缩写），它既能："
                    }
                ]
            },
            "bbox": [
                178,
                298,
                801,
                313
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": " 输入侧：可以接受文件参数或stdin"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": " 输出侧：总是输出到 stdout（除非用 "
                            },
                            {
                                "type": "equation_inline",
                                "content": ">"
                            },
                            {
                                "type": "text",
                                "content": "重定向）"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                236,
                317,
                591,
                350
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat -n passwd "
                    }
                ]
            },
            "bbox": [
                144,
                355,
                253,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "nl 命令，添加行号并打印 "
                    }
                ]
            },
            "bbox": [
                146,
                373,
                329,
                387
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "1.使用 more 和 less 命令分页查看文件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                414,
                559,
                435
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "。其中more 命令比较简单，只能向一个方向滚动，而 less 为基于more 和vi （一个强大的编辑器，我们有单独的课程来让你学习）开发，功能更强大。less 的使用基本和 more 一致，具体使用请查看man 手册，这里只介绍more 命令的使用。"
                    }
                ]
            },
            "bbox": [
                144,
                475,
                855,
                527
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "打开后默认只显示一屏内容，终端底部显示当前阅读的进度。可以使用 Enter 键向下滚动一行，使用Space 键向下滚动一屏，按下h 显示帮助，q 退出。"
                    }
                ]
            },
            "bbox": [
                144,
                531,
                850,
                565
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "zless file1 分页显示压缩文本文件"
                    }
                ]
            },
            "bbox": [
                146,
                569,
                391,
                583
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "2. 使用 head 和 tail 命令查看文件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                629,
                509,
                649
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这两个命令，那些性子比较急的人应该会喜欢，因为它们一个是只查看文件的头几行（默认为 10 行，不足10 行则显示全部）和尾几行。还是拿passwd 文件举例，比如当我们想要查看最近新增加的用户，那么我们可以查看这个 /etc/passwd 文件，不过我们前面也看到了，这个文件里面一大堆乱糟糟的东西，看起来实在费神啊。因为系统新增加一个用户，会将用户的信息添加到 passwd 文件的最后，那么这时候我们就可以使用tail 命令了："
                    }
                ]
            },
            "bbox": [
                144,
                689,
                855,
                778
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tail /etc/passwd "
                    }
                ]
            },
            "bbox": [
                146,
                782,
                282,
                796
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "甚至更直接的只看一行， 加上-n 参数，后面紧跟行数："
                    }
                ]
            },
            "bbox": [
                146,
                801,
                534,
                815
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tail -n 1 /etc/passwd "
                    }
                ]
            },
            "bbox": [
                146,
                820,
                315,
                834
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "关于tail 命令，不得不提的还有它一个很牛的参数 -f，这个参数可以实现不停地读取某个文件的内容并显示。这可以让我们动态查看日志，达到实时监视的目的。"
                    }
                ]
            },
            "bbox": [
                144,
                838,
                847,
                871
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "下一步"
                    }
                ]
            },
            "bbox": [
                147,
                876,
                200,
                889
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们可以使用file 命令查看文件的类型："
                    }
                ]
            },
            "bbox": [
                144,
                93,
                430,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "说明这是一个可执行文件，运行在 64 位平台，并使用了动态链接文件（共享库）。"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                727,
                126
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "与 Windows 不同的是，如果你新建了一个 shiyanlou.txt 文件，Windows 会自动把它识别为文本文件，而 file 命令会识别为一个空文件。这个前面我提到过，在 Linux 中文件的类型不是根据文件后缀来判断的。当你在文件里输入内容后才会显示文件类型。"
                    }
                ]
            },
            "bbox": [
                144,
                131,
                848,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "与搜索相关的命令常用的有 whereis，which，find 和 locate。"
                    }
                ]
            },
            "bbox": [
                144,
                186,
                584,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "whereis 只能搜索二进制文件(-b)，man 帮助文件(-m)和源代码文件(-s)。"
                    }
                ]
            },
            "bbox": [
                144,
                205,
                653,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 locate 命令查找文件也不会遍历硬盘，它通过查询 /var/lib/mlocate/mlocate.db 数据库来检索信息。不过这个数据库也不是实时更新的，系统会使用定时任务每天自动执行 updatedb 命令来更新数据库。所以有时候你刚添加的文件，它可能会找不到，需要手动执行一次 updatedb 命令（在我们的环境中必须先执行一次该命令）注意，它不只是在 /etc 目录下查找，还会自动递归子目录进行查找。"
                    }
                ]
            },
            "bbox": [
                144,
                223,
                848,
                312
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "3. which "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                340,
                247,
                357
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "which 本身是 Shell 内建的一个命令，我们通常使用 which 来确定是否安装了某个指定的程序，因为它只从 PATH 环境变量指定的路径中去搜索命令并且返回第一个搜索到的结果。也就是说，我们可以看到某个系统命令是否存在以及执行的到底是哪一个地方的命令。"
                    }
                ]
            },
            "bbox": [
                144,
                399,
                848,
                451
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "4. find 查找命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                479,
                324,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "find 应该是这几个命令中最强大的了，它不但可以通过文件类型、文件名进行查找而且可以根据文件的属性（如文件的时间戳，文件的权限等）进行搜索"
                    }
                ]
            },
            "bbox": [
                144,
                539,
                847,
                573
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "find命令语法："
                    }
                ]
            },
            "bbox": [
                144,
                577,
                253,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "find [path][option] [action] "
                    }
                ]
            },
            "bbox": [
                144,
                595,
                349,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "find [<起始目录> ...] [<选项表达式>] [<条件匹配表达式>] [<动作表达式>]"
                    }
                ]
            },
            "bbox": [
                144,
                614,
                663,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "<起始目录>：对每个指定的 <起始目录> 递归搜索目录树"
                    }
                ]
            },
            "bbox": [
                144,
                632,
                547,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "省略<起始目录>时表示当前目录"
                    }
                ]
            },
            "bbox": [
                144,
                651,
                376,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "<选项表达式>：控制 find 命令的行为"
                    }
                ]
            },
            "bbox": [
                144,
                669,
                413,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "<条件匹配表达式>：根据匹配条件查找文件"
                    }
                ]
            },
            "bbox": [
                144,
                688,
                455,
                702
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "<动作表达式>：指定对查找结果的操作，默认为显示在标准输出（-print）"
                    }
                ]
            },
            "bbox": [
                144,
                706,
                663,
                721
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不带任何参数的 find 命令将在屏幕上递归显示当前目录下的文件列表。"
                    }
                ]
            },
            "bbox": [
                144,
                725,
                640,
                739
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "选项 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                156,
                765,
                194,
                781
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "说明"
                    }
                ],
                "level": 1
            },
            "bbox": [
                561,
                766,
                596,
                781
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                159,
                809,
                176,
                822
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果遇到符号链接文件，就跟踪链接所指的文件"
                    }
                ]
            },
            "bbox": [
                561,
                807,
                899,
                822
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/698e46d74e20f540c31a76b0db8c3e78a3b9e6afe25ba4e61b8b844e742f4f77.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>-regexotype TYPE</td><td>指定 -regex 和 -iregex 使用的正则表达式类型，默认为emacs</td></tr><tr><td>-depth/-d</td><td>查找目录自身之前先处理目录中的文件（即深度优先）</td></tr><tr><td>-mount/-xdev</td><td>查找文件时不跨越文件系统</td></tr><tr><td>-maxdepth LEVELS</td><td>设置最大的查找深度</td></tr><tr><td>--help</td><td>显示 find 命令帮助信息</td></tr><tr><td>--version</td><td>显示 find 的版本</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                91,
                1000,
                388
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/76ed74a39a5a6ebd91eb4c13ed76b0d264ed8fbb60b1c49fc61885f487f5143a.jpg"
                },
                "table_caption": [
                    {
                        "type": "text",
                        "content": "用户和组"
                    }
                ],
                "table_footnote": [],
                "html": "<table><tr><td>条件</td><td>说明</td></tr><tr><td>-uid N</td><td>用户ID为N的所有文件</td></tr><tr><td>-gid N</td><td>组ID为N的所有文件</td></tr><tr><td>-user USERNAME</td><td>用户名为 USERNAME的所有文件</td></tr><tr><td>-group GROUPNAME</td><td>组名为GROUPNAME的所有文件</td></tr><tr><td>-nouser</td><td>文件属于不在 /etc/passwd 文件中的用户</td></tr><tr><td>-nogroup</td><td>文件属于不在 /etc/group 文件中的组</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                409,
                1000,
                652
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "N可以使用 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { N } , + \\mathsf { N } _ { i }"
                    },
                    {
                        "type": "text",
                        "content": ",-N"
                    }
                ]
            },
            "bbox": [
                146,
                674,
                292,
                688
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/8075a2b0dcb2865d01feefec4e08fe034a41a85b5f779985e920f2b60cce2ee8.jpg"
                },
                "table_caption": [
                    {
                        "type": "text",
                        "content": "文件权限"
                    }
                ],
                "table_footnote": [],
                "html": "<table><tr><td>条件</td><td>说明</td></tr><tr><td>-perm MODE</td><td>精确匹配权限模式为 MODE 的文件</td></tr><tr><td>-perm -MODE</td><td>匹配权限模式至少为 MODE 的文件\n(用户、组和其他人这三种权限必须都匹配)</td></tr><tr><td>-perm /MODE 或\n-perm +MODE</td><td>匹配权限模式至少为 MODE 的文件\n(用户、组和其他人这三种权限中有一种匹配即可)</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                708,
                1000,
                871
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/c3c047d3e77a448d51ec3eabfabb316bb8f29cd7293db6ff4607e472c1620940.jpg"
                },
                "table_caption": [
                    {
                        "type": "text",
                        "content": "2. 与时间相关的命令参数："
                    }
                ],
                "table_footnote": [],
                "html": "<table><tr><td>参数</td><td>说明</td></tr><tr><td>-atime</td><td>最后访问时间</td></tr><tr><td>-ctime</td><td>最后修改文件内容的时间</td></tr><tr><td>-mtime</td><td>最后修改文件属性的时间</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                146,
                690,
                269
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "3. -size 选项 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                176,
                271,
                280,
                284
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果要根据文件的大小进行搜索，则使用-size选项"
                    }
                ]
            },
            "bbox": [
                146,
                288,
                507,
                303
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "4. -exec 和-ok 选项"
                    }
                ],
                "level": 1
            },
            "bbox": [
                176,
                309,
                329,
                321
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这两个选项可以对搜索到的文件执行命令，例如重命名、删除、移动等操作。"
                    }
                ]
            },
            "bbox": [
                144,
                326,
                684,
                340
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "注意，对于应用与集合的命令，是不适合使用这两个选项的，应该使用管道通信。"
                    }
                ]
            },
            "bbox": [
                144,
                344,
                715,
                357
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-exec 选项会对每个文件单独执行命令。如果你使用 wc -l 计算每个文件的行数，你会得到每个文件的行数结果，而不是这些文件行数的总和。并且，执行 wc -l 会多次调用 wc 命令，每次处理一个文件，这对于计算所有文件的行数总和并不高效。"
                    }
                ]
            },
            "bbox": [
                144,
                363,
                847,
                414
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "要使用kill 命令来杀死这个进程。"
                    }
                ]
            },
            "bbox": [
                146,
                419,
                376,
                432
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "今天就教你怎么召唤一双眼睛出来监督你："
                    }
                ]
            },
            "bbox": [
                146,
                437,
                443,
                451
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "xeyes "
                    }
                ]
            },
            "bbox": [
                147,
                457,
                206,
                470
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "你可以使用如下命令将它放到后台运行："
                    }
                ]
            },
            "bbox": [
                146,
                475,
                428,
                488
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "nohup xeyes & "
                    }
                ]
            },
            "bbox": [
                147,
                494,
                275,
                507
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "6、ls "
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                536,
                206,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls 命令 "
                    }
                ]
            },
            "bbox": [
                146,
                596,
                196,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls [选项] [目录或是文件] "
                    }
                ]
            },
            "bbox": [
                146,
                614,
                332,
                629
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls －l 按完整格式显示目录及文件信息（权限、所有者、文件大小、修改时间、文件名）"
                    }
                ]
            },
            "bbox": [
                144,
                633,
                759,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "r－读w－写 x－执行"
                    }
                ]
            },
            "bbox": [
                163,
                652,
                314,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "owner/group/others "
                    }
                ]
            },
            "bbox": [
                164,
                671,
                319,
                684
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls －a "
                    }
                ]
            },
            "bbox": [
                147,
                690,
                191,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls －i "
                    }
                ]
            },
            "bbox": [
                147,
                708,
                186,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls －al "
                    }
                ]
            },
            "bbox": [
                147,
                727,
                196,
                738
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/7bd0d907d241733e40fe309af3ef5d42de9502f30ba2310a479f12f894b965f1.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>选项</td><td>说明</td></tr><tr><td>-a</td><td>列出目录下的所有文件，包括以.开头的隐含文件。</td></tr><tr><td>-l</td><td>列出文件的详细信息，通常称为“长格式”。</td></tr><tr><td>-d</td><td>输入参数是目录时，只显示该目录本身。</td></tr><tr><td>-A</td><td>显示除“.”和“..”外的所有文件。</td></tr><tr><td>-R</td><td>递归地列出所有子目录下的文件。</td></tr><tr><td>-h</td><td>以人类易读的单位显示文件大小。</td></tr><tr><td>-S</td><td>以文件大小排序输出。</td></tr><tr><td>-t</td><td>以时间排序输出。</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                760,
                996,
                883
            ]
        },
        {
            "type": "page_header",
            "content": {
                "page_header_content": [
                    {
                        "type": "text",
                        "content": "-name 选项"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                235,
                107
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                91,
                1000,
                334
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "文件打包与压缩"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                380,
                317,
                401
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux tar（英文全拼：tape archive ）命令用于备份文件。"
                    }
                ]
            },
            "bbox": [
                144,
                441,
                601,
                455
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tar 是 Linux 和 Unix 系统中用于归档文件和目录的强大命令行工具。"
                    }
                ]
            },
            "bbox": [
                144,
                458,
                673,
                473
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tar 名字来自 \"tape archive\"（磁带归档），最初用于将文件打包到磁带设备中，但现在广泛用于在文件系统中打包和压缩文件。"
                    }
                ]
            },
            "bbox": [
                144,
                478,
                847,
                508
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tar 通常用于将多个文件和目录打包成一个归档文件，称为 \"tarball\"（通常带有 .tar 扩展名）。"
                    }
                ]
            },
            "bbox": [
                144,
                514,
                847,
                546
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tar 本身不压缩文件，但可以与压缩工具（如 gzip 或 bzip2）结合使用，创建压缩的归档文件（如 .tar.gz 或 .tar.bz2）。"
                    }
                ]
            },
            "bbox": [
                144,
                552,
                847,
                583
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/e25f0e419c77db069019298b0f809a73e51012aff5434960f8176f1aa9b1db23.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>命令</td><td>功能</td></tr><tr><td>xz</td><td>使用 LZMA 算法的高性能压缩/解压工具</td></tr><tr><td>gzip</td><td>流行的 GNU gzip 数据压缩/解压程序</td></tr><tr><td>bzip2</td><td>免费的,无专利的高性能数据压缩工具</td></tr><tr><td>zip/unzip</td><td>与 WinZIP 兼容的压缩/解压工具</td></tr><tr><td>rar</td><td>与 WinRAR 兼容的压缩/解压工具</td></tr><tr><td>7za</td><td>使用 LZMA 算法的高性能压缩/解压工具</td></tr><tr><td>tar</td><td>文件打包、归档工具</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                588,
                998,
                898
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                89,
                1000,
                171
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/870cfd82edf8e199f805441cff66d0f3ab4d41c74dea7cd42ef8003dfd6f8f77.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>文件后缀名</td><td>说明</td></tr><tr><td>*.zip</td><td>zip 程序打包压缩的文件</td></tr><tr><td>*.rar</td><td>rar 程序压缩的文件</td></tr><tr><td>*.7z</td><td>7zip 程序压缩的文件</td></tr><tr><td>*.tar</td><td>tar 程序打包，未压缩的文件</td></tr><tr><td>*.gz</td><td>gzip 程序（GNU zip）压缩的文件</td></tr><tr><td>*.xz</td><td>xz 程序压缩的文件</td></tr><tr><td>*.bz2</td><td>bzip2 程序压缩的文件</td></tr><tr><td>*.tar.gz(.tgz)</td><td>tar 打包，gzip 程序压缩的文件</td></tr><tr><td>*.tar.xz</td><td>tar 打包，xz 程序压缩的文件</td></tr><tr><td>*.tar.bz2(.tbz)</td><td>tar 打包，bzip2 程序压缩的文件</td></tr><tr><td>*.tar.7z</td><td>tar 打包，7z 程序压缩的文件</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                146,
                205,
                690,
                569
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tar [options] -f archive.tar [files...] "
                    }
                ]
            },
            "bbox": [
                146,
                589,
                403,
                604
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-f archive.tar：指定归档文件的名称。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "[files...]：要打包的文件和目录。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                176,
                607,
                470,
                640
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "基本功能：打包和解包"
                    }
                ]
            },
            "bbox": [
                146,
                644,
                312,
                658
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式： tar [选项] 文件或者目录"
                    }
                ]
            },
            "bbox": [
                146,
                663,
                383,
                678
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "常用选项"
                    }
                ]
            },
            "bbox": [
                147,
                681,
                216,
                695
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-c：创建新的打包文件。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-t：列出打包文件的内容，查看已经打包了哪些文件。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-x：从打包文件中释放文件。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                146,
                700,
                519,
                751
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-f：指定打包文件名。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-v：详细列出 tar 处理的文件信息。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-z：用 gzip 来压缩/解压缩打包文件。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-j：用 bzip2 来压缩/解压缩打包文件。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-J：用 xz 来压缩/解压缩打包文件。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                146,
                756,
                411,
                844
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令中，-r 参数表示递归打包包含子目录的全部内容，-q 参数表示为安静模式，即不向屏幕输出信"
                    }
                ]
            },
            "bbox": [
                144,
                885,
                848,
                901
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "息，-o，表示输出文件，需在其后紧跟打包输出文件名。后面使用 du 命令查看打包后文件的大小（后面会具体说明该命令）。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                850,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ". 设置压缩级别为 9 和 1（9 最大，1 最小），重新打包："
                    }
                ]
            },
            "bbox": [
                174,
                131,
                596,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这里添加了一个参数用于设置压缩级别 -[1-9]，1 表示最快压缩但体积大，9 表示体积最小但耗时最久。最后那个 -x 是为了排除我们上一次创建的 zip 文件，否则又会被打包进这一次的压缩文件中，"
                    }
                ]
            },
            "bbox": [
                144,
                149,
                848,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "注意：这里只能使用绝对路径，否则不起作用。"
                    }
                ]
            },
            "bbox": [
                144,
                186,
                478,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用-e 参数可以创建加密压缩包："
                    }
                ]
            },
            "bbox": [
                144,
                205,
                389,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "关于zip 命令，因为 Windows 系统与Linux/Unix 在文本文件格式上的一些兼容问题，比如换行符（为不可见字符），在 Windows 为 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ \\mathsf { C R } } { + } \\mathsf { L F }"
                    },
                    {
                        "type": "text",
                        "content": "（Carriage-Return+Line-Feed：回车加换行），而在 Linux/Unix 上为 LF（换行），所以如果在不加处理的情况下，在 Linux上编辑的文本，在 Windows 系统上打开可能看起来是没有换行的。如果你想让你在 Linux创建的 zip 压缩文件在 Windows 上解压后没有任何问题，那么你还需要对命令做一些修改："
                    }
                ]
            },
            "bbox": [
                144,
                223,
                853,
                332
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "zip -r -l -o shiyanlou.zip /home/shiyanlou/Desktop "
                    }
                ]
            },
            "bbox": [
                144,
                334,
                576,
                350
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "需要加上 -l 参数将 LF 转换为 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ \\mathsf { C R } } { + } \\mathsf { L F }"
                    },
                    {
                        "type": "text",
                        "content": "来达到以上目的。"
                    }
                ]
            },
            "bbox": [
                144,
                353,
                564,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 -O（英文字母，大写 o）参数指定编码类型："
                    }
                ]
            },
            "bbox": [
                144,
                370,
                532,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "unzip -O GBK "
                    }
                ]
            },
            "bbox": [
                144,
                390,
                263,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将 shiyanlou.zip 解压到当前目录："
                    }
                ]
            },
            "bbox": [
                144,
                407,
                416,
                424
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "unzip shiyanlou.zip "
                    }
                ]
            },
            "bbox": [
                144,
                426,
                324,
                443
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用安静模式，将文件解压到指定目录："
                    }
                ]
            },
            "bbox": [
                144,
                463,
                458,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "unzip -q shiyanlou.zip -d ziptest "
                    }
                ]
            },
            "bbox": [
                144,
                483,
                426,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "上述指定目录不存在，将会自动创建。如果你不想解压只想查看压缩包的内容你可以使用-l 参数："
                    }
                ]
            },
            "bbox": [
                144,
                519,
                848,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "unzip -l shiyanlou.zip "
                    }
                ]
            },
            "bbox": [
                144,
                557,
                339,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Linux 上面更常用的是 tar 工具，tar 原本只是一个打包工具，只是同时还是实现了对7z、gzip、xz、bzip2 等工具的支持，这些压缩工具本身只能实现对文件或目录（单独压缩目录中的文件）的压缩，没有实现对文件的打包压缩，所以我们也无需再单独去学习其他几个工具，tar 的解压和压缩都是同一个命令，只需参数不同，使用比较方便。"
                    }
                ]
            },
            "bbox": [
                144,
                575,
                848,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "下面先掌握tar 命令一些基本的使用方式，即不进行压缩只是进行打包（创建归档文件）和解包的操作。"
                    }
                ]
            },
            "bbox": [
                144,
                649,
                840,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "行打包（创建归档文件）和解包的操作。"
                    }
                ]
            },
            "bbox": [
                144,
                686,
                458,
                702
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建一个 tar 包："
                    }
                ]
            },
            "bbox": [
                174,
                705,
                339,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "cd /home/shiyanlou "
                    }
                ]
            },
            "bbox": [
                144,
                722,
                332,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tar -P -cf shiyanlou.tar /home/shiyanlou/Desktop "
                    }
                ]
            },
            "bbox": [
                144,
                741,
                569,
                758
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "上面命令中，-P 保留绝对路径符，-c 表示创建一个 tar 包文件，-f 用于指定创建的文件名，注意文件名必须紧跟在 -f 参数之后，比如不能写成 tar -fc shiyanlou.tar，可以写成 tar -fshiyanlou.tar -c ~。你还可以加上-v 参数以可视的的方式输出打包的文件。"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                855,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 解包一个文件（ "
                    },
                    {
                        "type": "equation_inline",
                        "content": "- \\mathsf { X }"
                    },
                    {
                        "type": "text",
                        "content": "参数）到指定路径的已存在目录（-C 参数）："
                    }
                ]
            },
            "bbox": [
                173,
                816,
                702,
                832
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "mkdir tardir "
                    }
                ]
            },
            "bbox": [
                144,
                835,
                265,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tar -xf shiyanlou.tar -C tardir "
                    }
                ]
            },
            "bbox": [
                144,
                853,
                400,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "只查看不解包文件-t 参数："
                    }
                ]
            },
            "bbox": [
                174,
                872,
                415,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tar -tf shiyanlou.tar "
                    }
                ]
            },
            "bbox": [
                144,
                891,
                324,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "保留文件属性和跟随链接（符号链接或软链接），有时候我们使用 tar 备份文件当你在其他主机还原时希望保留文件的属性（-p 参数）和备份链接指向的源文件而不是链接本身（-h 参数）："
                    }
                ]
            },
            "bbox": [
                174,
                93,
                847,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tar -cphf etc.tar /etc "
                    }
                ]
            },
            "bbox": [
                144,
                149,
                329,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 我们只需要在创建 tar 文件的基础上添加 -z 参数，使用 gzip 来压缩文件："
                    }
                ]
            },
            "bbox": [
                173,
                167,
                774,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tar -czf shiyanlou.tar.gz /home/shiyanlou/Desktop "
                    }
                ]
            },
            "bbox": [
                144,
                186,
                576,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "解压 *.tar.gz 文件："
                    }
                ]
            },
            "bbox": [
                174,
                223,
                356,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "tar -xzf shiyanlou.tar.gz "
                    }
                ]
            },
            "bbox": [
                146,
                242,
                357,
                256
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/9cab77209bed2b92ce25cdad7400d10fead4f6ca4e4117c656a8b4be3868fc3e.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>压缩文件格式</td><td>参数</td></tr><tr><td>*.tar.gz</td><td>-z</td></tr><tr><td>*.tar.xz</td><td>-j</td></tr><tr><td>*.tar.bz2</td><td>-j</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                146,
                256,
                690,
                379
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": ". zip："
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": " 打包 ：zip something.zip something （目录请加 -r 参数）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": " 解包：unzip something.zip "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "指定路径：-d 参数"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "tar："
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": " 打包：tar -cf something.tar something "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "解包：tar -xf something.tar "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "指定路径：-C 参数"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                176,
                382,
                663,
                526
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [],
                "level": 1
            },
            "bbox": [
                144,
                531,
                186,
                545
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "压缩后 gzip 会在每个文件的后面添加扩展名 .gz。"
                    }
                ]
            },
            "bbox": [
                144,
                548,
                529,
                564
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "压缩后原文件会被自动删除。"
                    }
                ]
            },
            "bbox": [
                144,
                567,
                369,
                582
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 windows 下可以用 winzip 或 winrar 或 7-zip 解压。"
                    }
                ]
            },
            "bbox": [
                144,
                585,
                566,
                601
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用法：gzip [选项] 文件列表"
                    }
                ]
            },
            "bbox": [
                144,
                604,
                388,
                619
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "选项："
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                623,
                193,
                637
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-d: 解开压缩文件。"
                    }
                ]
            },
            "bbox": [
                144,
                640,
                289,
                656
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-f: 强行压缩文件，不理会文件名称或硬链接是否存在以及该文件是否为符号链接。"
                    }
                ]
            },
            "bbox": [
                144,
                659,
                778,
                674
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-l: 列出压缩文件的相关信息（压缩文件的大小；未压缩文件的大小；压缩比；未压缩文件的名字）。"
                    }
                ]
            },
            "bbox": [
                144,
                678,
                845,
                711
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-n: 压缩文件时，不保存原来的文件名称及时间戳（默认为保存，即-N）。"
                    }
                ]
            },
            "bbox": [
                144,
                715,
                714,
                730
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-r : 递归处理，将指定目录下的所有文件及子目录一同处理。"
                    }
                ]
            },
            "bbox": [
                144,
                734,
                608,
                749
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-t : 测试压缩文件是否正确无误。"
                    }
                ]
            },
            "bbox": [
                144,
                753,
                396,
                766
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-v : 显示指令执行过程。"
                    }
                ]
            },
            "bbox": [
                144,
                771,
                327,
                785
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-<压缩率> : 压缩率是一个介于 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\uparrow \\mathord { \\sim } 9"
                    },
                    {
                        "type": "text",
                        "content": "的数值，默认值为“6”，数值越大压缩率越高。"
                    }
                ]
            },
            "bbox": [
                144,
                789,
                788,
                804
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "--best 参数等价于-9；--fast 参数等价于-1。"
                    }
                ]
            },
            "bbox": [
                144,
                808,
                480,
                822
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "信息显示命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                827,
                255,
                841
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/6b79697229c0080a06cc9cd0396e1b09db3f3272e90f20d25155ea92a11c11bc.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>命令</td><td>功能</td></tr><tr><td>hostname</td><td>显示主机名称</td></tr><tr><td>uname</td><td>显示操作系统信息</td></tr><tr><td>dmesg</td><td>显示系统启动信息</td></tr><tr><td>lsmod</td><td>显示系统加载的内核模块</td></tr><tr><td>date</td><td>显示系统时间（cal可以显示系统时间的日历）</td></tr><tr><td>env</td><td>显示系统环境变量</td></tr><tr><td>locale</td><td>显示当前语言环境（cat /etc/sysconfig/i18n）</td></tr><tr><td>cat /etc/redhat-release</td><td>显示操作系统版本（head -1 /etc/issue）</td></tr><tr><td>cat /proc/cpuinfo</td><td>显示CPU信息</td></tr><tr><td>lspci/lsusb</td><td>显示PCI/USB接口信息</td></tr><tr><td>rpm -qa</td><td>显示系统已安装的所有软件包</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                146,
                841,
                996,
                876
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                90,
                1000,
                448
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/571e250e2912a9225496abe1932075a2964a002b3988a188b852da37e6cb6f53.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>命令</td><td>功能</td></tr><tr><td>top</td><td>显示当前系统中耗费资源最多的进程</td></tr><tr><td>free</td><td>显示当前内存的使用情况 (cat /proc/meminfo)</td></tr><tr><td>du -h</td><td>显示指定的文件（目录）已使用的磁盘空间的总量</td></tr><tr><td>df -h</td><td>显示文件系统磁盘空间的使用情况</td></tr><tr><td>uptime</td><td>显示系统运行时间、用户数、负载</td></tr><tr><td>fdisk -l</td><td>查看所有分区</td></tr><tr><td>mount</td><td>查看已经挂装的分区</td></tr><tr><td>swapon -s</td><td>查看所有交换分区</td></tr><tr><td>ps -ef</td><td>查看所有进程</td></tr><tr><td>pstree</td><td>显示进程树</td></tr><tr><td>chkconfig --list</td><td>列出所有系统服务</td></tr><tr><td>who、w</td><td>显示在线登录用户</td></tr><tr><td>whoami</td><td>显示用户自己的身份</td></tr><tr><td>tty</td><td>显示用户当前使用的终端</td></tr><tr><td>id</td><td>显示当前用户的 id 信息</td></tr><tr><td>groups</td><td>显示当前用户属于哪些组</td></tr><tr><td>last</td><td>查看用户登录日志</td></tr><tr><td>crontab -l</td><td>查看当前用户的计划任务</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                481,
                1000,
                850
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                90,
                1000,
                344
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/b76b8df221c3e71ce44dc456f0280f46cab369cbfec1d530bac6ce28a1981c09.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>命令</td><td>功能</td></tr><tr><td>ifconfig</td><td>显示网络接口信息</td></tr><tr><td>route</td><td>显示系统路由表</td></tr><tr><td>iptables -nL</td><td>显示包过滤防火墙的规则设置</td></tr><tr><td>netstat</td><td>显示网络状态信息</td></tr><tr><td>cat /etc/resolv.conf</td><td>显示DNS配置</td></tr><tr><td>cat /etc/hosts</td><td>显示静态主机解析表</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                381,
                1000,
                608
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "数据流重定向"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                649,
                314,
                671
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "你可能对重定向这个概念感到些许陌生，但你应该在前面的课程中多次见过 "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "或 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ } > > { }"
                    },
                    {
                        "type": "text",
                        "content": "操作了，并知道他们分别是将标准输出导向一个文件或追加到一个文件中。这其实就是（输出）重定向，将原本输出到标准输出的数据重定向到一个文件中，因为标准输出(/dev/stdout)本身也是一个文件，我们将命令输出导向另一个文件自然也是没有任何问题的。"
                    }
                ]
            },
            "bbox": [
                144,
                715,
                855,
                785
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "上述两个重定向是输出重定向。相应的还有 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "<"
                    },
                    {
                        "type": "text",
                        "content": "和 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "< <"
                    },
                    {
                        "type": "text",
                        "content": "两种操作，是输入重定向。"
                    }
                ]
            },
            "bbox": [
                146,
                789,
                754,
                806
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Linux 系统中默认提供了三个逻辑设备（特殊文件），用于终端的显示和输出，分别为stdin （标准输入,默认对应于终端作为输入），stdout （标准输出，默认对应于终端作为输出），stderr （标准错误输出，默认对应于终端作为输出）。"
                    }
                ]
            },
            "bbox": [
                144,
                808,
                850,
                862
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/a894eca557e32e892ff2f149c0105aa29819e05fbdf14040c30a6ddb1cd902e9.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>文件描述符</td><td>设备文件</td><td>说明</td><td>常见指向目标</td></tr><tr><td>0</td><td>/dev/stdin</td><td>标准输入</td><td>终端设备/dev/pts/1</td></tr><tr><td>1</td><td>dev/stdout</td><td>标准输出</td><td>终端设备</td></tr><tr><td>2</td><td>dev/stderr</td><td>标准错误</td><td>终端设备</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                90,
                983,
                212
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件描述符：在形式上是一个非负整数。实际上，它是一个索引值，指向内核为每一个进程所维护的记录表，表中记录该进程打开文件的信息。当进程打开一个现有文件或者创建一个新文件时，内核就会向进程返回一个文件描述符。在程序设计中，一些涉及底层的程序 编 写往往会围绕着 文 件描述符展开 。 但 是 文 件描述符这 一概念往往只 适 用 于UNIX、Linux 这样的操作系统。"
                    }
                ]
            },
            "bbox": [
                144,
                214,
                852,
                304
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "操作符 文件存在时的行为 文件不存在时的行为"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                315,
                554,
                332
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "> 覆盖原内容 创建新文件"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": ">> 追加到原内容末尾 创建新文件"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                144,
                351,
                484,
                406
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 默认使用终端的标准输入stdin 作为命令的输入和标准输出作为命令的输出："
                    }
                ]
            },
            "bbox": [
                174,
                455,
                798,
                470
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat "
                    }
                ]
            },
            "bbox": [
                146,
                475,
                176,
                487
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "（按 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { C t r l + C }"
                    },
                    {
                        "type": "text",
                        "content": "退出）"
                    }
                ]
            },
            "bbox": [
                157,
                492,
                285,
                508
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 将 cat 接收的输入又输出（heredoc 的方式）重定向到一个文件："
                    }
                ]
            },
            "bbox": [
                174,
                529,
                712,
                545
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "mkdir Documents "
                    }
                ]
            },
            "bbox": [
                146,
                548,
                300,
                561
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "Documents/test.c <<EOF "
                    }
                ]
            },
            "bbox": [
                146,
                567,
                398,
                580
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "...内容..."
                    }
                ]
            },
            "bbox": [
                147,
                585,
                213,
                599
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "EOF "
                    }
                ]
            },
            "bbox": [
                147,
                604,
                184,
                617
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "1. cat "
                            },
                            {
                                "type": "equation_inline",
                                "content": ">"
                            },
                            {
                                "type": "text",
                                "content": "Documents/test.c 表示将 cat 命令的输出重定向到 Documents/test.c文件（如果文件不存在则创建）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "1. <<EOF（输入重定向） 是 \"here document\" 语法，它表示："
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                176,
                621,
                845,
                674
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "o 开始一个多行输入"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "o 将后续所有内容作为cat 的输入"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "o 直到遇到单独一行的 EOF 为止（这个标记词可以自定义，常用 EOF 或END）"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                236,
                678,
                848,
                747
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 将一个文件作为命令的输入，标准输出作为命令的输出："
                    }
                ]
            },
            "bbox": [
                174,
                770,
                642,
                785
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c "
                    }
                ]
            },
            "bbox": [
                146,
                789,
                327,
                803
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "上述命令也可以作为查看短文件内容的方法，但是如果文件内容很长就会滚屏到最后一屏。"
                    }
                ]
            },
            "bbox": [
                144,
                825,
                845,
                841
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 将echo 命令通过管道传过来的数据作为 cat 命令的输入，将标准输出作为命令的输出："
                    }
                ]
            },
            "bbox": [
                174,
                844,
                847,
                878
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "echo 'hi' | cat "
                    }
                ]
            },
            "bbox": [
                146,
                881,
                263,
                896
            ]
        }
    ],
    [
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "1. echo 'hi' 输出字符串 hi\\n 到标准输出"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "2. 管道 | 将前一个命令的标准输出重定向为下一个命令的标准输入"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "3. cat 检测到自己没有文件名参数，于是开始读取标准输入"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "4. 将读取到的内容（hi\\n）原样输出到标准输出（终端）"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                174,
                93,
                705,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 将 echo 命令的输出从默认的标准输出重定向到一个普通文件："
                    }
                ]
            },
            "bbox": [
                174,
                186,
                690,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "echo 'hello shiyanlou' "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "redirect "
                    }
                ]
            },
            "bbox": [
                144,
                204,
                413,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat redirect "
                    }
                ]
            },
            "bbox": [
                146,
                223,
                245,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "也就是说，cat和echo都可以重定向输出"
                    }
                ]
            },
            "bbox": [
                146,
                241,
                473,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "管道默认是连接前一个命令的输出到下一个命令的输入，而重定向通常是需要一个文件来建立两个命令的连接。"
                    }
                ]
            },
            "bbox": [
                144,
                260,
                847,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "重定向标准输出到文件，这是一个很实用的操作，另一个很实用的操作是将标准错误重定向，标准输出和标准错误都被指向伪终端的屏幕显示，所以我们经常看到的一个命令的输出通常是同时包含了标准输出和标准错误的结果的。比如下面的操作："
                    }
                ]
            },
            "bbox": [
                144,
                297,
                847,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 使用 cat 命令同时读取两个文件，其中一个存在，另一个不存在"
                    }
                ]
            },
            "bbox": [
                144,
                353,
                658,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c hello.c "
                    }
                ]
            },
            "bbox": [
                146,
                372,
                384,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 你可以看到除了正确输出了前一个文件的内容，还在末尾出现了一条错误信息"
                    }
                ]
            },
            "bbox": [
                144,
                390,
                766,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 下面我们将输出重定向到一个文件"
                    }
                ]
            },
            "bbox": [
                146,
                407,
                431,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c hello.c "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "somefile "
                    }
                ]
            },
            "bbox": [
                146,
                426,
                473,
                441
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "遗憾的是，这里依然出现了那条错误信息，这正是因为如我上面说的那样，标准输出和标准错误虽然都指向终端屏幕，实际它们并不一样。那有的时候我们就是要隐藏某些错误或者警告，那又该怎么做呢。这就需要用到我们前面讲的文件描述符了："
                    }
                ]
            },
            "bbox": [
                144,
                463,
                848,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 将标准错误重定向到标准输出，再将标准输出重定向到文件，注意要将重定向到文件写到前面"
                    }
                ]
            },
            "bbox": [
                144,
                519,
                845,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c hello.c "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "somefile "
                    },
                    {
                        "type": "equation_inline",
                        "content": "2 { > } 8 1"
                    }
                ]
            },
            "bbox": [
                146,
                557,
                515,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 或者只用bash提供的特殊的重定向符号\"&\"将标准错误和标准输出同时重定向到文件"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                828,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c hello.c "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\& >"
                    },
                    {
                        "type": "text",
                        "content": "somefilehell "
                    }
                ]
            },
            "bbox": [
                146,
                594,
                514,
                607
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "注意你应该在输出重定向文件描述符前加上&,否则 shell 会当做重定向到一个文件名为 1的文件中"
                    }
                ]
            },
            "bbox": [
                144,
                612,
                847,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "方法 1：仅重定向标准错误 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "( 2 > )"
                    }
                ]
            },
            "bbox": [
                146,
                649,
                403,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c hello.c "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ { 2 > }"
                    },
                    {
                        "type": "text",
                        "content": "error.log "
                    }
                ]
            },
            "bbox": [
                146,
                668,
                484,
                684
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "方法 2：丢弃标准错误（ "
                    },
                    {
                        "type": "equation_inline",
                        "content": "2 >"
                    },
                    {
                        "type": "text",
                        "content": "/dev/null）"
                    }
                ]
            },
            "bbox": [
                146,
                686,
                453,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果不想保存错误信息，而是直接丢弃："
                    }
                ]
            },
            "bbox": [
                146,
                705,
                458,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c hello.c "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ { 2 > }"
                    },
                    {
                        "type": "text",
                        "content": "/dev/null "
                    }
                ]
            },
            "bbox": [
                146,
                724,
                487,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " /dev/null 是一个特殊设备，写入它的数据会被丢弃。"
                    }
                ]
            },
            "bbox": [
                174,
                741,
                620,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "你可能还有这样的需求，除了需要将输出重定向到文件,也需要将信息打印在终端。那么你可以使用tee命令来实现："
                    }
                ]
            },
            "bbox": [
                144,
                760,
                847,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "echo 'hello shiyanlou' | tee hello "
                    }
                ]
            },
            "bbox": [
                146,
                797,
                418,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "你应该可以看出我们前面的重定向操作都只是临时性的，即只对当前命令有效，那如何做到“永久”有效呢，比如在一个脚本中，你需要某一部分的命令的输出全部进行重定向，难道要让你在每个命令上面加上临时重定向的操作嘛，当然不需要，我们可以使用 exec命令实现“永久”重定向。exec命令的作用是使用指定的命令替换当前的 Shell，即使用一个进程替换当前进程，或者指定新的重定向："
                    }
                ]
            },
            "bbox": [
                144,
                816,
                847,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 先开启一个子 Shell"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                317,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "zsh "
                    }
                ]
            },
            "bbox": [
                146,
                112,
                179,
                126
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 使用 exec 替换当前进程的重定向，将标准输出重定向到一个文件"
                    }
                ]
            },
            "bbox": [
                144,
                130,
                668,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exec 1>somefile "
                    }
                ]
            },
            "bbox": [
                146,
                149,
                284,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 后面你执行的命令的输出都将被重定向到文件中,直到你退出当前子 shell，或取消 exec的重定向（后面将告诉你怎么做）"
                    }
                ]
            },
            "bbox": [
                144,
                167,
                848,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls "
                    }
                ]
            },
            "bbox": [
                146,
                205,
                164,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exit "
                    }
                ]
            },
            "bbox": [
                146,
                224,
                181,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat somefile "
                    }
                ]
            },
            "bbox": [
                146,
                241,
                253,
                255
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "什么没有新开终端窗口？"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                260,
                337,
                275
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": " zsh 命令的本质："
                    }
                ],
                "level": 1
            },
            "bbox": [
                174,
                279,
                341,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "它只是在当前终端中新建一个 Zsh 子进程，而不是像图形化终端（如 GNOMETerminal）那样创建一个新窗口。"
                    }
                ]
            },
            "bbox": [
                203,
                297,
                848,
                331
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "输入/输出继承："
                    }
                ],
                "level": 1
            },
            "bbox": [
                176,
                335,
                332,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "子 Shell 默认绑定到父 Shell 的同一个终端设备（如 /dev/pts/1），所以输入/输出仍在原窗口"
                    }
                ]
            },
            "bbox": [
                205,
                353,
                848,
                387
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "方法 1：检查进程层级"
                    }
                ],
                "level": 1
            },
            "bbox": [
                176,
                390,
                354,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在子 Shell 中运行："
                    }
                ]
            },
            "bbox": [
                176,
                409,
                324,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "pstree -ps $$ "
                    }
                ]
            },
            "bbox": [
                176,
                428,
                289,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Shell 中有 9 个文件描述符。上面我们使用了也是它默认提供的 0,1,2 号文件描述符。另外我们还可以使用 3-8 的文件描述符，只是它们默认没有打开而已。你可以使用下面命令查看当前Shell 进程中打开的文件描述符："
                    }
                ]
            },
            "bbox": [
                144,
                463,
                848,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cd /dev/fd/;ls -Al "
                    }
                ]
            },
            "bbox": [
                146,
                519,
                285,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "同样使用 exec 命令可以创建新的文件描述符："
                    }
                ]
            },
            "bbox": [
                144,
                556,
                502,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "zsh "
                    }
                ]
            },
            "bbox": [
                146,
                576,
                179,
                589
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exec "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { 3 > }"
                    },
                    {
                        "type": "text",
                        "content": "somefile "
                    }
                ]
            },
            "bbox": [
                146,
                594,
                284,
                607
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 先进入目录，再查看，否则你可能不能得到正确的结果，然后再回到上一次的目录"
                    }
                ]
            },
            "bbox": [
                144,
                612,
                801,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cd /dev/fd/;ls -Al;cd - "
                    }
                ]
            },
            "bbox": [
                146,
                631,
                319,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 注意下面的命令>与&之间不应该有空格，如果有空格则会出错"
                    }
                ]
            },
            "bbox": [
                144,
                649,
                648,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "echo \"this is test\" "
                    },
                    {
                        "type": "equation_inline",
                        "content": "> 8 . 3"
                    }
                ]
            },
            "bbox": [
                146,
                668,
                332,
                682
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat somefile "
                    }
                ]
            },
            "bbox": [
                146,
                687,
                252,
                700
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exit "
                    }
                ]
            },
            "bbox": [
                146,
                706,
                181,
                718
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如上面我们打开的 3 号文件描述符，可以使用如下操作将它关闭："
                    }
                ]
            },
            "bbox": [
                144,
                722,
                653,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exec "
                    },
                    {
                        "type": "equation_inline",
                        "content": "3 > 8 \\cdot"
                    },
                    {
                        "type": "text",
                        "content": "- "
                    }
                ]
            },
            "bbox": [
                146,
                743,
                231,
                756
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cd /dev/fd;ls -Al;cd - "
                    }
                ]
            },
            "bbox": [
                146,
                760,
                312,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Linux 中有一个被称为“黑洞”的设备文件,所有导入它的数据都将被“吞噬”。"
                    }
                ]
            },
            "bbox": [
                144,
                778,
                779,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在类 UNIX 系统中，/dev/null，或称空设备，是一个特殊的设备文件，它通常被用于丢弃不需要的输出流，或作为用于输入流的空文件，这些操作通常由重定向完成。读取它则会立即得到一个 EOF。"
                    }
                ]
            },
            "bbox": [
                144,
                797,
                847,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们可以利用/dev/null屏蔽命令的输出："
                    }
                ]
            },
            "bbox": [
                144,
                852,
                465,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat Documents/test.c 1>/dev/null "
                    },
                    {
                        "type": "equation_inline",
                        "content": "2 { > } 8 1"
                    }
                ]
            },
            "bbox": [
                146,
                872,
                470,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当我们需要使用apt-get安装一个软件，然后安装完成后立即运行安装的软件（或命令工"
                    }
                ]
            },
            "bbox": [
                144,
                890,
                847,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "具），"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                193,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这时你可能就会想：要是我可以一次性输入完，让它自己去依次执行各命令就好了，这就是这一小节要解决的问题。"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                847,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "简单的顺序执行可以使用;，比如上述操作可以写为："
                    }
                ]
            },
            "bbox": [
                146,
                148,
                552,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 命令顺序执行"
                    }
                ]
            },
            "bbox": [
                144,
                168,
                273,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "sudo apt-get update;sudo apt-get install some-tool;some-tool "
                    }
                ]
            },
            "bbox": [
                144,
                186,
                660,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "但是有时候这样的错误并不是直观可以判断出来的。因此需要能够有选择性的执行命令，比如上一条命令执行成功才继续下一条，或者不成功又该做出其它什么处理,比如我们使用which来查找是否安装了某个命令，如果找到就执行该命令，否则什么也不做（虽然这个操作没有什么实际意义，但可帮你更好的理解一些概念）："
                    }
                ]
            },
            "bbox": [
                144,
                204,
                847,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "which cowsay "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "/dev/null && cowsay -f head-in ohch~ "
                    }
                ]
            },
            "bbox": [
                144,
                279,
                591,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cowsay 没有是 1 有是 0"
                    }
                ]
            },
            "bbox": [
                146,
                297,
                334,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "上面命令中的 && 就是用来实现选择性执行的，它表示如果前面的命令执行结果（不是表示终端输出的内容，而是表示命令执行状态的结果）返回 0 则执行后面的命令，否则不继续执行。上一次命令的返回结果从 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\$ 7"
                    },
                    {
                        "type": "text",
                        "content": "环境变量获取."
                    }
                ]
            },
            "bbox": [
                144,
                315,
                847,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "而且还有一个 || 表示逻辑或，同样 Shell 也有一个 ||，它们的区别就在于，shell 中的这两个符号除了也可用于表示逻辑与和或之外，就是可以实现这里的命令执行顺序的简单控制。|| 在这里就是与&& 相反的控制效果，当上一条命令执行结果为 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\neq 0 ( \\$ 20)"
                    },
                    {
                        "type": "text",
                        "content": "时则执行它后面的命令："
                    }
                ]
            },
            "bbox": [
                144,
                370,
                847,
                441
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/ab750f6726b902e0fc0de54e6354b6ff90d9bafd3e35cdf5693a2fc44eeed82b.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                444,
                245,
                638
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "which cowsay>/dev/null && echo \"exist\" || echo \"not exist\" "
                    }
                ]
            },
            "bbox": [
                144,
                648,
                640,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果存在 ——echo “exists”成立，返回 0——后面那一句不成立"
                    }
                ]
            },
            "bbox": [
                144,
                668,
                642,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果不存在——echo “exists”不成立，返回 1——后面那一句成立"
                    }
                ]
            },
            "bbox": [
                144,
                686,
                655,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果二者互换"
                    }
                ]
            },
            "bbox": [
                146,
                705,
                258,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "which cowsay>/dev/null || echo \"not exist\" && echo \"exist\" "
                    }
                ]
            },
            "bbox": [
                144,
                722,
                636,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果存在——echo “not exist”不成立,返回 1——后面也不成立"
                    }
                ]
            },
            "bbox": [
                144,
                741,
                631,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果不存在—echo “not exist”成立，返回 0——后面成立"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                593,
                776
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果二者互换"
                    }
                ]
            },
            "bbox": [
                146,
                778,
                258,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "which cowsay>/dev/null || echo \"exist\" && echo \"not exist\" "
                    }
                ]
            },
            "bbox": [
                144,
                797,
                636,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "那完全就反了"
                    }
                ]
            },
            "bbox": [
                146,
                816,
                255,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果存在——echo “exists”不成立，返回 1——后面也不成立"
                    }
                ]
            },
            "bbox": [
                144,
                834,
                620,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "管道是什么？管道是一种通信机制，通常用于进程间的通信（也可通过 socket 进行网络通信），它表现出来的形式就是将前面每一个进程的输出(stdout)直接作为下一个进程的输入(stdin)。"
                    }
                ]
            },
            "bbox": [
                144,
                852,
                847,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "管道又分为匿名管道和具名管道（这里将不会讨论在源程序中使用系统调用创建并使用管道的情况，它与命令行的管道在内核中实际都是采用相同的机制）。我们在使用一些过滤程序时经常会用到的就是匿名管道，在命令行中由 | 分隔符表示， | 在前面的内容中我们已经多次使用到了。具名管道简单的说就是有名字的管道，通常只会在源程序中用到具名管道。下面我们就将通过一些常用的可以使用管道的\"过滤程序\"来帮助你熟练管道的使用。先试用一下管道，比如查看/etc 目录下有哪些文件和目录，使用ls 命令来查看：ls -al /etc"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                850,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "有太多内容，屏幕不能完全显示，这时候可以使用滚动条或快捷键滚动窗口来查看。不过这时候可以使用管道："
                    }
                ]
            },
            "bbox": [
                144,
                241,
                850,
                277
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "Is -al /etc | less "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                146,
                279,
                275,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过管道将前一个命令(ls)的输出作为下一个命令(less)的输入，然后就可以一行一行地看。"
                    }
                ]
            },
            "bbox": [
                144,
                315,
                840,
                331
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "cut命令"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                335,
                216,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "打印每一行的某一字段"
                    }
                ]
            },
            "bbox": [
                147,
                351,
                327,
                367
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "打印/etc/passwd 文件中以: 为分隔符的第 1 个字段和第 6 个字段分别表示用户名和其家目录："
                    }
                ]
            },
            "bbox": [
                147,
                370,
                847,
                405
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "cut /etc/passwd -d ':-' -f 1,6 "
                    }
                ],
                "code_language": "batch"
            },
            "bbox": [
                147,
                407,
                366,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "打印 /etc/passwd 文件中每一行的前 N 个字符："
                    }
                ]
            },
            "bbox": [
                147,
                426,
                517,
                442
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "前五个（包含第五个）"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                445,
                332,
                460
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "cut /etc/passwd -c -5 "
                    }
                ],
                "code_language": "batch"
            },
            "bbox": [
                147,
                464,
                319,
                479
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "前五个之后的（包含第五个）"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                482,
                384,
                497
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "cut /etc/passwd -c 5- "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                166,
                502,
                337,
                516
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "第五个"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                520,
                218,
                533
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "cut /etc/passwd -c 5 "
                    }
                ],
                "code_language": "batch"
            },
            "bbox": [
                147,
                539,
                315,
                552
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "2到5之间的（包含第五个）"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                557,
                381,
                571
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "cut /etc/passwd -c 2-5 "
                    }
                ],
                "code_language": "batch"
            },
            "bbox": [
                147,
                576,
                331,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "输出时，cut 直接拼接 \"one\" 和 \"three\"，不添加任何字符，所以结果是 \"onethree\"但你的测试显示输出是\"one:three\"，这说明：你的cut 版本（可能是某些定制版或不同环境）可能行为略有不同"
                    }
                ]
            },
            "bbox": [
                144,
                612,
                840,
                665
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "-d, -- delimiter=DELIM "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                668,
                337,
                682
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "作用：指定字段的分隔符（默认是 TAB 制表符）。"
                    }
                ]
            },
            "bbox": [
                144,
                686,
                534,
                701
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "-f, --fields=LIST "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                705,
                278,
                719
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "作用：选择要提取的字段（列），可以指定单个字段、多个字段或范围。"
                    }
                ]
            },
            "bbox": [
                144,
                722,
                704,
                738
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "grep 命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                784,
                258,
                806
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep（global search regular expression）是一个强大的文本搜索工具。grep 使用正则表达式搜索文本，并把匹配的行打印出来。"
                    }
                ]
            },
            "bbox": [
                144,
                863,
                848,
                898
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "UNIX 的 grep 家族包括 grep、egrep 和 fgrep："
                    }
                ]
            },
            "bbox": [
                144,
                93,
                521,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep 使用 Basic regular expression (BRE) 书写匹配模式，等效于 grep -G"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                731,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "egrep 使用 Extended regular expression (ERE) 书写匹配模式，等效于 grep -E"
                    }
                ]
            },
            "bbox": [
                144,
                130,
                769,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fgrep 不使用任何正则表达式书写匹配模式（以固定字符串对待），执行快速搜索，等效于 grep -F"
                    }
                ]
            },
            "bbox": [
                144,
                148,
                845,
                184
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在文本中或 stdin 中查找匹配字符串 grep 命令的一般形式为："
                    }
                ]
            },
            "bbox": [
                144,
                204,
                625,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep [命令选项]... 用于匹配的表达式 [文件]..."
                    }
                ]
            },
            "bbox": [
                144,
                223,
                500,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep [options] PATTERN [FILE...] "
                    }
                ]
            },
            "bbox": [
                144,
                241,
                411,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "PATTERN 是查找条件"
                    }
                ]
            },
            "bbox": [
                144,
                260,
                317,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以是普通字符串"
                    }
                ]
            },
            "bbox": [
                146,
                278,
                292,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以是正则表达式，通常用单引号将RE括起来。"
                    }
                ]
            },
            "bbox": [
                144,
                297,
                521,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "FILE 是要查找的文件，可以是用空格间隔的多个文件，也可是使用Shell的通配符在多个文件中查找PATTERN，省略时表示在标准输入中查找。"
                    }
                ]
            },
            "bbox": [
                144,
                315,
                845,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep 命令不会对输入文件进行任何修改或影响，可以使用输出重定向将结果存为文件。"
                    }
                ]
            },
            "bbox": [
                144,
                353,
                816,
                369
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/41579807cb10edeb71e1dc2fdef0de578392a54051ae55366b7f17705475bc06.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>-c</td><td>只显示匹配行的次数</td></tr><tr><td>-i</td><td>搜索时不区分大小写</td></tr><tr><td>-n</td><td>输出匹配行的行号</td></tr><tr><td>-v</td><td>输出不匹配的行（反向选择）</td></tr><tr><td>-r</td><td>对目录（子目录）的所有文件递归地进行</td></tr><tr><td>-l</td><td>列出匹配PATTERN的文件名</td></tr><tr><td>--color=auto</td><td>对匹配内容高亮显示</td></tr><tr><td>-A NUM</td><td>同时输出匹配行的后NUM行</td></tr><tr><td>-B NUM</td><td>同时输出匹配行的前NUM行</td></tr><tr><td>-C NUM</td><td>同时输出匹配行的前、后各NUM行</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                142,
                385,
                998,
                726
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep在文件中查找字符串 "
                    }
                ]
            },
            "bbox": [
                144,
                746,
                351,
                762
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep 表达式 目标文件"
                    }
                ]
            },
            "bbox": [
                144,
                764,
                329,
                781
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "grep “abc” file1 "
                    }
                ]
            },
            "bbox": [
                144,
                783,
                273,
                799
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ls –l | grep “^-r.x” "
                    }
                ]
            },
            "bbox": [
                144,
                801,
                290,
                818
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "xargs 是一条 UNIX 和类 UNIX 操作系统的常用命令。它的作用是将参数列表转换成小块分段传递给其他命令，以避免参数列表过长的问题。"
                    }
                ]
            },
            "bbox": [
                144,
                838,
                847,
                872
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这 个命令在 有些时候十分 有 用 ，特别是当用 来处理 产生大量输出 结果的命令如 fin"
                    }
                ]
            },
            "bbox": [
                144,
                875,
                847,
                891
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "d，locate 和 grep 的结果。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                359,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cut -d: -f1 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "<"
                    },
                    {
                        "type": "text",
                        "content": "/etc/passwd | sort | xargs echo "
                    }
                ]
            },
            "bbox": [
                144,
                112,
                510,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "上面这个命令用于将 /etc/passwd 文件按 : 分割取第一个字段排序后，使用 echo 命令生成一个列表。"
                    }
                ]
            },
            "bbox": [
                144,
                130,
                847,
                165
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/c332016f3d97366dab153e0bdd76c9ab7b0a5e0f3c09319fb644f4c680333012.jpg"
                },
                "table_caption": [
                    {
                        "type": "text",
                        "content": "文本分析命令"
                    }
                ],
                "table_footnote": [],
                "html": "<table><tr><td>命令</td><td>功能</td></tr><tr><td>wc</td><td>统计文本</td></tr><tr><td>sort</td><td>以行为单位对文本文件排序</td></tr><tr><td>uniq</td><td>删除文本文件中连续的重复的行</td></tr><tr><td>diff</td><td>比较两个文本文件的差异</td></tr><tr><td>diff3</td><td>比较三个文本文件的差异</td></tr><tr><td>patch</td><td>为文本文件打补丁</td></tr><tr><td>aspell</td><td>为文本文件做拼写检查（西文）</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                184,
                1000,
                530
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "wc 命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                575,
                236,
                594
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用于统计并输出一个文件中行、单词和字节的数目，比如输出 /etc/passwd 文件的统计信"
                    }
                ]
            },
            "bbox": [
                144,
                634,
                848,
                651
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "息："
                    }
                ]
            },
            "bbox": [
                147,
                653,
                176,
                668
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "wc /etc/passwd "
                    }
                ]
            },
            "bbox": [
                147,
                671,
                278,
                687
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "功能：统计文本文件的行数、字数、字符数"
                    }
                ]
            },
            "bbox": [
                147,
                690,
                487,
                706
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：wc [选项] [<文件> …]"
                    }
                ]
            },
            "bbox": [
                147,
                709,
                369,
                725
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "举例"
                    }
                ]
            },
            "bbox": [
                147,
                728,
                186,
                741
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "wc file "
                    }
                ]
            },
            "bbox": [
                147,
                746,
                218,
                760
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "wc -l file "
                    }
                ]
            },
            "bbox": [
                147,
                765,
                233,
                778
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 统计行数"
                    }
                ]
            },
            "bbox": [
                284,
                765,
                374,
                778
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "wc -w file "
                    }
                ]
            },
            "bbox": [
                147,
                784,
                240,
                797
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 统计字数"
                    }
                ]
            },
            "bbox": [
                284,
                784,
                374,
                797
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "wc -c file "
                    }
                ]
            },
            "bbox": [
                147,
                802,
                236,
                815
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 统计字符数"
                    }
                ]
            },
            "bbox": [
                284,
                802,
                391,
                816
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "wc -L file "
                    }
                ]
            },
            "bbox": [
                147,
                820,
                236,
                834
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 统计最长一行的长度"
                    }
                ]
            },
            "bbox": [
                284,
                820,
                463,
                835
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Sort 排序 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                101,
                250,
                120
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "功能：以行为单位对文件进行排序"
                    }
                ]
            },
            "bbox": [
                144,
                161,
                415,
                175
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：sort [选项] [<文件> …]"
                    }
                ]
            },
            "bbox": [
                146,
                179,
                378,
                195
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "选项 "
                    }
                ]
            },
            "bbox": [
                147,
                198,
                186,
                212
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/f48e7aba1abf58194d61662073a98f73ff4a72e9f631262dd5a7e05fb6165ceb.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>-r</td><td>逆向排序</td></tr><tr><td>-f</td><td>忽略字母的大小写</td></tr><tr><td>-n</td><td>根据字符串的数值进行排序</td></tr><tr><td>-u</td><td>对相同的行只输出一行</td></tr><tr><td>-t c</td><td>选项使用c做为列的间隔符</td></tr><tr><td>-b</td><td>忽略前导的空格</td></tr><tr><td>-i</td><td>只考虑可打印字符</td></tr><tr><td>-k N</td><td>以第N列进行排序（默认以空格或制表符作为列的间隔符）</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                250,
                1000,
                520
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认为字典排序："
                    }
                ]
            },
            "bbox": [
                144,
                541,
                282,
                555
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat /etc/passwd | sort "
                    }
                ]
            },
            "bbox": [
                146,
                560,
                332,
                575
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "反转排序："
                    }
                ]
            },
            "bbox": [
                146,
                596,
                228,
                611
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat /etc/passwd | sort -r "
                    }
                ]
            },
            "bbox": [
                146,
                615,
                351,
                631
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "按特定字段排序："
                    }
                ]
            },
            "bbox": [
                147,
                634,
                282,
                648
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat /etc/passwd | sort -t':' -k 3 "
                    }
                ]
            },
            "bbox": [
                147,
                652,
                396,
                668
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "上面的 -t 参数用于指定字段的分隔符，这里是以\":\"作为分隔符；-k 字段号 用于指定对哪一个字段进行排序。这里 /etc/passwd 文件的第三个字段为数字，默认情况下是以字典序排序的，如果要按照数字排序就要加上-n 参数："
                    }
                ]
            },
            "bbox": [
                144,
                688,
                847,
                741
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat /etc/passwd | sort -t':' -k 3 -n "
                    }
                ]
            },
            "bbox": [
                146,
                745,
                416,
                760
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "uniq 命令可以用于过滤或者输出重复行。"
                    }
                ]
            },
            "bbox": [
                146,
                764,
                463,
                778
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "过滤重复行"
                    }
                ]
            },
            "bbox": [
                176,
                782,
                300,
                797
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "History 命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                101,
                290,
                122
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们可以使用 history 命令查看最近执行过的命令（实际为读取${SHELL}_history 文件,如我们环境中的~/.zsh_history 文件），不过你可能只想查看使用了哪个命令而不需要知道具体干了什么，那么你可能就会要想去掉命令后面的参数然后去掉重复的命令："
                    }
                ]
            },
            "bbox": [
                144,
                161,
                848,
                214
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "history | cut -c 8- | cut -d ' ' -f 1 | uniq "
                    }
                ]
            },
            "bbox": [
                146,
                216,
                463,
                233
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "然后经过层层过滤，你会发现确是只输出了执行的命令那一列，不过去重效果好像不明显仔细看你会发现它确实去重了，只是不那么明显，之所以不明显是因为uniq命令只能去连续重复的行，不是全文去重，所以要达到预期效果，我们先排序："
                    }
                ]
            },
            "bbox": [
                144,
                253,
                848,
                306
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "history | cut -c 8- | cut -d ' ' -f 1 | sort | uniq "
                    }
                ]
            },
            "bbox": [
                144,
                309,
                515,
                326
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 或者"
                    }
                ]
            },
            "bbox": [
                146,
                328,
                203,
                343
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "history | cut -c 8- | cut -d ' ' -f 1 | sort -u "
                    }
                ]
            },
            "bbox": [
                146,
                346,
                478,
                362
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这就是 Linux/UNIX 哲学吸引人的地方，大繁至简，一个命令只干一件事却能干到最好。"
                    }
                ]
            },
            "bbox": [
                144,
                382,
                826,
                399
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "输出重复行"
                    }
                ]
            },
            "bbox": [
                176,
                401,
                302,
                417
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 输出重复过的行（重复的只输出一个）及重复次数"
                    }
                ]
            },
            "bbox": [
                144,
                420,
                554,
                436
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "history | cut -c 8- | cut -d ' ' -f 1 | sort | uniq -dc "
                    }
                ]
            },
            "bbox": [
                146,
                439,
                544,
                455
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 输出所有重复的行"
                    }
                ]
            },
            "bbox": [
                147,
                458,
                307,
                472
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "history | cut -c 8- | cut -d ' ' -f 1 | sort | uniq -D "
                    }
                ]
            },
            "bbox": [
                146,
                476,
                536,
                492
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "没有 sort 则会重复"
                    }
                ]
            },
            "bbox": [
                147,
                495,
                297,
                510
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "比较 compare"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                537,
                302,
                558
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cmp 发现第一处不同停止"
                    }
                ]
            },
            "bbox": [
                144,
                634,
                351,
                650
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "comm 显示两个文件的相同与不同之处"
                    }
                ]
            },
            "bbox": [
                146,
                653,
                455,
                668
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "diff 按行比较不同，显示所有不同的行的信息"
                    }
                ]
            },
            "bbox": [
                146,
                671,
                500,
                687
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "文本文件处理命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                697,
                339,
                717
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令"
                    }
                ]
            },
            "bbox": [
                157,
                843,
                198,
                859
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "功能"
                    }
                ]
            },
            "bbox": [
                428,
                844,
                468,
                859
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/80e9377ee346461d91cfdc3a27d310dd31de2b0926d0ccbbaf3bf8562c2f3c0e.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>tr</td><td>字符替换</td></tr><tr><td>sed</td><td>流编辑器，常用于字符串替换</td></tr><tr><td>paste</td><td>纵向合并多个文本</td></tr><tr><td>expand</td><td>将文件中的制表符转换为空格</td></tr><tr><td>unexpand</td><td>将文件中的空格转换为制表符</td></tr><tr><td>dos2unix</td><td>将 DOS 格式的文本转换成 UNIX 格式</td></tr><tr><td>unix2dos</td><td>将 UNIX 格式的文本转换成 DOS 格式</td></tr><tr><td>iconv</td><td>将文本从一种编码转换成另一种编码</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                90,
                1000,
                476
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Sed 命令"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                480,
                221,
                494
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "sed 是一个流编辑器（stream editor）。sed 是一个非交互式的行编辑器，它在命令行中输入编辑命令、指定被处理的输入文件，然后在屏幕上查看输出。输入文件可以是指定的文件名，也可以来自一个管道的 输出。"
                    }
                ]
            },
            "bbox": [
                146,
                497,
                848,
                550
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "与vi 不同的是 sed 能够过滤来自管道的输入。在 sed 编辑器运行的时候不必人工干涉，所以 sed 常常被称作批编辑器 。"
                    }
                ]
            },
            "bbox": [
                146,
                552,
                848,
                587
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "sed 默认不改变输入文件的内容，且总是将处理结果输出到标准输出，可以使用输出重定向将sed 的输出保存到文件中。"
                    }
                ]
            },
            "bbox": [
                144,
                590,
                847,
                624
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "格式"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                646,
                188,
                659
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "sed [选项] [-e] cmd1 [[-e cmd2] ... [-e cmdn]] [input-file]... "
                    }
                ]
            },
            "bbox": [
                146,
                664,
                613,
                681
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "说明"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                683,
                188,
                697
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在命令行上执行sed编辑命令。可以指定多个编辑命令，每个编辑命令前都要使用 -e 参数，sed 将对这些编辑命令依次进行处理。若只有一个编辑命令时，-e 可以省略。"
                    }
                ]
            },
            "bbox": [
                144,
                701,
                855,
                734
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每个sed的编辑命令cmdX均应使用单引号括起来。"
                    }
                ]
            },
            "bbox": [
                146,
                738,
                547,
                753
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "input-file：sed 处理的文件列表，若省略，sed 将从标准输入中读取输入，也可以从输入重定向或管道获得输入。"
                    }
                ]
            },
            "bbox": [
                144,
                757,
                848,
                791
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "选项 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                795,
                186,
                809
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-r：使用扩展正则表达式进行模式匹配"
                    }
                ]
            },
            "bbox": [
                146,
                813,
                447,
                828
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-i：直接对输入文件进行sed的命令操作"
                    }
                ]
            },
            "bbox": [
                146,
                831,
                463,
                846
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "iconv 命令"
                    }
                ]
            },
            "bbox": [
                146,
                850,
                233,
                864
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "功能：将文件从一种编码转换成另一种编码"
                    }
                ]
            },
            "bbox": [
                144,
                868,
                485,
                883
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：iconv [选项] <输入文件>"
                    }
                ]
            },
            "bbox": [
                146,
                887,
                394,
                902
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "选项 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                93,
                188,
                108
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-f <encoding> : 指定原始文本编码。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-t <encoding> : 指定要转换的编码。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-o <output file> : 指定输出文件，而不是在标准输出上显示。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-l : 列出所有已知编码字符集。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                146,
                112,
                616,
                183
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "进程管理"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                225,
                258,
                248
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "首先程序与进程是什么？程序与进程又有什么区别？"
                    }
                ]
            },
            "bbox": [
                144,
                292,
                549,
                307
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "程序（program）：程序就是执行一系列有逻辑、有顺序结构的指令序列，可以实现某个功能。"
                    }
                ]
            },
            "bbox": [
                144,
                310,
                845,
                344
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "进 程（process） ： 进 程 是 程 序 在 一 个 数据集合上 的 一次 执行过程 ， 在早 期的UNIX、Linux 2.4 及更早的版本中，它是系统进行资源分配和调度的独立基本单位。"
                    }
                ]
            },
            "bbox": [
                144,
                347,
                845,
                381
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "就像做一道菜的菜谱（程序），当厨师按照这个菜谱（程序），把原材料（输入数据）进行加工和处理（洗、切、搅拌、煎、炒、烹、炸等），然后得到了一道菜（输出结果）。"
                    }
                ]
            },
            "bbox": [
                144,
                385,
                847,
                419
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这就是程序的一次执行，就是进程。当执行完毕的时候，进程就结束了。可见，程序是静态的，而进程是动态的。"
                    }
                ]
            },
            "bbox": [
                144,
                422,
                847,
                456
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "简单来说，程序是为了完成某种任务而设计的软件，比如 vim 是程序。什么是进程呢？进程就是把程序执行一次。"
                    }
                ]
            },
            "bbox": [
                144,
                458,
                847,
                493
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "程序只是一系列指令的集合，是一个静止的实体，而进程不同，进程有以下的特性："
                    }
                ]
            },
            "bbox": [
                144,
                495,
                794,
                512
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "动态性：进程的实质是一次程序执行的过程，有创建、撤销等状态的变化。而程序是一个静态的实体。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "并发性：进程可以做到在一个时间段内，有多个程序在运行中。程序只是静态的实体，所以不存在并发性。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "独立性：进程可以独立分配资源，独立接受调度，独立地运行。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "异步性：进程以不可预知的速度向前推进。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "结构性：进程拥有代码段、数据段、PCB（进程控制块，进程存在的唯一标志）。也正是因为有结构性，进程才可以做到独立地运行。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                174,
                514,
                845,
                659
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "并发：在一个时间段内，宏观来看有多个程序都在活动，有条不紊的执行（每一瞬间只有一个在执行，只是在一段时间有多个程序都执行过）"
                    }
                ]
            },
            "bbox": [
                144,
                663,
                847,
                696
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "并行：在每一个瞬间，都有多个程序都在同时执行，这个必须有多个 CPU 才行"
                    }
                ]
            },
            "bbox": [
                144,
                700,
                759,
                715
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "引入进程是因为传统意义上的程序已经不足以描述 OS 中各种活动之间的动态性、并发性、独立性还有相互制约性。程序就像一个公司，只是一些证书，文件的堆积（静态实体）。"
                    }
                ]
            },
            "bbox": [
                144,
                718,
                853,
                753
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "而当公司运作起来就有各个部门的区分，财务部，技术部，销售部等等，就像各个进程，各个部门之间可以独立运做，也可以有交互（独立性、并发性）。"
                    }
                ]
            },
            "bbox": [
                144,
                756,
                838,
                789
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "而随着程序的发展越做越大，又会继续细分，从而引入了线程的概念，当代多数操作系统Linux 2.6 及更新的版本中，进程本身不是基本运行单位，而是线程的容器。就像上述所说的，每个部门又会细分为各个工作小组（线程），而工作小组需要的资源需要向上级（进程）申请。"
                    }
                ]
            },
            "bbox": [
                144,
                791,
                847,
                863
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "线程（thread）是操作系统能够进行运算调度的最小单位。它被包含在进程之中，是进程中的实际运作单位。一条线程指的是进程中一个单一顺序的控制流，一个进程中可以并发"
                    }
                ]
            },
            "bbox": [
                144,
                866,
                847,
                901
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "多个线程，每条线程并行执行不同的任务。因为线程中几乎不包含系统资源，所以执行更快、更有效率。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                850,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "简而言之,一个程序至少有一个进程,一个进程至少有一个线程。线程的划分尺度小于进程，使得多线程程序的并发性高。另外，进程在执行过程中拥有独立的内存单元，而多个线程共享内存，从而极大地提高了程序的运行效率。就如下图所示："
                    }
                ]
            },
            "bbox": [
                144,
                130,
                850,
                184
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "大概明白进程是个什么样的存在后，我们需要进一步了解的就是进程分类。可以从两个角度来分："
                    }
                ]
            },
            "bbox": [
                144,
                204,
                850,
                237
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "以进程的功能与服务的对象来分；"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "： 以应用程序的服务类型来分；"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                174,
                241,
                465,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "第一个角度来看，我们可以分为用户进程与系统进程："
                    }
                ]
            },
            "bbox": [
                144,
                279,
                564,
                294
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "用户进程：通过执行用户程序、应用程序或称之为内核之外的系统程序而产生的进程，此类进程可以在用户的控制下运行或关闭。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "系统进程：通过执行系统内核程序而产生的进程，比如可以执行内存资源分配和进程切换等相对底层的工作；而且该进程的运行不受用户的干预，即使是 root 用户也不能干预系统进程的运行。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                174,
                297,
                845,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "第二角度来看，我们可以将进程分为交互进程、批处理进程、守护进程"
                    }
                ]
            },
            "bbox": [
                144,
                390,
                699,
                405
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "交互进程：由一个 Shell 终端启动的进程，在执行过程中，需要与用户进行交互操作，可以运行于前台，也可以运行在后台。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "批处理进程：该进程是一个进程集合，负责按顺序启动其他的进程。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "守护进程：守护进程是一直运行的一种进程，在 Linux 系统启动时启动，在系统关闭时终止。它们独立于控制终端并且周期性的执行某种任务或等待处理某些发生的事件。例如 httpd 进程，一直处于运行状态，等待用户的访问。还有经常用的 计划 任 务 进 程 cron（crond） 和 anacron（anacrond） ， 这 个 进 程 是守护进 程（daemon），可以按照计划周期性的执行用户设定的某些任务。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                174,
                407,
                847,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "关于父进程与子进程便会提及这两个系统调用 fork() 与 exec()"
                    }
                ]
            },
            "bbox": [
                144,
                557,
                626,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fork-exec 是由 Dennis M. Ritchie 创造的"
                    }
                ]
            },
            "bbox": [
                144,
                575,
                477,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fork() 是一个系统调用（system call），它的主要作用就是为当前的进程创建一个新的进程，这个新的进程就是它的子进程，这个子进程除了父进程的返回值和 PID 以外其他的都一模一样，如进程的执行代码段，内存信息，文件描述，寄存器状态等等"
                    }
                ]
            },
            "bbox": [
                144,
                594,
                848,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exec() 也是系统调用，作用是切换子进程中的执行程序也就是替换其从父进程复制过来的代码段与数据段"
                    }
                ]
            },
            "bbox": [
                144,
                649,
                848,
                682
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "既然子进程是通过父进程而衍生出来的，那么子进程的退出与资源的回收定然与父进程有很大的相关性。当一个子进程要正常的终止运行时，或者该进程结束时它的主函数 main()会执行 exit(n); 或者 return n，这里的返回值 n 是一个信号，系统会把这个 SIGCHLD 信号传给其父进程，当然若是异常终止也往往是因为这个信号。"
                    }
                ]
            },
            "bbox": [
                144,
                686,
                848,
                756
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在将要结束的时候，子进程代码部分已经结束执行了，系统的资源也基本归还给系统了，但若是其进程的进程控制块（PCB）仍驻留在内存中，代表这个进程还存在（因为 PCB 就是进程存在的唯一标志，里面有 PID 等信息），并没有消亡，这样的进程称之为僵尸进程（Zombie）。"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                848,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "正常情况下，父进程会收到两个返回值：exit code（SIGCHLD 信号）与 reason fortermination（结束原因） 。之后，父进程会使用系统调用wait(&status) 获取子进程的退出状态，然后内核从内存中释放已结束子进程的 PCB；而如若父进程没有这么做的话，子进程的 PCB 就会一直驻留在内存中，一直留在系统中成为僵尸进程（Zombie）。"
                    }
                ]
            },
            "bbox": [
                144,
                834,
                848,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "虽然僵尸进程是已经放弃了几乎所有内存空间，没有任何可执行代码，也不能被调度，仅在进程列表中保留一个位置，记载该进程的退出状态等信息供其父进程收集，从而释放它但是 Linux 系统中能使用的 PID 是有限的，如果系统中存在有大量的僵尸进程，系统将会因为没有可用的 PID 从而导致不能产生新的进程。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                850,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "另外如果父进程结束（非正常的结束），未能及时收回子进程，子进程仍在运行，这样的子进程称之为孤儿进程。在 Linux 系统中，孤儿进程一般会被 init 进程所“收养”，成为init 的子进程。由 init 来做善后处理，所以它并不至于像僵尸进程那样无人问津，不管不顾，僵尸进程大量存在会有危害。"
                    }
                ]
            },
            "bbox": [
                144,
                167,
                850,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "进程 0 是系统引导时创建的一个特殊进程，也称之为内核初始化，其最后一个动作就是调用fork() 创建出一个子进程运行 /sbin/init 可执行文件,而该进程就是 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { P I D } { = } 1"
                    },
                    {
                        "type": "text",
                        "content": "的进程 1，而进程 0 就转为交换进程（也被称为空闲进程），进程 1 （init 进程）是第一个用户态的进程，再由它不断调用 fork() 来创建系统里其他的进程，所以它是所有进程的父进程或者祖先进程。同时它是一个守护程序，直到计算机关机才会停止。"
                    }
                ]
            },
            "bbox": [
                144,
                241,
                850,
                332
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每一个进程都会是一个进程组的成员，而且这个进程组是唯一存在的，他们是依靠PGID（process group ID）来区别的，而每当一个进程被创建的时候，它便会成为其父进程所在组中的一员。"
                    }
                ]
            },
            "bbox": [
                144,
                334,
                850,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一般情况，进程组的 PGID 等同于进程组的第一个成员的 PID，并且这样的进程称为该进程组的领导者,也就是领导进程，进程一般通过使用 getpgrp() 系统调用来寻找其所在组的PGID，领导进程可以先终结，此时进程组依然存在，并持有相同的 PGID，直到进程组中最后一个进程终结。"
                    }
                ]
            },
            "bbox": [
                144,
                388,
                850,
                461
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "与进程组类似，每当一个进程被创建的时候，它便会成为其父进程所在 Session（会话）中的一员，每一个进程组都会在一个 Session 中，并且这个 Session 是唯一存在的，"
                    }
                ]
            },
            "bbox": [
                146,
                463,
                842,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Session 主要是针对一个 tty 建立，Session 中的每个进程都称为一个工作(job)。每个会话可以连接一个终端(control terminal)。当控制终端有输入输出时，都传递给该会话的前台进程组。Session 意义在于将多个 jobs 囊括在一个终端，并取其中的一个 job 作为前台，来直接接收该终端的输入输出以及终端信号。 其他 jobs 在后台运行。"
                    }
                ]
            },
            "bbox": [
                144,
                501,
                848,
                573
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "前台（foreground）就是在终端中运行，能够与用户进行输入和输出的交互"
                    }
                ]
            },
            "bbox": [
                146,
                575,
                742,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "后台（background）就是在终端中运行，但是不能与其进行任何的交互，也不会显示其执行的过程"
                    }
                ]
            },
            "bbox": [
                144,
                593,
                848,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们都知道当一个进程在前台运作时我们可以用 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { c t r l } + \\mathsf { c }"
                    },
                    {
                        "type": "text",
                        "content": "来终止它，但是若是在后台的话就不行了。"
                    }
                ]
            },
            "bbox": [
                144,
                630,
                848,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们可以通过& 这个符号，让我们的命令在后台中运行"
                    }
                ]
            },
            "bbox": [
                146,
                667,
                579,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ll & "
                    }
                ]
            },
            "bbox": [
                147,
                686,
                179,
                700
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "图中所显示的 [1] 236 分别是该 job 的 job number 与该进程的 PID，而最后一行的 Done表示该命令已经在后台执行完毕。"
                    }
                ]
            },
            "bbox": [
                144,
                705,
                850,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "还可以通过 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { c t r l } + \\mathsf { z }"
                    },
                    {
                        "type": "text",
                        "content": "使当前工作停止并调到后台中去。"
                    }
                ]
            },
            "bbox": [
                144,
                741,
                557,
                758
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "被停止并放置在后台的工作可以使用jobs命令查看。（这里的描述有问题，应该是放置在后台的工作，因为在后台运行的工作也可以）"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                850,
                795
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "jobs "
                    }
                ]
            },
            "bbox": [
                147,
                797,
                188,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "其中第一列显示的为被放置后台 job 的编号，而第二列的 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "+"
                    },
                    {
                        "type": "text",
                        "content": "表示最近(刚刚、最后)被放置后台的 job，同时也表示预设的工作，也就是若是有什么针对后台 job 的操作，首先对预设的 job，- 表示倒数第二（也就是在预设之前的一个）被放置后台的工作，倒数第三个（再之前的）以后都不会有这样的符号修饰，第三列表示它们的状态，而最后一列表示该进程执行的命令。"
                    }
                ]
            },
            "bbox": [
                144,
                816,
                850,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以通过 fg 命令将后台的工作调到前台来。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                482,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#后面不加参数提取预设工作，加参数提取指定工作的编号"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                601,
                126
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#ubuntu 在 zsh 中需要 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\%"
                    },
                    {
                        "type": "text",
                        "content": "，在 bash 中不需要 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\%"
                    }
                ]
            },
            "bbox": [
                144,
                131,
                527,
                143
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fg [%jobnumber] "
                    }
                ]
            },
            "bbox": [
                144,
                149,
                292,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "之前通过ctrl + z 使得工作停止放置在后台，若是想让其在后台运作，可以使用如下命令："
                    }
                ]
            },
            "bbox": [
                144,
                167,
                836,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#与fg类似，加参则指定，不加参则取预设"
                    }
                ]
            },
            "bbox": [
                144,
                186,
                487,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "bg [%jobnumber] "
                    }
                ]
            },
            "bbox": [
                144,
                205,
                295,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "既然有方法将被放置在后台的工作提至前台或者让它从停止变成继续在后台运行，当然也有方法删除一个工作，或者重启等等。"
                    }
                ]
            },
            "bbox": [
                144,
                223,
                845,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#kill的使用格式如下"
                    }
                ]
            },
            "bbox": [
                144,
                260,
                312,
                274
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "kill -signal %jobnumber "
                    }
                ]
            },
            "bbox": [
                144,
                279,
                344,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#signal 从 1-64 个信号值可以选择，可以这样查看"
                    }
                ]
            },
            "bbox": [
                144,
                315,
                539,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "kill -l "
                    }
                ]
            },
            "bbox": [
                146,
                334,
                189,
                347
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "中常用的有这些信号值："
                    }
                ]
            },
            "bbox": [
                146,
                351,
                334,
                367
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/89c8d5cbdc19bea29d09a83771389397c5955aa261766636fee8795c8f5f5cfc.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>信号值</td><td>作用</td></tr><tr><td>-1</td><td>重新读取参数运行，类似与restart</td></tr><tr><td>-2</td><td>如同ctrl+c的操作退出</td></tr><tr><td>-9</td><td>强制终止该任务</td></tr><tr><td>-15</td><td>正常的方式终止该任务</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                369,
                763,
                521
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "注意"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                523,
                186,
                537
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若是在使用 kill+信号值+pid，将会对 pid 对应的进程进行操作"
                    }
                ]
            },
            "bbox": [
                144,
                541,
                630,
                556
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若是在使用 kill+信号值 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "+ \\%"
                    },
                    {
                        "type": "text",
                        "content": "jobnumber，这时所操作的对象是 job，这个数字就是就当前bash 中后台的运行的 job 的 ID"
                    }
                ]
            },
            "bbox": [
                144,
                558,
                845,
                593
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "kill -9 3 # 终止 3 号进程，pid "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ { = 3 }"
                    }
                ]
            },
            "bbox": [
                144,
                596,
                416,
                612
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "kill "
                    },
                    {
                        "type": "equation_inline",
                        "content": "- 9 \\% 3"
                    },
                    {
                        "type": "text",
                        "content": "# 终止 3 号 job，job "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\therefore d = 3"
                    }
                ]
            },
            "bbox": [
                144,
                615,
                440,
                631
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不管在测试的时候、在实际的生产环境中，还是自己的使用过程中，难免会遇到一些进程异常的情况，所以 Linux 为我们提供了一些工具来查看进程的状态信息。我们可以通过top 实时的查看进程的状态，以及系统的一些信息（如 CPU、内存信息等），我们还可以通过ps 来静态查看当前的进程信息，同时我们还可以使用 pstree 来查看当前活跃进程的树形结构。"
                    }
                ]
            },
            "bbox": [
                144,
                633,
                847,
                722
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "top 工具是我们常用的一个查看工具，能实时的查看我们系统的一些关键信息的变化:"
                    }
                ]
            },
            "bbox": [
                144,
                726,
                805,
                741
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "top "
                    }
                ]
            },
            "bbox": [
                146,
                746,
                178,
                760
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "top 是一个在前台执行的程序，所以执行后便进入到这样的一个交互界面，正是因为交互界面我们才可以实时的获取到系统与进程的信息。在交互界面中我们可以通过一些指令来操作和筛选。在此之前我们先来了解显示了哪些信息。"
                    }
                ]
            },
            "bbox": [
                144,
                763,
                847,
                816
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "load average 在 wikipedia 中的解释是 the system load is a measure of the amount ofwork that a computer system is doing 也就是对当前 CPU 工作量的度量，具体来说也就是指运行队列的平均长度，也就是等待 CPU 的平均进程数相关的一个计算值。"
                    }
                ]
            },
            "bbox": [
                144,
                819,
                847,
                871
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这是单个 CPU 单核的情况，而实际生活中我们需要将得到的这个值除以我们的核数来看。"
                    }
                ]
            },
            "bbox": [
                144,
                873,
                836,
                890
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们可以通过以下的命令来查看 CPU 的个数与核心数"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                566,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#查看物理CPU的个数"
                    }
                ]
            },
            "bbox": [
                146,
                112,
                327,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#cat /proc/cpuinfo |grep \"physical id\"|sort |uniq|wc -l "
                    }
                ]
            },
            "bbox": [
                144,
                130,
                603,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#每个 cpu 的核心数"
                    }
                ]
            },
            "bbox": [
                144,
                167,
                307,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "cat /proc/cpuinfo |grep \"physical id\"|grep \"0\"|wc -l "
                    }
                ]
            },
            "bbox": [
                144,
                186,
                574,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过上面的指数我们可以得知 load 的临界值为 1 ，但是在实际生活中，比较有经验的运维或者系统管理员会将临界值定为 0.7。这里的指数都是除以核心数以后的值，不要混淆了"
                    }
                ]
            },
            "bbox": [
                144,
                222,
                847,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通常我们都会先看 15 分钟的值来看这个大体的趋势，然后再看 5 分钟的值对比来看是否有下降的趋势。"
                    }
                ]
            },
            "bbox": [
                144,
                278,
                847,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看busybox 的代码可以知道，数据是每5 秒钟就检查一次活跃的进程数，然后计算出该值，然后 load 从 /proc/loadavg 中读取的。而这个 load 的值是如何计算的呢，这是 load的计算的源码"
                    }
                ]
            },
            "bbox": [
                144,
                315,
                847,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "CPU 利用率是对一个时间段内 CPU 使用状况的统计，通过这个指标可以看出在某一个时间段内 CPU 被占用的情况，而 Load Average 是 CPU 的 Load，它所包含的信息不是 CPU的使用率状况，而是在一段时间内 CPU 正在处理以及等待 CPU 处理的进程数情况统计信息，这两个指标并不一样。"
                    }
                ]
            },
            "bbox": [
                144,
                407,
                847,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "NICE 值叫做静态优先级，是用户空间的一个优先级值，其取值范围是-20 至 19。这个值越小，表示进程”优先级”越高，而值越大“优先级”越低。nice 值中的 -20 到 19，中-20 优先级最高， 0 是默认的值，而 19 优先级最低"
                    }
                ]
            },
            "bbox": [
                144,
                482,
                847,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "PR 值表示Priority 值叫动态优先级，是进程在内核中实际的优先级值，进程优先级的取值范围是通过一个宏定义的，这个宏的名称是 MAX_PRIO，它的值为 140。Linux 实际上实现了 140 个优先级范围，取值范围是从 0-139，这个值越小，优先级越高。而这其中的 0 -99 是实时进程的值，而 100 - 139 是给用户的。"
                    }
                ]
            },
            "bbox": [
                144,
                538,
                847,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "其中 PR 中的 100 to 139 值部分有这么一个对应 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { P R } = 2 0 + ( - 2 0 \\mathsf { t o } + 1 9 )"
                    },
                    {
                        "type": "equation_inline",
                        "content": "+ 1 9 )"
                    },
                    {
                        "type": "text",
                        "content": "，这里的 -20 to"
                    },
                    {
                        "type": "equation_inline",
                        "content": "+ 1 9"
                    },
                    {
                        "type": "text",
                        "content": "便是 nice 值，所以说两个虽然都是优先级，而且有千丝万缕的关系，但是他们的值，他们的作用范围并不相同"
                    }
                ]
            },
            "bbox": [
                144,
                612,
                847,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "** VIRT **任务所使用的虚拟内存的总数，其中包含所有的代码，数据，共享库和被换出swap 空间的页面等所占据空间的总数"
                    }
                ]
            },
            "bbox": [
                144,
                667,
                847,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ps 也是我们最常用的查看进程的工具之一，我们通过这样的一个命令来了解一下，他能给我带来哪些信息"
                    }
                ]
            },
            "bbox": [
                144,
                705,
                847,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ps aux "
                    }
                ]
            },
            "bbox": [
                146,
                743,
                205,
                758
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过pstree 可以很直接的看到相同的进程数量，最主要的还是我们可以看到所有进程之间的相关性。"
                    }
                ]
            },
            "bbox": [
                144,
                787,
                840,
                841
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在Linux进程概念实验中讲述了进程如何衍生，进程之间的相关性，这里先回顾一下，当一个进程结束的时候或者要异常结束的时候，会向其父进程返回一个或者接收一个"
                    }
                ]
            },
            "bbox": [
                144,
                866,
                847,
                902
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SIGHUP 信号而做出的结束进程或者其他的操作，这个 SIGHUP 信号不仅可以由系统发送，我们可以使用 kill 来发送这个信号来操作进程的结束或者重启等等。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                857,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "已经尝试过使用 kill 命令可以管理一些 job，这里尝试用 kill 来直接对进程的 pid 操作，但是前提是要知道进程的 pid。"
                    }
                ]
            },
            "bbox": [
                144,
                130,
                850,
                165
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#首先在桌面找到并打开 gedit、gvim，用 ps 可以查看到"
                    }
                ]
            },
            "bbox": [
                144,
                168,
                596,
                184
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ps aux "
                    }
                ]
            },
            "bbox": [
                146,
                187,
                206,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#使用 9 这个信号强制结束 gedit 进程"
                    }
                ]
            },
            "bbox": [
                144,
                223,
                443,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "kill -9 1608 "
                    }
                ]
            },
            "bbox": [
                146,
                241,
                240,
                255
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们在使用 ps 命令的时候可以看到大部分的进程都是处于休眠的状态 S，如果这些进程都被唤醒，那么该谁最先享受 CPU 的服务，后面的进程又该是一个什么样的顺序呢？进程调度的队列又该如何去排列呢？"
                    }
                ]
            },
            "bbox": [
                144,
                260,
                848,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "需要靠该进程的优先级值来判定进程调度的优先级，而优先级的值就是上文所提到的 PR与nice 来控制与体现了。"
                    }
                ]
            },
            "bbox": [
                144,
                334,
                848,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "nice 的值可以通过 nice 命令来修改的，而需要注意的是 nice 值可以调整的范围是 -20 ~19。 root 账户既可以调整自己的进程也可以调整其他用户的程序，并且是所有的值都可以用，而普通用户只可以调制属于自己的进程，并且其使用的范围只能是 0 ~ 19，因为系统为了避免一般用户抢占系统资源而设置的一个限制。"
                    }
                ]
            },
            "bbox": [
                144,
                390,
                850,
                461
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#这个实验在环境中无法做，因为权限不够，可以自己在本地尝试"
                    }
                ]
            },
            "bbox": [
                144,
                482,
                658,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#打开一个程序放在后台，或者用图形界面打开"
                    }
                ]
            },
            "bbox": [
                144,
                519,
                517,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "nice -n -5 vim & "
                    }
                ]
            },
            "bbox": [
                146,
                539,
                280,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#用 ps 查看其优先级"
                    }
                ]
            },
            "bbox": [
                144,
                575,
                315,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ps -afxo user,ppid,pid,stat,pri,ni,time,command | grep vim "
                    }
                ]
            },
            "bbox": [
                144,
                593,
                633,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "copy "
                    }
                ]
            },
            "bbox": [
                146,
                614,
                191,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "我们还可以用 renice 来修改已经存在的进程的优先级="
                    }
                ]
            },
            "bbox": [
                144,
                630,
                574,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "renice -5 pid "
                    }
                ]
            },
            "bbox": [
                146,
                668,
                253,
                683
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "存储管理"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                708,
                260,
                730
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "本地存储管理"
                    }
                ]
            },
            "bbox": [
                144,
                774,
                258,
                789
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "存储管理与磁盘分区"
                    }
                ]
            },
            "bbox": [
                146,
                791,
                310,
                808
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "技术指标：主轴转速，平均寻道时间，数据传输率，高速缓存，单碟容量"
                    }
                ]
            },
            "bbox": [
                144,
                810,
                715,
                827
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬盘接口方式"
                    }
                ]
            },
            "bbox": [
                147,
                829,
                258,
                845
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "FC-AL,SCSI,SAS,SATA "
                    }
                ]
            },
            "bbox": [
                147,
                848,
                319,
                863
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "常用的分区工具"
                    }
                ]
            },
            "bbox": [
                147,
                866,
                275,
                882
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fdisk "
                    }
                ]
            },
            "bbox": [
                147,
                885,
                191,
                898
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "sfdisk "
                    }
                ]
            },
            "bbox": [
                146,
                93,
                201,
                107
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "GNU parted "
                    }
                ]
            },
            "bbox": [
                147,
                112,
                250,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "－高级分区操作（创建、复制、调整大小等等）"
                    }
                ]
            },
            "bbox": [
                166,
                130,
                529,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "分区工作 fdisk sfdisk GNU parted"
                    }
                ]
            },
            "bbox": [
                146,
                167,
                421,
                184
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "进入交互模式"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                258,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Fdisk <硬盘设备名> "
                    }
                ]
            },
            "bbox": [
                147,
                204,
                307,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在命令行方式下显示指定硬盘分区表信息"
                    }
                ]
            },
            "bbox": [
                147,
                223,
                468,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Fdisk -l <硬盘设备名> "
                    }
                ]
            },
            "bbox": [
                147,
                242,
                321,
                256
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/0864dfe7562f82160db6a7654e53dd1073f0a881227f0da940b228ea2fd1ee0e.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>子命令</td><td>说明</td><td>子命令</td><td>说明</td></tr><tr><td>a</td><td>调整硬盘的启动分区</td><td>p</td><td>列出硬盘分区表</td></tr><tr><td>d</td><td>删除一个硬盘分区</td><td>q</td><td>退出fdisk，不保存更改</td></tr><tr><td>l</td><td>列出所有支持的分区类型</td><td>t</td><td>更改分区类型</td></tr><tr><td>m</td><td>列出所有命令</td><td>u</td><td>切换所显示的分区大小的单位</td></tr><tr><td>n</td><td>创建一个新的分区</td><td>w</td><td>把设置写入硬盘分区表之后返回</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                258,
                1000,
                464
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在安装 Linux 的过程中如何正确地评估各分区大小是一个难题，因为系统管理员不但要考虑到当前某个分区需要的容量，还要预见该分区以后可能需要的容量的最大值。"
                    }
                ]
            },
            "bbox": [
                144,
                469,
                847,
                504
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "某个分区空间耗尽时，通常的解决方法是："
                    }
                ]
            },
            "bbox": [
                144,
                524,
                475,
                539
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用符号链接"
                    }
                ]
            },
            "bbox": [
                147,
                543,
                258,
                558
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "—— 破坏了Linux文件系统的标准结构"
                    }
                ]
            },
            "bbox": [
                154,
                562,
                465,
                577
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用调整分区大小的工具(如:Patition Magic 等)"
                    }
                ]
            },
            "bbox": [
                147,
                580,
                519,
                596
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "—— 必须停机一段时间进行调整"
                    }
                ]
            },
            "bbox": [
                154,
                599,
                413,
                614
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "备份整个系统、清除硬盘、重新对硬盘分区，然后恢复数据到新分区"
                    }
                ]
            },
            "bbox": [
                147,
                617,
                680,
                633
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "—— 必须停机一段时间进行恢复操作"
                    }
                ]
            },
            "bbox": [
                154,
                636,
                448,
                652
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "磁盘分区工具"
                    }
                ]
            },
            "bbox": [
                147,
                673,
                258,
                688
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#parted [选项] <硬盘设备名> "
                    }
                ]
            },
            "bbox": [
                147,
                692,
                381,
                708
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令行模式"
                    }
                ]
            },
            "bbox": [
                147,
                711,
                240,
                725
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# parted [选项] <硬盘设备名> <子命令> [<子命令参数>]"
                    }
                ]
            },
            "bbox": [
                147,
                728,
                589,
                745
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "子命令"
                    }
                ]
            },
            "bbox": [
                147,
                747,
                203,
                762
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "打印帮助信息：help [COMMAND]"
                    }
                ]
            },
            "bbox": [
                147,
                766,
                421,
                782
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "显示分区表： print [free|NUMBER|all]"
                    }
                ]
            },
            "bbox": [
                147,
                785,
                463,
                800
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建新分区：mkpart PART-TYPE [FS-TYPE] START END "
                    }
                ]
            },
            "bbox": [
                147,
                803,
                584,
                819
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "删除指定分区：rm NUMBER"
                    }
                ]
            },
            "bbox": [
                147,
                822,
                379,
                835
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置分区标记：set NUMBER FLAG STATE "
                    }
                ]
            },
            "bbox": [
                147,
                840,
                478,
                854
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LVM 是逻辑盘卷管理（Logical Volume Manager）的简称，它是 Linux 环境下对卷进行方便操作的抽象层。"
                    }
                ]
            },
            "bbox": [
                146,
                858,
                847,
                892
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LVM 是建立在硬盘和分区之上的一个逻辑层，来为文件系统屏蔽下层磁盘分区布局，从而提高磁盘分区管理的灵活性。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                847,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LVM允许在多个物理设备间重新组织文件系统，包括重新设定文件系统的大小。"
                    }
                ]
            },
            "bbox": [
                144,
                130,
                761,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过 LVM 可 以轻松管 理磁盘分区， 如 ：将若干个磁盘分区连接 为 一 个 整 块 的卷组（volume group），形成一个存储池。"
                    }
                ]
            },
            "bbox": [
                144,
                148,
                847,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以在卷组中随意创建逻辑卷（logical volumes），并进一步在逻辑卷上创建文件系统。通过LVM 可以方便的调整存储卷组的大小，并且可以对磁盘存储按照组的方式进行命名、管理和分配。"
                    }
                ]
            },
            "bbox": [
                144,
                186,
                833,
                237
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/4cbc28e93a9e75800549938774bad7f0ef3d1eb12b834d8abf9e81b712d18b64.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                152,
                244,
                636,
                464
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "物理卷(physical volume, PV)在 LVM 系统中处于最底层"
                    }
                ]
            },
            "bbox": [
                144,
                482,
                579,
                495
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "物理卷可以是整个硬盘、硬盘上的分区或从逻辑上与磁盘分区具有同样功能的设备（如：RAID）"
                    }
                ]
            },
            "bbox": [
                144,
                501,
                836,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "物理卷是 LVM 的基本存储逻辑块，但和基本的物理存储介质（如分区、磁盘等）比较，却包含有与LVM 相关的管理参数"
                    }
                ]
            },
            "bbox": [
                144,
                538,
                847,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每一个物理卷被划分为基本单元（称为 Physical Extent, PE），具有唯一编号的 PE 是可以被 LVM 寻址的最小存储单元"
                    }
                ]
            },
            "bbox": [
                144,
                575,
                847,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "PE 的大小可根据实际情况在创建物理卷时指定，默认为 4MB"
                    }
                ]
            },
            "bbox": [
                144,
                612,
                623,
                626
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "PE 的大小一旦确定将不能改变，同一个卷组中的所有物理卷的 PE 的大小需要一致"
                    }
                ]
            },
            "bbox": [
                144,
                631,
                786,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "卷组(Volume Group, VG)建立在物理卷之上，它由一个或多个物理卷组成"
                    }
                ]
            },
            "bbox": [
                144,
                649,
                719,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "卷组创建之后，可以动态添加物理卷到卷组中，在卷组上可以创建一个或多个“LVM 分区”（逻辑卷）"
                    }
                ]
            },
            "bbox": [
                144,
                668,
                847,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一个 LVM 系统中可以只有一个卷组，也可以包含多个卷组"
                    }
                ]
            },
            "bbox": [
                144,
                705,
                600,
                719
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LVM 的卷组类似于非LVM系统中的物理硬盘"
                    }
                ]
            },
            "bbox": [
                144,
                722,
                497,
                737
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "逻辑卷(Logical Volume, LV)建立在卷组之上，它是从卷组中“切出”的一块空间"
                    }
                ]
            },
            "bbox": [
                144,
                741,
                774,
                756
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "逻辑卷创建之后，其大小可以伸缩"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                416,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LVM 的逻辑卷类似于非 LVM 系统中的硬盘分区，在逻辑卷之上可以建立文件系统 （比如/home 或者 /usr 等）"
                    }
                ]
            },
            "bbox": [
                144,
                778,
                847,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/boot 分区不能位于卷组中，因为引导装载程序无法从逻辑卷中读取。"
                    }
                ]
            },
            "bbox": [
                144,
                816,
                684,
                829
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果你想把 / 分区放在逻辑卷上，必须创建一个与卷组分离的 /boot 分区。"
                    }
                ]
            },
            "bbox": [
                144,
                834,
                719,
                848
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/117bf6748fa3cf0c523b2e5f45029875c8b21fb40e1f35fd979178d83d0ad3b3.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                87,
                796,
                265
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建 LVM 类型的分区"
                    }
                ]
            },
            "bbox": [
                146,
                278,
                319,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在新硬盘上创建物理卷"
                    }
                ]
            },
            "bbox": [
                147,
                297,
                327,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将新创建的物理卷添加到卷组"
                    }
                ]
            },
            "bbox": [
                147,
                316,
                381,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在卷组中创建逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                310,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在逻辑卷中创建文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                346,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "挂装创建的文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                372,
                310,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "PV 阶段"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                211,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "VG 阶段"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                213,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LV 阶段"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                211,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "物理卷在LV没系统中处于最底层"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                406,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以是整个硬盘、硬盘上的分区"
                    }
                ]
            },
            "bbox": [
                147,
                483,
                400,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每一个物理卷被划分位基本单元 PE 具有唯一编号的PE是可以被LVM寻址的最小存储单元"
                    }
                ]
            },
            "bbox": [
                146,
                501,
                848,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "PE 的大小可以根据实际情况"
                    }
                ]
            },
            "bbox": [
                147,
                538,
                371,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "卷组VG建立在物理卷之上，由一个或多个物理卷组成"
                    }
                ]
            },
            "bbox": [
                147,
                556,
                571,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "卷组创建"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                221,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以由一个卷组，也可以多个卷组"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                415,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "逻辑卷建立在卷组之上，它是从卷组中切除的一块空间"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                574,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如home路径、"
                    }
                ]
            },
            "bbox": [
                147,
                631,
                265,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/boot分区不能位于卷组中没因为引导装载程序无法从逻辑卷中读取"
                    }
                ]
            },
            "bbox": [
                147,
                649,
                677,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果你想把/分区放在逻辑卷上，必须创建一个与卷组分离的/rooot分区"
                    }
                ]
            },
            "bbox": [
                147,
                668,
                707,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建物理卷"
                    }
                ]
            },
            "bbox": [
                147,
                705,
                240,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建卷组"
                    }
                ]
            },
            "bbox": [
                147,
                724,
                221,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                741,
                240,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建物理卷"
                    }
                ]
            },
            "bbox": [
                147,
                760,
                240,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# pvcreate <磁盘或分区设备名>"
                    }
                ]
            },
            "bbox": [
                147,
                778,
                403,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建卷组"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                221,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# vgcreate "
                    },
                    {
                        "type": "equation_inline",
                        "content": "<"
                    },
                    {
                        "type": "text",
                        "content": "卷组名> <物理卷设备名> [...] "
                    }
                ]
            },
            "bbox": [
                147,
                816,
                477,
                832
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                834,
                240,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# lvcreate "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ < } { - } \\lfloor"
                    },
                    {
                        "type": "text",
                        "content": "逻辑卷大小> <-n 逻辑卷名> <卷组名> "
                    }
                ]
            },
            "bbox": [
                147,
                853,
                559,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# lvcreate "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ < } \\mathrm { - } |"
                    },
                    {
                        "type": "text",
                        "content": "PE 值 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "> < - \\mathsf { n }"
                    },
                    {
                        "type": "text",
                        "content": "逻辑卷名> <卷组名> "
                    }
                ]
            },
            "bbox": [
                147,
                872,
                512,
                887
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看物理卷。卷组。逻辑卷。"
                    }
                ]
            },
            "bbox": [
                146,
                92,
                386,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看物理卷"
                    }
                ]
            },
            "bbox": [
                147,
                112,
                240,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# pvdisplay [<物理卷设备名>] "
                    }
                ]
            },
            "bbox": [
                147,
                130,
                386,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看卷组"
                    }
                ]
            },
            "bbox": [
                147,
                149,
                221,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# vgdisplay [<卷组名>] "
                    }
                ]
            },
            "bbox": [
                147,
                168,
                334,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                238,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# lvdisplay [<逻辑卷卷设备名>] "
                    }
                ]
            },
            "bbox": [
                147,
                204,
                398,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "存储管理工具"
                    }
                ]
            },
            "bbox": [
                147,
                241,
                257,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LBM Logical Volumn Manager "
                    }
                ]
            },
            "bbox": [
                147,
                260,
                398,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "逻辑盘卷管理，建立在硬盘和分区之上"
                    }
                ]
            },
            "bbox": [
                147,
                279,
                450,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将若干个磁盘分区链接为一个整块的卷组（volumn group），形成一个存储池"
                    }
                ]
            },
            "bbox": [
                147,
                297,
                761,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若卷组中无剩余空间，首先扩展卷组"
                    }
                ]
            },
            "bbox": [
                147,
                316,
                433,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "添加硬盘，在磁盘上创建 8e 类型的分区"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                460,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在分区上创建物理卷"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                309,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将物理卷添加到卷组中"
                    }
                ]
            },
            "bbox": [
                147,
                372,
                326,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# vgextend <卷组名> <物理卷设备名 "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "[...]"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                482,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若卷组中有剩余空间，扩展卷组中的逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                485,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# lvextend "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ < } { - } \\lfloor ~ +"
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ +"
                    },
                    {
                        "type": "text",
                        "content": "逻辑卷增量> <逻辑卷设备名称>"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                527,
                441
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# lvextend "
                    },
                    {
                        "type": "equation_inline",
                        "content": "| < - | + \\mathsf { P E }"
                    },
                    {
                        "type": "text",
                        "content": "值> <逻辑卷设备名称>"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                480,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "对已扩展的逻辑卷中的文件系统进行容量扩展"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                502,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# resize2fs "
                    },
                    {
                        "type": "equation_inline",
                        "content": "<"
                    },
                    {
                        "type": "text",
                        "content": "分区或逻辑卷设备名>"
                    }
                ]
            },
            "bbox": [
                147,
                483,
                421,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 umount 命令卸载文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                501,
                400,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用e2fsck命令检查文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                520,
                386,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 resize2fs 命令缩减文件系统容量"
                    }
                ]
            },
            "bbox": [
                147,
                538,
                442,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "缩减逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                557,
                238,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# lvreduce <-L -逻辑卷增量> <逻辑卷设备名称>"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                522,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# lvreduce <-l -PE 值> <逻辑卷设备名称>"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                475,
                608
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/45b6417cc35c1556be2c7a91fda83713fcbaa5a469b32075177d7b0d418bb110.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>任务</td><td>PV</td><td>VG</td><td>LV</td></tr><tr><td>创建</td><td>pvcreate</td><td>vgcreate</td><td>lvm</td></tr><tr><td>删除</td><td>pvremove</td><td>vgremove</td><td>lvm</td></tr><tr><td>显示信息</td><td>pvs</td><td>vgs</td><td>lvs</td></tr><tr><td>扫描列表</td><td>pvscan</td><td>vgscan</td><td>lvs</td></tr><tr><td>显示属性</td><td>pvdisplay</td><td>vgdisplay</td><td>lvm</td></tr><tr><td>更改属性</td><td>pvchange</td><td>vgchange</td><td>lvm</td></tr><tr><td>扩展</td><td></td><td>vgextend</td><td>lve</td></tr><tr><td>缩减</td><td></td><td>vgreduce</td><td>lvr</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                627,
                998,
                869
            ]
        }
    ],
    [
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                91,
                1000,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 文件系统"
                    }
                ]
            },
            "bbox": [
                146,
                183,
                270,
                198
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬盘的分类"
                    }
                ]
            },
            "bbox": [
                147,
                202,
                238,
                217
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬盘的接口"
                    }
                ]
            },
            "bbox": [
                147,
                221,
                238,
                235
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬盘分区 "
                    }
                ]
            },
            "bbox": [
                147,
                239,
                221,
                253
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "逻辑卷管理"
                    }
                ]
            },
            "bbox": [
                147,
                275,
                238,
                291
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux下的文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                294,
                305,
                309
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统是包括在一个磁盘（硬盘、光盘及其它存储设备）上的目录结构；一个磁盘设备可以包含一个或多个文件系统。"
                    }
                ]
            },
            "bbox": [
                147,
                313,
                845,
                346
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统是在一个磁盘（硬盘、光盘及其它存储设备）上组织文件的方法。"
                    }
                ]
            },
            "bbox": [
                147,
                350,
                722,
                365
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统是文件的数据结构或组织方法。"
                    }
                ]
            },
            "bbox": [
                147,
                369,
                457,
                384
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统是基于被划分的存储设备上的一种文件的命名、存储、组织及读取的方法。"
                    }
                ]
            },
            "bbox": [
                147,
                387,
                791,
                401
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一个文件系统是有组织存储文件或数据的方法，目的是易于查询和存取。文件系统是基于一个存储设备，比如硬盘或光盘，并且包含文件文件物理位置的维护。"
                    }
                ]
            },
            "bbox": [
                147,
                424,
                847,
                458
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux下的所有文件和目录以一个树状的结构组织构成了 Linux 中的文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                461,
                747,
                476
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 文件系统标准（Linux File System Standard，FSSTND）"
                    }
                ]
            },
            "bbox": [
                147,
                480,
                633,
                495
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统层次结构标准（File System Hierarchy Standard，FHS）"
                    }
                ]
            },
            "bbox": [
                147,
                498,
                658,
                514
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 的内核采用了称之为虚拟文件系统（Virtual File System，VFS）的技术，因此Linux 可以支持多种不同的文件系统类型。"
                    }
                ]
            },
            "bbox": [
                147,
                535,
                847,
                569
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux可支持的文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                573,
                341,
                587
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 目前几乎支持所有的 UNIX 类的文件系统，如 HFS、XFS、JFS、Minix FS 及 UFS 等Linux 支持 NFS 文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                590,
                838,
                625
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 也支持 NTFS 和 vfat（FAT32）"
                    }
                ]
            },
            "bbox": [
                147,
                627,
                428,
                643
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux 支持"
                    }
                ]
            },
            "bbox": [
                147,
                646,
                235,
                661
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ext3/ext4 "
                    }
                ]
            },
            "bbox": [
                147,
                665,
                228,
                678
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "JFS（IBM）"
                    }
                ]
            },
            "bbox": [
                147,
                684,
                231,
                699
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "XFS（ SGI ）"
                    }
                ]
            },
            "bbox": [
                147,
                703,
                240,
                717
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Reiserfs "
                    }
                ]
            },
            "bbox": [
                147,
                721,
                216,
                734
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "日志文件系统的优点"
                    }
                ]
            },
            "bbox": [
                149,
                739,
                309,
                753
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "提高了文件的存储安全性"
                    }
                ]
            },
            "bbox": [
                147,
                758,
                344,
                772
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "降低了文件被破坏的机率"
                    }
                ]
            },
            "bbox": [
                147,
                776,
                344,
                791
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "缩短了对磁盘的扫描时间"
                    }
                ]
            },
            "bbox": [
                147,
                795,
                344,
                809
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "减少了磁盘整体扫描次数"
                    }
                ]
            },
            "bbox": [
                147,
                814,
                344,
                828
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ext2/ext3/ext4 "
                    }
                ]
            },
            "bbox": [
                147,
                833,
                268,
                846
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux使用的标准文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                851,
                357,
                865
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "swap "
                    }
                ]
            },
            "bbox": [
                147,
                871,
                193,
                884
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "交换文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                888,
                255,
                902
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "FAT32/vfat"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                240,
                107
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Windows 文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                112,
                302,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "NFS "
                    }
                ]
            },
            "bbox": [
                147,
                131,
                184,
                143
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "网络文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                149,
                258,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "iso9660 "
                    }
                ]
            },
            "bbox": [
                147,
                168,
                216,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "标准光盘文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                295,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在硬盘上创建分区或逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                205,
                363,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以使用fdisk命令创建分区。"
                    }
                ]
            },
            "bbox": [
                147,
                223,
                381,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以使用LVM的相关命令创建逻辑卷"
                    }
                ]
            },
            "bbox": [
                147,
                242,
                440,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在分区/LV上建立文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                260,
                359,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "类似于在Windows下进行格式化操作。"
                    }
                ]
            },
            "bbox": [
                147,
                279,
                453,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "挂装文件系统到系统中"
                    }
                ]
            },
            "bbox": [
                147,
                297,
                327,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "手工挂装：使用mount命令"
                    }
                ]
            },
            "bbox": [
                147,
                315,
                371,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "启动时自动挂装：编辑“/etc/fstab” 添加相应的配置行。"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                584,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "卸装文件系统 "
                    }
                ]
            },
            "bbox": [
                147,
                353,
                258,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "对于可移动介质上的文件系统，当使用完毕可以使用 umount 命令实施卸装操作。"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                779,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "挂载文件系统——mount 命令"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                386,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "功能：挂装文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                310,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                188,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "mount [选项] [<分区设备名>] [<挂装点>] "
                    }
                ]
            },
            "bbox": [
                147,
                464,
                485,
                480
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "常用选项"
                    }
                ]
            },
            "bbox": [
                147,
                483,
                221,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-t <文件系统类型 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathrm { . }"
                    },
                    {
                        "type": "text",
                        "content": "：指定文件系统类型"
                    }
                ]
            },
            "bbox": [
                147,
                501,
                453,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-r ：使用只读方式来挂载"
                    }
                ]
            },
            "bbox": [
                147,
                520,
                346,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-a：挂装/etc/fstab 文件中记录的设备"
                    }
                ]
            },
            "bbox": [
                147,
                539,
                443,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-o iocharset=cp936：使挂装的设备可以显示中文文件名"
                    }
                ]
            },
            "bbox": [
                147,
                557,
                589,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-o loop：使用回送设备挂装ISO文件和映像文件"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                527,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "挂装点目录必须存在"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                310,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "应该在挂装目录的上级目录下进行挂装操作"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                487,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不该在同一个挂装点目录下挂装两个文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                631,
                505,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当文件系统处于“busy”状态时不能进行卸装"
                    }
                ]
            },
            "bbox": [
                147,
                649,
                497,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统何时处于“busy”状态"
                    }
                ]
            },
            "bbox": [
                147,
                668,
                391,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统上面有打开的文件"
                    }
                ]
            },
            "bbox": [
                147,
                686,
                363,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "某个进程的工作目录在此文件系统上"
                    }
                ]
            },
            "bbox": [
                147,
                705,
                433,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统上面的缓存文件正在被使用"
                    }
                ]
            },
            "bbox": [
                147,
                724,
                433,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fuser命令可以根据文件（目录、设备）查找使用它的进程，同时也提供了杀死这些进程的方法。"
                    }
                ]
            },
            "bbox": [
                146,
                741,
                847,
                776
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用举例"
                    }
                ]
            },
            "bbox": [
                147,
                778,
                221,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看挂接点有哪些进程需要杀掉"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                400,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# fuser -cu /mount_point "
                    }
                ]
            },
            "bbox": [
                147,
                816,
                366,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "杀死这些进程（向其发送[SIGKILL, 9]信号）"
                    }
                ]
            },
            "bbox": [
                147,
                835,
                482,
                850
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# fuser -ck /mount_point "
                    }
                ]
            },
            "bbox": [
                147,
                854,
                366,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看是否还有进程在访问挂接点"
                    }
                ]
            },
            "bbox": [
                147,
                872,
                398,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# fuser -c /mount_point "
                    }
                ]
            },
            "bbox": [
                147,
                891,
                356,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "卸载挂接点上的设备"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                305,
                105
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# umount /mount_point "
                    }
                ]
            },
            "bbox": [
                146,
                112,
                356,
                126
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "什么是LVM,LVM如何管理"
                    }
                ]
            },
            "bbox": [
                144,
                148,
                357,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "卸载文件系统"
                    }
                ]
            },
            "bbox": [
                146,
                167,
                257,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Umount 命令"
                    }
                ]
            },
            "bbox": [
                146,
                186,
                258,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "挂载点目录必须存在"
                    }
                ]
            },
            "bbox": [
                146,
                204,
                309,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "应该在怪载目录的上级目录的上级目录下进行挂载操作"
                    }
                ]
            },
            "bbox": [
                144,
                223,
                574,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不该在同一个挂载点"
                    }
                ]
            },
            "bbox": [
                146,
                241,
                309,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Fuser可以根据文件（目录、设备）查找使用它的进程，同时提懂了杀死这些进程的方法系统启动时，自动挂装文件系统"
                    }
                ]
            },
            "bbox": [
                144,
                259,
                833,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/fstab "
                    }
                ]
            },
            "bbox": [
                146,
                315,
                230,
                329
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "开机后系统会自动搜索该文件中的内容，对雷雨该文件重点文件系统进行自动挂载"
                    }
                ]
            },
            "bbox": [
                144,
                334,
                786,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fstab (file system table) 是一个纯文本文件，开机后，系统会自动搜索该文件中的内容，对列于该文件中的文件系统进行自动挂载。"
                    }
                ]
            },
            "bbox": [
                144,
                351,
                836,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统重启时保留文件系统体系结构"
                    }
                ]
            },
            "bbox": [
                146,
                390,
                415,
                404
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "配置文件系统体系结构"
                    }
                ]
            },
            "bbox": [
                146,
                407,
                327,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "被 mount、fsck 和其它程序使用"
                    }
                ]
            },
            "bbox": [
                146,
                426,
                405,
                441
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 mount -a 命令挂载 /etc/fstab 中的所有文件系统"
                    }
                ]
            },
            "bbox": [
                146,
                445,
                569,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以在设备栏使用文件系统卷标"
                    }
                ]
            },
            "bbox": [
                146,
                464,
                398,
                478
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/fstab 包含的信息"
                    }
                ]
            },
            "bbox": [
                146,
                482,
                322,
                495
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每一行说明一个文件系统的挂载信息"
                    }
                ]
            },
            "bbox": [
                146,
                501,
                433,
                514
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每一行由 6 列信息组成，列与列之间用 TAB 键隔开，一般格式如下："
                    }
                ]
            },
            "bbox": [
                144,
                519,
                675,
                533
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/9303ce8214d567f55d42a0a06e6131a49607bc6c4c19ed7d6ee97b0a07b20ae3.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                144,
                563,
                672,
                667
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "分区或 LV 挂装点 文件系统类型 挂装选项 备份频率 检查顺序"
                    }
                ]
            },
            "bbox": [
                144,
                703,
                640,
                719
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fs_spec fs_file fs_type fs_options fs_dump fs_pass "
                    }
                ]
            },
            "bbox": [
                144,
                722,
                643,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fs_file：挂装点目录"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                304,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fs_type：文件系统类型"
                    }
                ]
            },
            "bbox": [
                146,
                778,
                334,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fs_options：文件系统挂载选项"
                    }
                ]
            },
            "bbox": [
                146,
                797,
                394,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fs_dump：被”dump”命令使用来检查一个文件系统应该以多快频率进行转储，若不需要转储则该字段为“0”"
                    }
                ]
            },
            "bbox": [
                144,
                816,
                845,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fs_pass：被”fsck”命令用来决定在启动时需要被扫描的文件系统的顺序，若无需在启动时扫描则该字段为“0”"
                    }
                ]
            },
            "bbox": [
                144,
                852,
                845,
                885
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每一行说明一个文件系统的挂载信息"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                436,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备名 挂载点 文件系统类型 挂装选项列表 dump 时记录 fsck 时的顺序"
                    }
                ]
            },
            "bbox": [
                146,
                111,
                702,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "EXT 2/3/4 文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                130,
                305,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "前端命令mkfs的格式"
                    }
                ]
            },
            "bbox": [
                147,
                148,
                322,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Mkfs-t <fstype> -c <分区设备名>"
                    }
                ]
            },
            "bbox": [
                147,
                167,
                411,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "前端命令mkfs的格式"
                    }
                ]
            },
            "bbox": [
                147,
                185,
                322,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# mkfs -t <fstype> -c <分区设备名>"
                    }
                ]
            },
            "bbox": [
                147,
                204,
                435,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-t fstype：指定文件系统类型"
                    }
                ]
            },
            "bbox": [
                147,
                223,
                376,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-c：建立文件系统前先检测有无坏块"
                    }
                ]
            },
            "bbox": [
                147,
                241,
                430,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "举例"
                    }
                ]
            },
            "bbox": [
                147,
                260,
                186,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# mkfs -t ext3 -c /dev/hda2 "
                    }
                ]
            },
            "bbox": [
                147,
                279,
                371,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# mkfs -t vfat /dev/hdb2 "
                    }
                ]
            },
            "bbox": [
                147,
                297,
                349,
                311
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# mke2fs -c /dev/hda2 "
                    }
                ]
            },
            "bbox": [
                147,
                315,
                334,
                330
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# mkfs.ext4 /dev/sda1 "
                    }
                ]
            },
            "bbox": [
                147,
                334,
                332,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fsck 是操作系统扫描文件系统内容检查内部一致性的工具。"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                600,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "主要功能"
                    }
                ]
            },
            "bbox": [
                147,
                388,
                221,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "检测并修正链接中断的目录 "
                    }
                ]
            },
            "bbox": [
                147,
                407,
                363,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "检测并修正错误时间标记"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                346,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "检测并修正指向错误磁盘区域的 i-node"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                455,
                461
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令格式"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                221,
                478
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fsck [选项][-t 文件系统类型] <设备名 "
                    },
                    {
                        "type": "equation_inline",
                        "content": ">"
                    },
                    {
                        "type": "text",
                        "content": "[特定文件系统的附加选项]"
                    }
                ]
            },
            "bbox": [
                146,
                481,
                657,
                499
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Fsck ——检查文件系统"
                    }
                ]
            },
            "bbox": [
                147,
                519,
                332,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Tune2fs "
                    }
                ]
            },
            "bbox": [
                147,
                538,
                216,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "显示文件系统属性参数"
                    }
                ]
            },
            "bbox": [
                147,
                556,
                327,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tune2fs -l <device> "
                    }
                ]
            },
            "bbox": [
                147,
                575,
                310,
                589
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "dumpe2fs -h <device> "
                    }
                ]
            },
            "bbox": [
                147,
                593,
                332,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可调整的文件系统属性参数"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                363,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "保留块"
                    }
                ]
            },
            "bbox": [
                147,
                631,
                203,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认挂载选项"
                    }
                ]
            },
            "bbox": [
                147,
                649,
                257,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fsck 频率 "
                    }
                ]
            },
            "bbox": [
                147,
                668,
                223,
                682
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式"
                    }
                ]
            },
            "bbox": [
                147,
                686,
                186,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "tune2fs [<选项>] <设备名> "
                    }
                ]
            },
            "bbox": [
                147,
                705,
                363,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "常用选项"
                    }
                ]
            },
            "bbox": [
                147,
                722,
                221,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-c：表示文件系统在 mount 次数达到设定后，需要运行 fsck 检查文件系统。"
                    }
                ]
            },
            "bbox": [
                146,
                741,
                734,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-i：文件系统的检查间隔时间。系统在达到时间间隔时，自动检查文件系统。"
                    }
                ]
            },
            "bbox": [
                147,
                760,
                732,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-j：为 ext2 文件系统添加文件系统日志，转换为 ext3 文件系统。"
                    }
                ]
            },
            "bbox": [
                147,
                778,
                643,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-m: 设置保留的空间百分比，预设为 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "5 \\% ."
                    },
                    {
                        "type": "text",
                        "content": "。"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                465,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-o: 设置默认加载参数。"
                    }
                ]
            },
            "bbox": [
                147,
                816,
                324,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-L: 为指定设备设置卷标，不大于 16 字符。"
                    }
                ]
            },
            "bbox": [
                147,
                834,
                475,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统的 LABLE 和 UUID"
                    }
                ]
            },
            "bbox": [
                146,
                871,
                364,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "标识块设备的传统方法"
                    }
                ]
            },
            "bbox": [
                147,
                890,
                327,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设备名"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                203,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "标识块设备的其他方法"
                    }
                ]
            },
            "bbox": [
                147,
                112,
                326,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统 LABEL"
                    }
                ]
            },
            "bbox": [
                147,
                131,
                275,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统的UUID"
                    }
                ]
            },
            "bbox": [
                147,
                149,
                287,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在生成文件系统时自动为设备只当 UUID"
                    }
                ]
            },
            "bbox": [
                147,
                168,
                463,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "磁盘限额是系统管理员用来监控和限制用户或组对磁盘的使用的工具"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                680,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "磁盘限额是系统管理员用来监控和限制用户或组对磁盘的使用的工具。"
                    }
                ]
            },
            "bbox": [
                147,
                205,
                685,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "磁盘限额可以从两方面限制"
                    }
                ]
            },
            "bbox": [
                147,
                224,
                363,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "限制用户或组可以拥有的inode数（即文件个数）"
                    }
                ]
            },
            "bbox": [
                147,
                242,
                529,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "限制分配给用户或组的磁盘块的数目"
                    }
                ]
            },
            "bbox": [
                147,
                261,
                431,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "磁盘配额是以每一使用者，每一文件系统为基础的。如果使用者可以在超过一个以上的文件系统上建立文件，那么必须在每一文件系统上分别设定。"
                    }
                ]
            },
            "bbox": [
                146,
                279,
                847,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "硬限制：超过此设定值后不能继续存储新的文件。"
                    }
                ]
            },
            "bbox": [
                147,
                316,
                529,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "软限制：超过此设定值后仍旧可以继续存储新的文件，同时系统发出警告信息, 建议用户清理自己的文件，释放出更多的空间。"
                    }
                ]
            },
            "bbox": [
                146,
                334,
                847,
                367
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "时限：超过软限制多长时间之内（默认为7天）可以继续存储新的文件。"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                702,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Edquota "
                    }
                ]
            },
            "bbox": [
                147,
                391,
                220,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "交互式编辑配额"
                    }
                ]
            },
            "bbox": [
                151,
                407,
                278,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "edquota "
                    }
                ]
            },
            "bbox": [
                147,
                428,
                220,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令式设置配额 "
                    }
                ]
            },
            "bbox": [
                147,
                445,
                273,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "setquota "
                    }
                ]
            },
            "bbox": [
                147,
                466,
                223,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将参考用户/组的配额复制给其他用户/组"
                    }
                ]
            },
            "bbox": [
                147,
                482,
                463,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "edquota -p <protoname> …… "
                    }
                ]
            },
            "bbox": [
                147,
                502,
                394,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "setquota -p <protoname> …… "
                    }
                ]
            },
            "bbox": [
                147,
                521,
                394,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编辑指定用户的配额"
                    }
                ]
            },
            "bbox": [
                147,
                539,
                310,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "edquota [-u] [ -f filesystem ] <username> "
                    }
                ]
            },
            "bbox": [
                147,
                557,
                490,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编辑指定组的配额"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                292,
                589
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "edquota -g [ -f filesystem ] <groupname> "
                    }
                ]
            },
            "bbox": [
                147,
                594,
                502,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编辑指定用户的配额时限"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                344,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "edquota -t [-u] [ -f filesystem ] "
                    }
                ]
            },
            "bbox": [
                147,
                631,
                400,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编辑指定组的配额时限"
                    }
                ]
            },
            "bbox": [
                147,
                650,
                326,
                664
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "用户管理"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                709,
                258,
                728
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看用户"
                    }
                ]
            },
            "bbox": [
                147,
                775,
                218,
                788
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "请打开终端，输入命令："
                    }
                ]
            },
            "bbox": [
                147,
                829,
                334,
                844
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "who am i "
                    }
                ]
            },
            "bbox": [
                147,
                850,
                240,
                862
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# 或者"
                    }
                ]
            },
            "bbox": [
                147,
                885,
                201,
                900
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "说明：在不同的 Linux 发行版中，在线安装方式会有一些差异，包括使用的命令及它们的包管理工具。本实验的环境是基于 Ubuntu 的，所以这里涉及的在线安装方式仅只适用于Ubuntu 发行版，或其它基于 Ubuntu 的发行版如我国的 ubuntukylin(优麒麟)。Ubuntu又是基于 Debian 的衍生发行版，使用的也是 Debian 的包管理工具dpkg，所以一些操作也适用与 Debian。对于其他发行版，由于使用的包管理器不同，相应的命令和选项也会有一些差异，例如 RHEL、CentOS、openEuler 等使用 yum 或者 dnf。请查阅资料学习相应的命令。"
                    }
                ]
            },
            "bbox": [
                144,
                148,
                852,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通常 Linux 上的软件安装主要有四种方式："
                    }
                ]
            },
            "bbox": [
                146,
                278,
                478,
                294
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": ". 在线安装"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": ". 从磁盘安装deb 软件包"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "从二进制软件包安装"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": ". 从源代码编译安装"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                176,
                297,
                391,
                367
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "这几种安装方式各有优劣，而大多数软件包会采用多种方式发布软件，所以我们常常需要全部掌握这几种软件安装方式，以便适应各种环境。下面将介绍前三种安装方式，从源码编译安装你将在 Linux 程序设计中学习到。"
                    }
                ]
            },
            "bbox": [
                144,
                370,
                850,
                424
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Linux 系统里， root 账户拥有整个系统至高无上的权利，比如 新建/添加 用户。"
                    }
                ]
            },
            "bbox": [
                144,
                445,
                781,
                461
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "root 权 限 ， 系 统 权 限 的 一 种 ， 与 SYSTEM 权 限 可 以 理 解 成 一 个 概 念 ， 但 高 于Administrator 权限，root 是 Linux 和 UNIX 系统中的超级管理员用户帐户，该帐户拥有整个系统至高无上的权力，所有对象他都可以操作，所以很多黑客在入侵系统的时候，都要把权限提升到 root 权限，这个操作等同于在 Windows 下就是将新建的非法帐户添加到Administrators 用户组。更比如安卓操作系统中（基于 Linux 内核）获得 root 权限之后就意味着已经获得了手机的最高权限，这时候你可以对手机中的任何文件（包括系统文件）执行所有增、删、改、查的操作。"
                    }
                ]
            },
            "bbox": [
                144,
                463,
                850,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "大部分 Linux 系统在安装时都会建议用户新建一个用户而不是直接使用 root用户进行登录，当然也有直接使用root 登录的，例如Kali（基于 Debian 的 Linux 发行版，集成大量工具软件，主要用于数字取证的操作系统）。一般我们登录系统时都是以普通账户的身份登录的，要创建用户需要 root 权限，这里就要用到 sudo 这个命令了。不过使用这个命令有两个前提："
                    }
                ]
            },
            "bbox": [
                144,
                593,
                853,
                682
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "要知道当前登录用户的密码"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "当前用户必须在 sudo 用户组。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                176,
                686,
                443,
                719
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "说明：shiyanlou 用户也属于 sudo 用户组。"
                    }
                ]
            },
            "bbox": [
                146,
                722,
                485,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "账户实质上就是一个用户在系统上的标识"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                468,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统依据账户来区分每个用户的文件、进程、任务，给每个用户提供特定的工作环境"
                    }
                ]
            },
            "bbox": [
                144,
                778,
                803,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux系统下的用户账户有两种"
                    }
                ]
            },
            "bbox": [
                146,
                797,
                394,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "普通用户账户"
                    }
                ]
            },
            "bbox": [
                146,
                816,
                255,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "超级用户账户（管理员账户）"
                    }
                ]
            },
            "bbox": [
                146,
                834,
                369,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "超级用户 yud "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathtt { = 0 }"
                    },
                    {
                        "type": "text",
                        "content": "，gid "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathtt { = 0 }"
                    }
                ]
            },
            "bbox": [
                146,
                853,
                339,
                869
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "普通用户 u "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ \\mathsf { d } } { \\mathsf { s } } { = } 1 0 0 0"
                    }
                ]
            },
            "bbox": [
                146,
                872,
                312,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统用户： "
                    },
                    {
                        "type": "equation_inline",
                        "content": "0 <"
                    }
                ]
            },
            "bbox": [
                146,
                890,
                260,
                904
            ]
        },
        {
            "type": "page_header",
            "content": {
                "page_header_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "who mom likes "
                    }
                ]
            },
            "bbox": [
                147,
                112,
                292,
                126
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户名和 uid 被保存在/etc/passwd 文件"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                465,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当用户登录时，它们被分配了一个主目录和一个运行的程序（shell）"
                    }
                ]
            },
            "bbox": [
                146,
                111,
                673,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "组时用户的集合。"
                    }
                ]
            },
            "bbox": [
                147,
                130,
                280,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每个组都被分配了一个唯一的组 ID 号（GID）"
                    }
                ]
            },
            "bbox": [
                146,
                148,
                497,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "标准组"
                    }
                ]
            },
            "bbox": [
                147,
                168,
                203,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以容纳多个用户"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                290,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "私有组"
                    }
                ]
            },
            "bbox": [
                147,
                205,
                203,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "只有用户自己"
                    }
                ]
            },
            "bbox": [
                147,
                223,
                257,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当创建一个新用户时，若没有指定他所属于的组，RHEL就会建立一个和该用户同名的私"
                    }
                ]
            },
            "bbox": [
                146,
                241,
                848,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "有组，且用户被分配到这个私有组中"
                    }
                ]
            },
            "bbox": [
                147,
                260,
                433,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一个用户可以属于多个组，这些组可以是私有组，也可以是标准组。"
                    }
                ]
            },
            "bbox": [
                146,
                278,
                668,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认启用 shadow oasswird 功能"
                    }
                ]
            },
            "bbox": [
                146,
                297,
                406,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一般不设置组口令"
                    }
                ]
            },
            "bbox": [
                147,
                316,
                292,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "尽量使用私有组来提高系统安全性"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                415,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "不建议管理员直接编辑"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                327,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "账户验证信息文件"
                    }
                ]
            },
            "bbox": [
                147,
                370,
                292,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "口令文件"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                221,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件权限"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                221,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/passwd "
                    }
                ]
            },
            "bbox": [
                147,
                426,
                250,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每一个用户一条记录，每条记录用分号杰哥的七个字段组成。"
                    }
                ]
            },
            "bbox": [
                146,
                445,
                616,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "影子口令文件"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                255,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "组账号文件"
                    }
                ]
            },
            "bbox": [
                147,
                483,
                238,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "组口令文件 每一组一i奥记录"
                    }
                ]
            },
            "bbox": [
                147,
                501,
                378,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户默认配置文件‘新用户基本信息"
                    }
                ]
            },
            "bbox": [
                147,
                519,
                433,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "添加用户账号 useradd"
                    }
                ]
            },
            "bbox": [
                147,
                538,
                327,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编辑账户验证信息文件"
                    }
                ]
            },
            "bbox": [
                146,
                574,
                327,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "创建主目录"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                238,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置用户口令"
                    }
                ]
            },
            "bbox": [
                147,
                631,
                255,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Passw的【用户名】"
                    }
                ]
            },
            "bbox": [
                151,
                649,
                305,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "修改用户账号"
                    }
                ]
            },
            "bbox": [
                147,
                668,
                255,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Usermod 选项与 useradd 命令基本相同 "
                    }
                ]
            },
            "bbox": [
                147,
                686,
                465,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Userdel 删除账号"
                    }
                ]
            },
            "bbox": [
                147,
                705,
                287,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Groupadd 添加组账号"
                    }
                ]
            },
            "bbox": [
                147,
                724,
                327,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Groupmod 修改组账号"
                    }
                ]
            },
            "bbox": [
                147,
                741,
                332,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Groupdel 删除的组账号 "
                    }
                ]
            },
            "bbox": [
                147,
                760,
                337,
                776
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Gpasswd 修改组账号"
                    }
                ]
            },
            "bbox": [
                147,
                778,
                317,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "批量用户管理工具"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                292,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Newusers chpasswd "
                    }
                ]
            },
            "bbox": [
                147,
                816,
                319,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "批量生成安全的口令"
                    }
                ]
            },
            "bbox": [
                147,
                834,
                309,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Pwgen "
                    }
                ]
            },
            "bbox": [
                147,
                853,
                206,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "口令维护—— 禁用、删除和维护和口令时效"
                    }
                ]
            },
            "bbox": [
                147,
                872,
                485,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置已存在用户的口令时效"
                    }
                ]
            },
            "bbox": [
                147,
                890,
                363,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用户切换命令"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                257,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Su "
                    }
                ]
            },
            "bbox": [
                147,
                112,
                173,
                124
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "直接切换为冲击用户"
                    }
                ]
            },
            "bbox": [
                147,
                130,
                309,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Sudo执行系统管理命令，无需知道超级用户的口令，使用普通用户自己的口令即可。"
                    }
                ]
            },
            "bbox": [
                146,
                148,
                803,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Id groups whoami w/who "
                    }
                ]
            },
            "bbox": [
                147,
                167,
                363,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "权限管理"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                221,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux允许多个用户同时在系统上个登录和工作"
                    }
                ]
            },
            "bbox": [
                147,
                204,
                517,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "同归 uid、gid 来却分每个用户"
                    }
                ]
            },
            "bbox": [
                147,
                223,
                386,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每个进程都是用一个 uid 和一个或多个 gid 来运行 "
                    }
                ]
            },
            "bbox": [
                147,
                241,
                534,
                258
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "读权限 r 对文件的含义和对目录的含义"
                    }
                ]
            },
            "bbox": [
                147,
                260,
                448,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "写权限 w "
                    }
                ]
            },
            "bbox": [
                147,
                279,
                221,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "执行权限 x "
                    }
                ]
            },
            "bbox": [
                147,
                297,
                235,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "目录上只有执行权限，不能列出目录列表也不能删除改目录"
                    }
                ]
            },
            "bbox": [
                147,
                315,
                610,
                332
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "分配三种权限"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                257,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件和目录的使用者"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                309,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "属主、同组人、其他人"
                    }
                ]
            },
            "bbox": [
                147,
                370,
                327,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "权限分配"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                221,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "属主的权限：用于限制文件或目录的创建者"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                485,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "属组的权限：用于限制"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                327,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看权限"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                221,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "D 文件类型 文件权限 硬链接数或目录包含的文件数 文件所有者 文件所有者所在的用户组文件长度 文件上次修改时间和日期 文件名"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                847,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "3套权限控制"
                    }
                ]
            },
            "bbox": [
                147,
                501,
                253,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件类型所有者的权限 同组用户权限 其他用户的访问权限"
                    }
                ]
            },
            "bbox": [
                147,
                519,
                600,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以用八进制数值表示"
                    }
                ]
            },
            "bbox": [
                147,
                538,
                327,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Chmod 改变文件或目录权限"
                    }
                ]
            },
            "bbox": [
                147,
                557,
                374,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Chown 改变文件或目录的属主"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                389,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Chgrp 改变"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                242,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Chmod 命令有两种设置方法，一个文件字模是一个八进制。-R表示对目录中的所有文件或子目录进行递归操作"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                847,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "chown 改变文件的所有者"
                    }
                ]
            },
            "bbox": [
                147,
                650,
                349,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "chmod 改变文件的权限"
                    }
                ]
            },
            "bbox": [
                147,
                668,
                336,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "chmod "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\uplus \\dag \\mathsf { r w }"
                    },
                    {
                        "type": "text",
                        "content": "file1 "
                    }
                ]
            },
            "bbox": [
                151,
                686,
                299,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "chmod "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { U } ^ { + } \\mathsf { X } , \\mathsf { g } ^ { - } \\mathsf { X }"
                    },
                    {
                        "type": "text",
                        "content": "file2 "
                    }
                ]
            },
            "bbox": [
                151,
                705,
                317,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "chmod g-x file1 "
                    }
                ]
            },
            "bbox": [
                151,
                724,
                280,
                739
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "chmod 610 file1 #r-4/w-2/x-1 "
                    }
                ]
            },
            "bbox": [
                151,
                741,
                406,
                756
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "chgrp 改变文件的组"
                    }
                ]
            },
            "bbox": [
                147,
                760,
                309,
                776
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "U user "
                    }
                ]
            },
            "bbox": [
                147,
                797,
                206,
                810
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "G 同组用户"
                    }
                ]
            },
            "bbox": [
                147,
                816,
                242,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "R4w2x1-0 "
                    }
                ]
            },
            "bbox": [
                147,
                835,
                231,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用三个数字模式来表示，分别代表用户n1、同组用户n2、其他用户n3"
                    }
                ]
            },
            "bbox": [
                146,
                852,
                719,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每个数字模式由不同权限缩影的数字相加得到一个访问"
                    }
                ]
            },
            "bbox": [
                147,
                872,
                574,
                887
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "改变文件/目录属主或组"
                    }
                ]
            },
            "bbox": [
                146,
                93,
                334,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Root用户改变文件的所有者"
                    }
                ]
            },
            "bbox": [
                147,
                112,
                369,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Root 用户或所有者才能改变文件的所属组"
                    }
                ]
            },
            "bbox": [
                147,
                130,
                475,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认的访问权限，由 unmask 去决定"
                    }
                ]
            },
            "bbox": [
                147,
                148,
                436,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认生成掩码告诉系统当创建一个文件或目录时不应该赋予其哪些权限"
                    }
                ]
            },
            "bbox": [
                147,
                167,
                697,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统不允许用户在创建"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                327,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置umask值的方法"
                    }
                ]
            },
            "bbox": [
                147,
                204,
                319,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 unmask 命令临时设置"
                    }
                ]
            },
            "bbox": [
                147,
                223,
                364,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在~/.bashrc 实现"
                    }
                ]
            },
            "bbox": [
                147,
                242,
                285,
                256
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "三种特殊权限"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                278,
                257,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Suid 使用命令所属用户的权限来运行，而不是命令执行者的权限"
                    }
                ]
            },
            "bbox": [
                146,
                297,
                650,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Sgid 使用命令的组权限来运行"
                    }
                ]
            },
            "bbox": [
                147,
                316,
                386,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Suid 和 sgid 都用 s 表示"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                336,
                350
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Sticky-bit 用 t 表示"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                295,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Suid 时占用属主的 x 位置来表示、sgid 占用组的 x 位置来表示、"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                638,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用一个单独 的数字模式（n0）由不同权限所对应的数字相加得到一个表示特殊权限"
                    }
                ]
            },
            "bbox": [
                146,
                388,
                811,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Ext2/3/4 的文件扩展说下"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                347,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "A atime 告诉系统不要修改"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                359,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "S sync 写操作写到错 "
                    }
                ]
            },
            "bbox": [
                147,
                464,
                312,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "A append oly "
                    }
                ]
            },
            "bbox": [
                147,
                501,
                260,
                517
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "I immutable "
                    }
                ]
            },
            "bbox": [
                147,
                520,
                253,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Lsattr "
                    }
                ]
            },
            "bbox": [
                147,
                539,
                200,
                551
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Chattr "
                    }
                ]
            },
            "bbox": [
                147,
                557,
                203,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "并不适用于所有点目录，注意如下目录的扩展属性"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                539,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Posix文件访问控制列表"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                339,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ALC 标准"
                    }
                ]
            },
            "bbox": [
                147,
                631,
                221,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "FACL 时 file access control lists 的缩写"
                    }
                ]
            },
            "bbox": [
                147,
                650,
                457,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Acl "
                    }
                ]
            },
            "bbox": [
                147,
                687,
                176,
                700
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过文件系统的挂装选项实现 ACL 支持"
                    }
                ]
            },
            "bbox": [
                147,
                705,
                453,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看ext4文件的默认选项"
                    }
                ]
            },
            "bbox": [
                147,
                724,
                352,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "存取 ACL "
                    }
                ]
            },
            "bbox": [
                147,
                743,
                221,
                756
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "对指定文件或目录的存取控制列表"
                    }
                ]
            },
            "bbox": [
                147,
                760,
                415,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认 ACL "
                    }
                ]
            },
            "bbox": [
                147,
                778,
                221,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ACL 工具"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                221,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Gerfacl、serfacl "
                    }
                ]
            },
            "bbox": [
                147,
                816,
                282,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "程序"
                    }
                ]
            },
            "bbox": [
                147,
                834,
                186,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "进程"
                    }
                ]
            },
            "bbox": [
                147,
                853,
                186,
                866
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "职业/任务"
                    }
                ]
            },
            "bbox": [
                147,
                872,
                226,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "长须知识一个金泰的指令级和"
                    }
                ]
            },
            "bbox": [
                147,
                890,
                379,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "进程时资源申请。调度、和独立运行的单位，因此，它使用系统中的运行资源；而程序不能申请系统资源"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                850,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux时多用户多任务系统"
                    }
                ]
            },
            "bbox": [
                146,
                130,
                359,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "每个用户均可同时运行多个程序。为了区分每一个，进程号pid 是唯一地"
                    }
                ]
            },
            "bbox": [
                144,
                148,
                715,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux采用分时技术来处理"
                    }
                ]
            },
            "bbox": [
                146,
                168,
                359,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "西东启动后第一个进程是 init systemd"
                    }
                ]
            },
            "bbox": [
                146,
                186,
                448,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Init 是唯一系统内核"
                    }
                ]
            },
            "bbox": [
                146,
                205,
                307,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "它的 pid 是 1"
                    }
                ]
            },
            "bbox": [
                147,
                223,
                252,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "出了init之外每个进程都由父进程"
                    }
                ]
            },
            "bbox": [
                146,
                241,
                418,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Ruid。Rgideuid、egid "
                    }
                ]
            },
            "bbox": [
                146,
                261,
                334,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "交互进程 由 shell 启动进程 批处理进程 守护进程 daemon"
                    }
                ]
            },
            "bbox": [
                146,
                279,
                601,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "前台进程 后台进程"
                    }
                ]
            },
            "bbox": [
                147,
                297,
                297,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "运行后台进程的方法是在命令行最后加上&"
                    }
                ]
            },
            "bbox": [
                146,
                315,
                482,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一个中断只能同时存在一个前台任务，但是可以由多个后台任务"
                    }
                ]
            },
            "bbox": [
                146,
                334,
                643,
                350
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看系统中的进程使用 ps 命令查看进程状态信息"
                    }
                ]
            },
            "bbox": [
                146,
                353,
                531,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "输出项包括：识别号 pid 中断"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                379,
                387
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "程序开发基础"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                448,
                312,
                470
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "C Programming Language "
                    }
                ]
            },
            "bbox": [
                144,
                514,
                369,
                531
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Edit/Compile/Link/Run "
                    }
                ]
            },
            "bbox": [
                146,
                533,
                337,
                549
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc for C program compiling in Linux "
                    }
                ]
            },
            "bbox": [
                146,
                552,
                457,
                568
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gdb for debugging "
                    }
                ]
            },
            "bbox": [
                146,
                571,
                307,
                587
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gprof for performance tuning "
                    }
                ]
            },
            "bbox": [
                146,
                589,
                396,
                605
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "make and makefile "
                    }
                ]
            },
            "bbox": [
                146,
                608,
                309,
                621
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "程序的编译过程"
                    }
                ]
            },
            "bbox": [
                146,
                644,
                275,
                659
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/7588519c7f12e96c163525f9b3409ce4a08a894a2f7e00d9e8483feb1b56118b.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                157,
                95,
                737,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编译，链接和运行"
                    }
                ]
            },
            "bbox": [
                144,
                351,
                294,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编译器"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                206,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Gcc gnu compiler collection "
                    }
                ]
            },
            "bbox": [
                144,
                390,
                384,
                406
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Gnu 计划创建一个 unix-like 操作系统，免费软件。推动了在程序员之间的自由和合作\"GNU C Compiler“  \"GNU Compiler Collection\""
                    }
                ]
            },
            "bbox": [
                144,
                407,
                815,
                443
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "support many languages such as C (gcc), "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ \\mathsf { C } } ^ { + + } \\left( { \\mathsf { g } } ^ { + + } \\right) ,"
                    },
                    {
                        "type": "text",
                        "content": ", Objective-C, Objective- "
                    },
                    {
                        "type": "equation_inline",
                        "content": "C ^ { + + }"
                    },
                    {
                        "type": "text",
                        "content": ", Java (gcj), Fortran (gfortran), Ada (gnat), Go (gccgo), OpenMP, Cilk Plus, and OpenAcc. "
                    }
                ]
            },
            "bbox": [
                144,
                445,
                848,
                481
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc 是一个开发应用和写操作系统的。也叫做 gnu toolchain"
                    }
                ]
            },
            "bbox": [
                144,
                501,
                618,
                517
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "1、 编译器 gcc such as "
                            },
                            {
                                "type": "equation_inline",
                                "content": "\\subset / \\subset + +"
                            },
                            {
                                "type": "text",
                                "content": "and Objective- "
                            },
                            {
                                "type": "equation_inline",
                                "content": "\\cdot \\mathsf { C } / \\mathsf { C } + +"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "2、 Gnu make"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "3、 Gnu binutils"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "4、Gnu debugger "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "5、Gnu autotools "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "6、Gnu bison "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                236,
                520,
                653,
                626
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Gcc是可移植的、交叉编译器，可以跨平台"
                    }
                ]
            },
            "bbox": [
                144,
                631,
                484,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "也支持 windows（cygwin（unix emulator under windows） 、mingw（minimalistgnu forwindows）。、mingu-w64）"
                    }
                ]
            },
            "bbox": [
                144,
                649,
                848,
                684
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Windows/intel 包括 x86 32 位指令集 i868 ‘x86——64 64 位指令集"
                    }
                ]
            },
            "bbox": [
                144,
                686,
                675,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "32 位编译器能运行在 32 位、64 位向后兼容"
                    }
                ]
            },
            "bbox": [
                144,
                705,
                490,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "但是64位编译器、程序只能运行在64位上"
                    }
                ]
            },
            "bbox": [
                144,
                722,
                487,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Cygwin 需要依赖"
                    }
                ]
            },
            "bbox": [
                146,
                741,
                285,
                758
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Mingw 更加简单 "
                    }
                ]
            },
            "bbox": [
                146,
                760,
                280,
                777
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc "
                    }
                ]
            },
            "bbox": [
                146,
                781,
                181,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc [options] [filenames] "
                    }
                ]
            },
            "bbox": [
                146,
                797,
                368,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "- options 为编译选项"
                    }
                ]
            },
            "bbox": [
                146,
                816,
                315,
                832
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "filenames为需要编译的文件名"
                    }
                ]
            },
            "bbox": [
                146,
                835,
                394,
                850
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc test.c # create “a.out” file "
                    }
                ]
            },
            "bbox": [
                146,
                853,
                398,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc –o test test.c # create “test” file "
                    }
                ]
            },
            "bbox": [
                146,
                872,
                443,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc test.c –o test "
                    }
                ]
            },
            "bbox": [
                146,
                891,
                289,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gdb "
                    }
                ]
            },
            "bbox": [
                146,
                93,
                184,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc –g –o test test.c "
                    }
                ]
            },
            "bbox": [
                146,
                112,
                312,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gdb test "
                    }
                ]
            },
            "bbox": [
                147,
                131,
                221,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Example: "
                    }
                ]
            },
            "bbox": [
                147,
                149,
                226,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc hello.c //生成可执行文件 a.out"
                    }
                ]
            },
            "bbox": [
                146,
                167,
                443,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc hello.c -o hello //生成可执行文件 hello"
                    }
                ]
            },
            "bbox": [
                146,
                186,
                512,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc -c hello.c -o hello.o //生成目标文件 hello.o"
                    }
                ]
            },
            "bbox": [
                146,
                204,
                557,
                221
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc hello1.c hello2.c -o hello //多文件编译"
                    }
                ]
            },
            "bbox": [
                146,
                223,
                512,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc -E hello.c -o hello.i //预处理后生成 hello.i"
                    }
                ]
            },
            "bbox": [
                146,
                241,
                547,
                258
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc -S hello.c -o hello.s //生成汇编代码 hello.s"
                    }
                ]
            },
            "bbox": [
                146,
                260,
                554,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc -c -I /usr/dev/mysql/include test.c -o test.o "
                    }
                ]
            },
            "bbox": [
                146,
                278,
                554,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "gcc -L /usr/dev/mysql/lib -lmysqlclient test.o -o test "
                    }
                ]
            },
            "bbox": [
                146,
                297,
                594,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-o 生成可执行文件"
                    }
                ]
            },
            "bbox": [
                146,
                351,
                295,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-c 生成目标文件.o"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                290,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-E 预处理后生成 hello.i"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                331,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-S 生成汇编代码 hello.s"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                334,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-I 头文件"
                    }
                ]
            },
            "bbox": [
                146,
                426,
                221,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-L 库的路径 "
                    }
                ]
            },
            "bbox": [
                147,
                445,
                240,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Make "
                    }
                ]
            },
            "bbox": [
                146,
                464,
                196,
                476
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "一个程序包含多个源文件"
                    }
                ]
            },
            "bbox": [
                146,
                482,
                344,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "全部重新编译需要花费时间，你只需要编译一些文件"
                    }
                ]
            },
            "bbox": [
                146,
                500,
                557,
                516
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/07f7e876812d3d2040cc068589e6f5b764af4928a1f778c518f0de6415391b0e.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                146,
                517,
                786,
                752
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/a3f02bc1bbab3e899095c75e781d8ad6c53769d1d6375a308dc8ab99d4af3d18.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                90,
                722,
                278
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "makefile 的结构"
                    }
                ]
            },
            "bbox": [
                147,
                279,
                278,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "objfile: files… "
                    }
                ]
            },
            "bbox": [
                147,
                297,
                258,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 文件依赖"
                    }
                ]
            },
            "bbox": [
                329,
                298,
                418,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "(tab)[commands] "
                    }
                ]
            },
            "bbox": [
                147,
                316,
                292,
                332
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " 执行命令"
                    }
                ]
            },
            "bbox": [
                322,
                316,
                410,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "(tab)[commands] "
                    }
                ]
            },
            "bbox": [
                147,
                335,
                292,
                349
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "(tab)[commands] "
                    }
                ],
                "level": 1
            },
            "bbox": [
                268,
                348,
                438,
                363
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "myprog : foo.o bar.0 "
                    }
                ]
            },
            "bbox": [
                191,
                385,
                406,
                400
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc foo.o bar.o -o myprog "
                    }
                ]
            },
            "bbox": [
                213,
                401,
                475,
                414
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "foo.o : foo.c foo.h bar.h "
                    }
                ]
            },
            "bbox": [
                194,
                428,
                455,
                441
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc -c foo.c -o foo.o "
                    }
                ]
            },
            "bbox": [
                215,
                444,
                433,
                457
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "bar.o : bar.c bar.h "
                    }
                ]
            },
            "bbox": [
                193,
                470,
                393,
                485
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc -c bar.c -o bar.o "
                    }
                ]
            },
            "bbox": [
                213,
                487,
                433,
                500
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Myprog依赖于foo.o和bar.o "
                    }
                ]
            },
            "bbox": [
                497,
                360,
                695,
                374
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "两个文件。"
                    }
                ]
            },
            "bbox": [
                497,
                374,
                574,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "生成myprog文件使用的命令。"
                    }
                ]
            },
            "bbox": [
                517,
                411,
                724,
                426
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "· makefile "
                    }
                ],
                "level": 1
            },
            "bbox": [
                193,
                577,
                295,
                594
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "calc: add.. sub.. mult.. div.o main.c "
                    }
                ]
            },
            "bbox": [
                179,
                606,
                564,
                620
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc -o calc main.c add.o sub.o mult.o div.o "
                    }
                ]
            },
            "bbox": [
                242,
                621,
                687,
                636
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "add.o: defs.h add.c "
                    }
                ]
            },
            "bbox": [
                181,
                637,
                381,
                649
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc -c add.c "
                    }
                ]
            },
            "bbox": [
                243,
                652,
                369,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "sub.o: defs.h sub.c "
                    }
                ]
            },
            "bbox": [
                181,
                665,
                381,
                678
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc -c sub.c "
                    }
                ]
            },
            "bbox": [
                243,
                681,
                369,
                694
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "mult.o: mult.c "
                    }
                ]
            },
            "bbox": [
                181,
                695,
                329,
                707
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc -c mult.c "
                    }
                ]
            },
            "bbox": [
                243,
                711,
                379,
                722
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "div.o: div.c "
                    }
                ]
            },
            "bbox": [
                181,
                724,
                307,
                736
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " gcc -c div.c "
                    }
                ]
            },
            "bbox": [
                243,
                739,
                369,
                752
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "增加 clean"
                    }
                ]
            },
            "bbox": [
                146,
                797,
                233,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "clean: "
                    }
                ]
            },
            "bbox": [
                147,
                816,
                200,
                829
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "rm calc add.o sub.o mult.o div.o "
                    }
                ]
            },
            "bbox": [
                184,
                835,
                450,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "How to use ‘make’? "
                    }
                ]
            },
            "bbox": [
                147,
                853,
                307,
                866
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "make "
                    }
                ]
            },
            "bbox": [
                147,
                872,
                196,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "make –f myfile #\"myfile\" is makefile "
                    }
                ]
            },
            "bbox": [
                147,
                890,
                460,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "make clean #delete all object file "
                    }
                ]
            },
            "bbox": [
                146,
                93,
                463,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Default rules "
                    }
                ]
            },
            "bbox": [
                147,
                112,
                258,
                126
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Simplify the makefile "
                    }
                ]
            },
            "bbox": [
                147,
                130,
                324,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "C program  object file "
                    }
                ]
            },
            "bbox": [
                147,
                149,
                339,
                165
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "calc: main.c add.o sub.o mult.o div.o gcc -o calc main.c add.o sub.o mult.o div.o   \nadd.o sub.o: defends.h   \nclean: rm add.o sub.o mult.o div.o main.o "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                146,
                181,
                796,
                303
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#ifndef "
                    }
                ]
            },
            "bbox": [
                146,
                315,
                213,
                329
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                147,
                335,
                189,
                348
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#dendif "
                    }
                ]
            },
            "bbox": [
                147,
                353,
                216,
                366
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "objfile：files "
                    }
                ]
            },
            "bbox": [
                147,
                370,
                253,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Tab command "
                    }
                ]
            },
            "bbox": [
                147,
                391,
                268,
                404
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Myprog "
                    }
                ]
            },
            "bbox": [
                147,
                409,
                215,
                425
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Clean 并非真正的依赖目标而是伪目标 "
                    }
                ]
            },
            "bbox": [
                147,
                426,
                448,
                441
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "编写完成后"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                238,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Make "
                    }
                ]
            },
            "bbox": [
                147,
                464,
                196,
                476
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Make -f myfile"
                    }
                ]
            },
            "bbox": [
                147,
                482,
                268,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Make clean 所有目标文件清除"
                    }
                ]
            },
            "bbox": [
                147,
                501,
                389,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认的规则 "
                    }
                ]
            },
            "bbox": [
                147,
                520,
                238,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ".c 文件->.o 文件"
                    }
                ]
            },
            "bbox": [
                147,
                539,
                273,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "为了简化内容，宏变量"
                    }
                ]
            },
            "bbox": [
                147,
                557,
                327,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以 macros"
                    }
                ]
            },
            "bbox": [
                147,
                576,
                250,
                589
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "TAB][commands] Myprog依赖于foo.o和bar.o两个文件。   \nmyprog:foo.o bar.o gcc foo.o bar.o -o myprog 生成myprog文件使用的命令。   \nfoo.o:foo.c foo.h bar.h gcc-c foo.c -o foo.o   \nbar.o:bar.c bar.h gcc-c bar.c -o bar.o"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                590,
                757,
                778
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/5c897ead6015a9ea32e36c645cec30039c0d68e53f25276691c381be70acbc89.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                152,
                91,
                633,
                265
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Cc c 编译器"
                    }
                ]
            },
            "bbox": [
                147,
                278,
                240,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Cflags 特殊的选项"
                    }
                ]
            },
            "bbox": [
                147,
                297,
                295,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 0"
                    },
                    {
                        "type": "text",
                        "content": "当前目标的名字 依赖项的第一个文件 依赖项的所有文件"
                    }
                ]
            },
            "bbox": [
                147,
                315,
                665,
                331
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/da21cf6b9617a2ac6a35ad40827509244d8a0e0c05e7d500493476960e72be7b.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                350,
                636,
                499
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Example "
                    }
                ]
            },
            "bbox": [
                147,
                520,
                221,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "{ \\mathsf { C } } { \\mathsf { C } } { \\mathsf { = } } { \\mathsf { g } } { \\mathsf { + } } { \\mathsf { + } }"
                    }
                ]
            },
            "bbox": [
                147,
                539,
                213,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#LD=/usr/bin/ld "
                    }
                ]
            },
            "bbox": [
                149,
                557,
                282,
                570
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "INCLUDES=-I /usr/include/mysql "
                    }
                ]
            },
            "bbox": [
                149,
                575,
                416,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-I /usr/include "
                    }
                ]
            },
            "bbox": [
                203,
                594,
                319,
                607
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LIBS "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ \\bf \\Pi } = { \\bf \\cdot }"
                    },
                    {
                        "type": "text",
                        "content": "-L/lib –L /usr/lib/mysql "
                    }
                ]
            },
            "bbox": [
                147,
                631,
                381,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-lmysqlclient -lpthread "
                    }
                ]
            },
            "bbox": [
                255,
                649,
                440,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "CPPFLAGS "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathbf { \\alpha } _ { \\mathbf { - } } \\mathbf { \\alpha } _ { \\mathbf { - } }"
                    },
                    {
                        "type": "text",
                        "content": "-DLINUX -D_DEBUGE -O0 "
                    }
                ]
            },
            "bbox": [
                147,
                686,
                450,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-w -g –I ./src "
                    }
                ]
            },
            "bbox": [
                289,
                706,
                391,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "libsrcs=$(wildcard src/*.cpp) "
                    }
                ]
            },
            "bbox": [
                147,
                760,
                383,
                776
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "libobjs "
                    },
                    {
                        "type": "equation_inline",
                        "content": "= \\$ 5"
                    },
                    {
                        "type": "text",
                        "content": "(libsrcs:.cpp=.o) "
                    }
                ]
            },
            "bbox": [
                147,
                797,
                352,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "des_libsrcs=$(wildcard src/*.c) "
                    }
                ]
            },
            "bbox": [
                147,
                835,
                400,
                850
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "des_libobjs "
                    },
                    {
                        "type": "equation_inline",
                        "content": "{ \\ : = } \\$ 9"
                    },
                    {
                        "type": "text",
                        "content": "(des_libsrcs:.c=.o) "
                    }
                ]
            },
            "bbox": [
                147,
                871,
                405,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "静态方式定义宏"
                    }
                ]
            },
            "bbox": [
                147,
                890,
                273,
                904
            ]
        }
    ],
    [
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "server.exe: $(libobjs)gnu-md5.o\nserver.o $(des_libobjs)\n$(CC)-DDEBUGE -g -o $@ $^ -lptrhead\n$(INCLUDE) $(LIBS) "
                    }
                ],
                "code_language": "makefile"
            },
            "bbox": [
                147,
                93,
                470,
                165
            ]
        },
        {
            "type": "algorithm",
            "content": {
                "algorithm_caption": [],
                "algorithm_content": [
                    {
                        "type": "text",
                        "content": "%.o:%.cpp\n "
                    },
                    {
                        "type": "equation_inline",
                        "content": "(CC)"
                    },
                    {
                        "type": "text",
                        "content": " (CPPFLAGS) -g -c -o  "
                    },
                    {
                        "type": "equation_inline",
                        "content": "@"
                    },
                    {
                        "type": "text",
                        "content": " < "
                    }
                ]
            },
            "bbox": [
                147,
                186,
                438,
                219
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "%.o:%.c\ngcc -g -c -o $@ $< "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                223,
                315,
                258
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "server.o: server.c server.h "
                    }
                ],
                "code_language": "typescript"
            },
            "bbox": [
                147,
                279,
                356,
                292
            ]
        },
        {
            "type": "algorithm",
            "content": {
                "algorithm_caption": [],
                "algorithm_content": [
                    {
                        "type": "equation_inline",
                        "content": "(CC) -c -w -g -DLINUX -o"
                    },
                    {
                        "type": "text",
                        "content": "@  "
                    },
                    {
                        "type": "equation_inline",
                        "content": "<"
                    },
                    {
                        "type": "equation_inline",
                        "content": "(INCLUDES)"
                    }
                ]
            },
            "bbox": [
                184,
                297,
                714,
                313
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "gnu-md5.o:gnu-md5.cgnu-md5.h "
                    }
                ],
                "code_language": "css"
            },
            "bbox": [
                147,
                334,
                436,
                350
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "$(CC) -c -g -o $@ $<"
                    }
                ],
                "code_language": "makefile"
            },
            "bbox": [
                184,
                353,
                344,
                368
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "lean: "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                372,
                191,
                385
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "rm -f server.exe server.o gnu-md5.o $(libobjs) $(des_libobjs) "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                154,
                390,
                695,
                406
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "### 远程拷备到服务器"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                329,
                441
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "install: "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                445,
                203,
                458
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "scp server.exe schkui@www.hostname.com:/var/bin_path/ "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                184,
                464,
                665,
                480
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Gdb 调试器"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                538,
                248,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "The gnu project debugger "
                    }
                ]
            },
            "bbox": [
                147,
                557,
                368,
                571
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "1、监视程序中变量的值"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "2、在程序中设置断点"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "3、程序性的单步执行"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                238,
                575,
                430,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Gcc 编译的时候需要添加选项-g -ggdb"
                    }
                ]
            },
            "bbox": [
                147,
                631,
                448,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "调试符号插入到生成的二进制代码"
                    }
                ]
            },
            "bbox": [
                147,
                649,
                415,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "默认不加入调试符号信息"
                    }
                ]
            },
            "bbox": [
                147,
                668,
                344,
                682
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可执行文件大小会增加"
                    }
                ]
            },
            "bbox": [
                147,
                686,
                327,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "调试信息分级-g1/-g2/-g3 "
                    }
                ]
            },
            "bbox": [
                147,
                705,
                349,
                721
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-g2 默认扩展到符号表、行号、局部或外部变量的信息"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-g3 包含级别 2 中的所有调试信息以及源代码中的宏"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-g1 不包含局部变量和与行号有关的调试信息，因此只能用回溯跟踪和堆栈转储"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                147,
                722,
                764,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "回溯追踪：指的是监视程序在运行过程中函数调用历史。"
                    }
                ]
            },
            "bbox": [
                147,
                778,
                581,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "堆栈转储：以原始的十六进制格式保存程序的执行环境。"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                581,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "任何调试选项都会急剧增大生成的二进制文件的大小，同时增加执行的开销，因此，通常仅用于开发和调试。"
                    }
                ]
            },
            "bbox": [
                146,
                816,
                847,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 gdb filename 启动 gdb，其中 filename 应为可执行文件"
                    }
                ]
            },
            "bbox": [
                147,
                853,
                631,
                868
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "Gdba .out "
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                872,
                238,
                885
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "Gdb 常用命令"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                890,
                258,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "R命令 使用命令r运行程序"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                359,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "如果在同一调试过程中需要多次运行程序(run)，后续再执行时便可直接使用 r 指令，系统会默认使用之前的参数。"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                847,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "进行调试过程中重新编译程序后，不必退出 gdb，使用 r 指令重新运行程序，gdb 会自动更新程序状态。"
                    }
                ]
            },
            "bbox": [
                144,
                167,
                847,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "List（I）命令"
                    }
                ]
            },
            "bbox": [
                144,
                223,
                257,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用来列出源文件中的部分源代码。（需要编译时加入"
                    }
                ]
            },
            "bbox": [
                144,
                241,
                556,
                255
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-g选项生成对应的编译符号）"
                    }
                ]
            },
            "bbox": [
                146,
                260,
                371,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "l source_file_name.c:col （l 源文件名：行号）"
                    }
                ]
            },
            "bbox": [
                144,
                279,
                505,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "l function_name，以函数为整体进行输出"
                    }
                ]
            },
            "bbox": [
                144,
                297,
                478,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "断点 b"
                    }
                ]
            },
            "bbox": [
                144,
                334,
                201,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "和继续执行c命令"
                    }
                ]
            },
            "bbox": [
                144,
                353,
                290,
                367
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Disable /enable 来停用/启用编号为 n 的断点"
                    }
                ]
            },
            "bbox": [
                144,
                370,
                502,
                385
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令b可以在需要地方放置断点，程序在断点位置停止运行"
                    }
                ]
            },
            "bbox": [
                144,
                390,
                608,
                404
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：b 断点位置"
                    }
                ]
            },
            "bbox": [
                146,
                407,
                289,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "其中，断点位置可以是行号，也可以是函数名(指定方式与l 指令类似)，也可以是地址。"
                    }
                ]
            },
            "bbox": [
                144,
                426,
                816,
                441
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 c 命令从断点继续执行后续指令。使用命令 disable/enable 断点号 可以启用/停用某断点。使用指令 d 可删除所有的断点，d 1 删除 breakpoint 1."
                    }
                ]
            },
            "bbox": [
                144,
                445,
                847,
                479
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "b 10 //在源代码10行处放置断点  \nb main //在main函数开始处放置断点  \nb *0x80480000 //在存放在0x80480000处的指令处放置断点，直接使用地址时需要使用 *地址 的格式  \nb 10 if a<10 //可以在断点中加入中断执行的条件，表示当a < 10时才会中断程序执行"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                164,
                483,
                840,
                550
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Watch 。"
                    }
                ]
            },
            "bbox": [
                144,
                575,
                253,
                590
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [],
                "code_content": [
                    {
                        "type": "text",
                        "content": "watch a //当变量a的值发生变化时，中断程序执行  \nwatch -1 a // watch指令指定了-1参数时，会将指令所接的表达式的计算结果作为地址，//观察该地址处的值的变化情况  \nrwatch a //当a的值被读取时，中断表达式的执行"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                164,
                612,
                662,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以为某一表达式设置观察点，当程序执行过程中表达式的值发生改变时，gdb 会中断程序执行，并显示表达式的变化情况"
                    }
                ]
            },
            "bbox": [
                144,
                741,
                847,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Disp 显示 打印命令 p"
                    }
                ]
            },
            "bbox": [
                146,
                778,
                315,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "P 打印命令"
                    }
                ]
            },
            "bbox": [
                146,
                797,
                236,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "disp(display)命令可以在每次程序暂停时显示指定变量的值"
                    }
                ]
            },
            "bbox": [
                144,
                816,
                606,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：disp 变量名"
                    }
                ]
            },
            "bbox": [
                146,
                834,
                295,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若输入的变量为数组名，则每次显示数组的所有元素，若为结构体，则输出结构体的所有成员的值。"
                    }
                ]
            },
            "bbox": [
                144,
                852,
                845,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "p(print)命令也将变量的值打印出来，用法与 diap 类似，但结果只显示一次。"
                    }
                ]
            },
            "bbox": [
                144,
                890,
                737,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "除变量外，p 命令还可以输出给定寄存器、给定地址处的值。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                615,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过一些参数对打印格式进行规定，如 /x 表示以16进制格式打印值，/t表示以二进制格式打印值。"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                847,
                146
            ]
        },
        {
            "type": "code",
            "content": {
                "code_caption": [
                    {
                        "type": "text",
                        "content": "其它显示类 info 命令"
                    }
                ],
                "code_content": [
                    {
                        "type": "text",
                        "content": "info reg //输出所有寄存器的当前值  \ninfo frame //输出栈帧的使用情况  \ninfo b n //其中n为指定的断点号，显示指定断点的状态信息，//不加参数n时，会显示所有的断点的信息  \n内存检查 examine"
                    }
                ],
                "code_language": "txt"
            },
            "bbox": [
                147,
                186,
                853,
                269
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "命令"
                    }
                ]
            },
            "bbox": [
                146,
                278,
                188,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "X fmt address "
                    }
                ]
            },
            "bbox": [
                144,
                297,
                265,
                311
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "x 命令用于检查内存中某一区域的值，"
                    }
                ]
            },
            "bbox": [
                144,
                315,
                435,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式：x fmt address"
                    }
                ]
            },
            "bbox": [
                144,
                334,
                317,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "其中 address 为内存地址的表达式，fmt 由 /重复次数 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\cdot ^ { + }"
                    },
                    {
                        "type": "text",
                        "content": "格式化字符 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ +"
                    },
                    {
                        "type": "text",
                        "content": "尺寸字符 组成。"
                    }
                ]
            },
            "bbox": [
                144,
                351,
                791,
                369
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式化字符有 o(octal，八进制)，x(hex，十六进制)， d(decimal，十进制)，u(unsigneddecimal，无符号十进 制 )，t(binary，二进 制)，f(float，浮点)，a(address，地址)，i(instruction ， 指 令 ) ， c(char ， 字 符 ) ， s(string ， 字 符 串 ). 尺 寸 字 符 有b(byte)，h(halfword)， w(word)， g(giant, 8 bytes)"
                    }
                ]
            },
            "bbox": [
                144,
                370,
                855,
                444
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "执行（s 与 n）命令"
                    }
                ]
            },
            "bbox": [
                144,
                463,
                300,
                478
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "回溯（bt）命令"
                    }
                ]
            },
            "bbox": [
                146,
                482,
                273,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置（set）指令"
                    }
                ]
            },
            "bbox": [
                146,
                501,
                280,
                516
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "·执行(s与n)命令 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                156,
                519,
                374,
                544
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "s与n指令都是表示执行下一条指令指令的意思"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "s指令会进入函数调用内部进行执行，即下一步为被调函数的第一指令。"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "n指令不进入函数调用内部，会将整个函数的执行过程当作一步执行。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                161,
                546,
                742,
                604
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "·回潮(bt)命令 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                157,
                636,
                344,
                661
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "回溯指令(backtrace)可以查看程序内存访问越界等错误信息，显示程序出错的位置，从而帮助定位程序错误。"
                    }
                ]
            },
            "bbox": [
                157,
                663,
                766,
                696
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "·设置(set)指令 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                157,
                722,
                354,
                747
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置指令set可以将指定的变量的值修改为调试所需要的值。如对于一个int型的变量X，可以使用setX=12将变量的值进行设置。"
                    }
                ]
            },
            "bbox": [
                161,
                750,
                759,
                783
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可以使用宏定义对一些常用指令进行定义。"
                    }
                ]
            },
            "bbox": [
                146,
                816,
                475,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "格式 ：define 宏名，并根据提示输入宏定义，以 end 作为结尾标志。"
                    }
                ]
            },
            "bbox": [
                144,
                834,
                680,
                850
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Cmake "
                    }
                ]
            },
            "bbox": [
                146,
                872,
                208,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "System call 系统调用"
                    }
                ]
            },
            "bbox": [
                146,
                890,
                317,
                906
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "C函数库为每个系统调用提供了一个同名函数。"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                510,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "调用函数的时候，如果有对应的系统调用，自动调用该系统调用。"
                    }
                ]
            },
            "bbox": [
                146,
                130,
                652,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "从程序员使用角度看，系统调用与 C 库函数使用方法相似。从执行角度看，系统调用运行在核心态，库函数运行在用户态。printf 与 printk"
                    }
                ]
            },
            "bbox": [
                146,
                167,
                633,
                221
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统调用引起状态切换，花销并不小。"
                    }
                ]
            },
            "bbox": [
                146,
                241,
                440,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "调用返回时引起系统重新调度"
                    }
                ]
            },
            "bbox": [
                146,
                278,
                381,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "整个系统调用的过程："
                    }
                ]
            },
            "bbox": [
                146,
                297,
                317,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "执行用户程序(如:fork)"
                    }
                ]
            },
            "bbox": [
                146,
                315,
                324,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "根据 glibc 中的函数实现，取得系统调用号并执行 int "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\$ 0 x80"
                    },
                    {
                        "type": "text",
                        "content": "产生中断。进行地址空间的转换和堆栈的切换，执行 SAVE_ALL。（进入内核模式）中断处理，根据系统调用表调用内核函数。"
                    }
                ]
            },
            "bbox": [
                146,
                334,
                694,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "执行内核函数。"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                263,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "执行 RESTORE_ALL 并返回用户模式。"
                    }
                ]
            },
            "bbox": [
                146,
                407,
                435,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "引发系统进程调度。"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                299,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "四个重要的宏"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                257,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SAVE_ALL "
                    }
                ]
            },
            "bbox": [
                147,
                464,
                228,
                478
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "保存用户模式的寄存器和堆栈信息,然后切换到内核模式"
                    }
                ]
            },
            "bbox": [
                146,
                482,
                579,
                499
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "RESTORE_ALL "
                    }
                ]
            },
            "bbox": [
                147,
                501,
                263,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "与 SAVE_ALL 相反"
                    }
                ]
            },
            "bbox": [
                147,
                520,
                289,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SWITH_KERNELSPACE "
                    }
                ]
            },
            "bbox": [
                147,
                538,
                329,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "实现地址空间的转换 "
                    }
                ]
            },
            "bbox": [
                147,
                557,
                309,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SWITH_USERSPACE "
                    }
                ]
            },
            "bbox": [
                147,
                575,
                309,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "arch/i386/kernel/entry.S "
                    }
                ]
            },
            "bbox": [
                147,
                594,
                349,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统调用表"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                240,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "arch/i386/kernel/entry.S "
                    }
                ]
            },
            "bbox": [
                147,
                631,
                349,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "配置 TCP/IP"
                    }
                ]
            },
            "bbox": [
                147,
                650,
                243,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "配置TCP/IP涉及以下一些文件"
                    }
                ]
            },
            "bbox": [
                147,
                668,
                388,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/resolv.conf－－DNS 服务器"
                    }
                ]
            },
            "bbox": [
                147,
                687,
                406,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/host.conf－－域名解析次序 "
                    }
                ]
            },
            "bbox": [
                147,
                705,
                406,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/hosts－－本地域名到IP的映射文件"
                    }
                ]
            },
            "bbox": [
                147,
                724,
                468,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/sysconfig/network－－网关、主机名 "
                    }
                ]
            },
            "bbox": [
                147,
                743,
                480,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/sysconfig/network-scripts/ifcfg.ethx－－网卡参数的主要文件"
                    }
                ]
            },
            "bbox": [
                147,
                760,
                485,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/network/interfaces－－Ubuntu 文件 ping ping [ hostname | IP address ] [options] ping 210.32.34.137 –c 10 "
                    }
                ]
            },
            "bbox": [
                146,
                797,
                482,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "netstat "
                    }
                ]
            },
            "bbox": [
                147,
                891,
                210,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "显示与网络有关的各种数据结构，如显示网络连接、路由表和网络接口信息。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                742,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "netstat -[ r | i ] [n] "
                    }
                ]
            },
            "bbox": [
                146,
                112,
                302,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "netstat -i -n (显示网络接口)"
                    }
                ]
            },
            "bbox": [
                147,
                130,
                376,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "netstat -r(显示路由表) "
                    }
                ]
            },
            "bbox": [
                147,
                149,
                331,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ifconfig "
                    }
                ]
            },
            "bbox": [
                147,
                167,
                213,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "显示当前有效网络接口的状态"
                    }
                ]
            },
            "bbox": [
                147,
                186,
                381,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "修改网络接口配置（暂时）"
                    }
                ]
            },
            "bbox": [
                147,
                204,
                352,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ifconfig [接口] "
                    }
                ]
            },
            "bbox": [
                147,
                224,
                268,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ifconfig eth0 #显示 eth0 网络接口的参数"
                    }
                ]
            },
            "bbox": [
                147,
                242,
                482,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ifconfig -a #显示所有网络接口参数"
                    }
                ]
            },
            "bbox": [
                147,
                260,
                448,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "route "
                    }
                ]
            },
            "bbox": [
                147,
                317,
                196,
                330
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "对内核的IP路由表进行操作。"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                376,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "route [add|del] [-net|-host] target [gw GW] "
                    }
                ]
            },
            "bbox": [
                147,
                353,
                509,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "[netmask Nm] [metric N] [[dev] If] "
                    }
                ]
            },
            "bbox": [
                189,
                370,
                472,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 add 表示增加一条路由条目，del 则删除"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                500,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/etc/inittab "
                    }
                ]
            },
            "bbox": [
                147,
                409,
                242,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "启动配置文件,每行分为四个域"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                386,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "code:runlevels:action:command "
                    }
                ]
            },
            "bbox": [
                166,
                445,
                433,
                458
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "code－－用单个或两个字符序列作为本行的标识，在文件中是唯一的。而某些记录必须使用特定的code才能使系统工作正常。"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                847,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "runlevels－－本行的运行级别。"
                    }
                ]
            },
            "bbox": [
                147,
                501,
                391,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "action－－指明 init 程序执行 command 的方式"
                    }
                ]
            },
            "bbox": [
                147,
                520,
                519,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "command－－给出相应记录行要执行的命令"
                    }
                ]
            },
            "bbox": [
                147,
                539,
                499,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Fork（）"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                211,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exec() #Load and overwrite current image with new one "
                    }
                ]
            },
            "bbox": [
                147,
                631,
                616,
                646
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "with fork() together, it can execute a shell command. "
                    }
                ]
            },
            "bbox": [
                147,
                649,
                581,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Example "
                    }
                ]
            },
            "bbox": [
                147,
                668,
                221,
                683
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "execl ( “/bin/ls”, “ls”, “-l”, (char *)0 ); "
                    }
                ]
            },
            "bbox": [
                147,
                703,
                435,
                720
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Terminate current process "
                    }
                ]
            },
            "bbox": [
                147,
                724,
                369,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exit(0) "
                    }
                ]
            },
            "bbox": [
                147,
                743,
                201,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exit(n)"
                    }
                ]
            },
            "bbox": [
                147,
                760,
                201,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "exit(-1) "
                    }
                ]
            },
            "bbox": [
                147,
                780,
                206,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "int open(const char *pathname, int flags,[mode_t mode])"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                623,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "pathname－－字符指针，指向所要打开文件的路径名。可以是相对路径也可以是绝对路径。"
                    }
                ]
            },
            "bbox": [
                147,
                816,
                847,
                850
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "flags－－是打开文件的方式，在头文件fcntl.h中定义几个常量："
                    }
                ]
            },
            "bbox": [
                147,
                853,
                645,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "O_RDONLY－－只读 "
                    }
                ]
            },
            "bbox": [
                147,
                872,
                312,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "O_WRONLY－－只写 "
                    }
                ]
            },
            "bbox": [
                147,
                891,
                315,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "O_TRUNC－－截断为 0 长度"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                373,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "O_CREAT－－如果文件不存在，创建新文件"
                    }
                ]
            },
            "bbox": [
                146,
                112,
                489,
                128
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "O_EXCL－－互斥 "
                    }
                ]
            },
            "bbox": [
                147,
                130,
                284,
                146
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "O_RDWR－－读写 "
                    }
                ]
            },
            "bbox": [
                147,
                149,
                294,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "O_APPEND－－追加"
                    }
                ]
            },
            "bbox": [
                147,
                168,
                312,
                183
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "mode－－可选参数，只有当 flags 参数为 O_CREAT 时该参数才有效，表示文件的默认权限。一般情况下不使用这个参数。"
                    }
                ]
            },
            "bbox": [
                146,
                186,
                848,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "返回值就是文件描述符，一个整数；打开出错时，返回-1。"
                    }
                ]
            },
            "bbox": [
                146,
                223,
                598,
                239
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "例："
                    }
                ]
            },
            "bbox": [
                147,
                241,
                176,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "fd "
                    },
                    {
                        "type": "equation_inline",
                        "content": "="
                    },
                    {
                        "type": "text",
                        "content": "open(\"file\", O_RDWR | O_CREAT | O_TRUNC, 0644); "
                    }
                ]
            },
            "bbox": [
                146,
                259,
                608,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ssize_t read(int filedes, void *buffer, size_t n); "
                    }
                ]
            },
            "bbox": [
                144,
                297,
                544,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "filedes－－文件描述符 "
                    }
                ]
            },
            "bbox": [
                147,
                315,
                329,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "buffer－－指向数组或结构的指针，读入的数据将填充到这里，一般就是数组本身的名字"
                    }
                ]
            },
            "bbox": [
                146,
                334,
                836,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "n－－期望读入数据的字节数"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                374,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "返回值是读入数据的字节数，非负的整数；读入出错时，返回-1。"
                    }
                ]
            },
            "bbox": [
                146,
                370,
                650,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ssize_t write(int filedes, const void *buffer, size_t n); "
                    }
                ]
            },
            "bbox": [
                146,
                390,
                680,
                406
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "filedes－－文件描述符 "
                    }
                ]
            },
            "bbox": [
                147,
                407,
                329,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "buffer－－指向数据缓冲区的指针"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                413,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "n－－要写入的数据的字节数"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                374,
                461
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "off_t lseek(int filedes, off_t offset, int start_flag); "
                    }
                ]
            },
            "bbox": [
                144,
                482,
                556,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "filedes－－一个已经打开的文件描述符"
                    }
                ]
            },
            "bbox": [
                147,
                501,
                452,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "offset－－表示新位置相对于起始位置的字节数"
                    }
                ]
            },
            "bbox": [
                147,
                519,
                515,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "start_flag－－整型，决定起始位置"
                    }
                ]
            },
            "bbox": [
                147,
                538,
                423,
                554
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SEEK_SET offset 是从文件的起始位置算起，通常为 0"
                    }
                ]
            },
            "bbox": [
                147,
                556,
                566,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SEEK_CUR offset是相对文件读写的当前位置而言的，通常为1"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                642,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SEEK_END offset 是相对文件尾而言，通常为 2"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                522,
                609
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "基础架构"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                653,
                258,
                674
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "守护进程（Daemon）"
                    }
                ]
            },
            "bbox": [
                146,
                718,
                317,
                734
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "始终在后台运行并响应合法请求的程序"
                    }
                ]
            },
            "bbox": [
                146,
                737,
                450,
                753
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SysVinit "
                    }
                ]
            },
            "bbox": [
                147,
                755,
                216,
                771
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Upstart "
                    }
                ]
            },
            "bbox": [
                147,
                775,
                213,
                790
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Systemd "
                    }
                ]
            },
            "bbox": [
                147,
                793,
                221,
                808
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "使用 systemctl 管理服务"
                    }
                ]
            },
            "bbox": [
                147,
                810,
                342,
                827
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "-缩写—全称"
                    }
                ]
            },
            "bbox": [
                147,
                829,
                245,
                845
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "已运行的服务"
                    }
                ]
            },
            "bbox": [
                147,
                848,
                255,
                863
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "为什么要安排调度进程任务"
                    }
                ]
            },
            "bbox": [
                147,
                866,
                361,
                882
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "调度任务的守护进程"
                    }
                ]
            },
            "bbox": [
                147,
                885,
                310,
                900
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "安排调度任务的"
                    }
                ]
            },
            "bbox": [
                147,
                93,
                275,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Crontab 文件"
                    }
                ]
            },
            "bbox": [
                147,
                112,
                257,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统日常 的 cron 任务"
                    }
                ]
            },
            "bbox": [
                147,
                148,
                322,
                164
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统日志服务"
                    }
                ]
            },
            "bbox": [
                147,
                168,
                257,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "日志系统和系统体制"
                    }
                ]
            },
            "bbox": [
                149,
                186,
                309,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "日志的用途"
                    }
                ]
            },
            "bbox": [
                149,
                205,
                240,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统审计、检查测追踪和分析统计"
                    }
                ]
            },
            "bbox": [
                149,
                223,
                415,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "日志的功能"
                    }
                ]
            },
            "bbox": [
                149,
                242,
                240,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "用于记录系统、程序运行中发送的各种实践"
                    }
                ]
            },
            "bbox": [
                147,
                260,
                485,
                275
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "通过阅读日志，有助于"
                    }
                ]
            },
            "bbox": [
                147,
                279,
                327,
                294
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "日志系统"
                    }
                ]
            },
            "bbox": [
                149,
                297,
                221,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "系统日志和内核消息捕捉的日志记录胸痛"
                    }
                ]
            },
            "bbox": [
                147,
                315,
                468,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "主要功能"
                    }
                ]
            },
            "bbox": [
                149,
                334,
                221,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "分类存放日志、方便日志管理"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                379,
                368
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "可将日志消息记录到远程主机"
                    }
                ]
            },
            "bbox": [
                147,
                372,
                379,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                147,
                391,
                203,
                406
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Rsyslog 采用模块化设计，是 syslog 的替代品"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                505,
                425
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "实现了基本的 syslog 协议"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                351,
                443
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "输入模块 "
                    }
                ]
            },
            "bbox": [
                147,
                445,
                221,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Imklg、imsock、imfile、imtcp"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                401,
                481
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "预处理模块"
                    }
                ]
            },
            "bbox": [
                147,
                483,
                238,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "主队列"
                    }
                ]
            },
            "bbox": [
                149,
                501,
                203,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "过滤模块 "
                    }
                ]
            },
            "bbox": [
                147,
                520,
                221,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "执行队列 "
                    }
                ]
            },
            "bbox": [
                147,
                538,
                221,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "输出模块 "
                    }
                ]
            },
            "bbox": [
                147,
                557,
                221,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                149,
                576,
                213,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "全局指令"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                220,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "模板"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                186,
                626
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "输出通道"
                    }
                ]
            },
            "bbox": [
                147,
                631,
                221,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "规则 "
                    }
                ]
            },
            "bbox": [
                147,
                650,
                186,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Facility.priority action 动作 "
                    }
                ]
            },
            "bbox": [
                147,
                668,
                366,
                684
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "日志级别"
                    }
                ]
            },
            "bbox": [
                154,
                686,
                226,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "磁盘存储 "
                    }
                ]
            },
            "bbox": [
                147,
                705,
                221,
                719
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "统计/statistic "
                    }
                ]
            },
            "bbox": [
                147,
                724,
                257,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "wc [-clw] file_list "
                    }
                ]
            },
            "bbox": [
                147,
                741,
                284,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Ex: ls -l | wc –l "
                    }
                ]
            },
            "bbox": [
                149,
                760,
                267,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "磁盘存储/Disk store "
                    }
                ]
            },
            "bbox": [
                147,
                778,
                310,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "df disk usage "
                    }
                ]
            },
            "bbox": [
                147,
                797,
                260,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "du disk space "
                    }
                ]
            },
            "bbox": [
                147,
                816,
                262,
                831
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "文件系统装卸/mount/unmount"
                    }
                ]
            },
            "bbox": [
                147,
                835,
                403,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Ex: mount –t iso9660 /dev/cdrom /mnt/cdrom "
                    }
                ]
            },
            "bbox": [
                147,
                853,
                527,
                868
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "umount /dev/cdrom "
                    }
                ]
            },
            "bbox": [
                174,
                872,
                344,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "别名/alias"
                    }
                ]
            },
            "bbox": [
                147,
                890,
                230,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "give alias name to complicated command "
                    }
                ]
            },
            "bbox": [
                146,
                93,
                495,
                109
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "alias myls=‘ls –l | more’ "
                    }
                ]
            },
            "bbox": [
                147,
                111,
                342,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SSH "
                    }
                ]
            },
            "bbox": [
                147,
                131,
                184,
                143
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "TCP 协议的风险 "
                    }
                ]
            },
            "bbox": [
                146,
                149,
                273,
                162
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "1、窃听——获取通信内容"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "2、篡改——修改通信内容"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "3、冒充——猫村他人身份参与同学"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                238,
                168,
                517,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "SSL "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\cdot ^ { - }"
                    },
                    {
                        "type": "text",
                        "content": "secure socket layer（安全套接字层）"
                    }
                ]
            },
            "bbox": [
                146,
                223,
                477,
                239
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "1、提供身份验证的客户端‘"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "2、在一个公共通信通道发送之前对数据进行加密"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "3、确保数据完整性"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "4、有效率"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                147,
                241,
                532,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "5、在双方协商使用的主要加密算法"
                    }
                ]
            },
            "bbox": [
                147,
                315,
                428,
                331
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "对称加密"
                    }
                ]
            },
            "bbox": [
                147,
                334,
                221,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "非对称加密"
                    }
                ]
            },
            "bbox": [
                147,
                353,
                238,
                367
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "数字签名 "
                    }
                ]
            },
            "bbox": [
                147,
                370,
                220,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "数字签证（x509v.3）"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                307,
                405
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "明确和正式的规范"
                    }
                ]
            },
            "bbox": [
                147,
                407,
                292,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "协商参数"
                    }
                ]
            },
            "bbox": [
                147,
                426,
                221,
                442
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在连接时的握手"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                273,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "重用先前谈判的参数"
                    }
                ]
            },
            "bbox": [
                147,
                464,
                309,
                478
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "电子商务"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                492,
                238,
                507
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "订单：订购的产品表单使用SSL发送"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "付款：使用SSL发送信用卡号等数据"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                157,
                511,
                442,
                542
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "访问安全信息"
                    }
                ],
                "level": 1
            },
            "bbox": [
                157,
                546,
                275,
                561
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "信息通信只能由“合格的”用户访问"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "发送密码或其他敏感数据"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                157,
                564,
                442,
                596
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·SSL-Secure Sockets Layer Version 2.0 "
                    }
                ]
            },
            "bbox": [
                157,
                648,
                426,
                659
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Initially developed by Netscape "
                    }
                ]
            },
            "bbox": [
                178,
                659,
                357,
                670
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "SSL2.0is sensitive toman-in-the-middle attacks leading e.g.to the negotiation of weak encryption keys "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "uSSL2.0 should not be used anymore "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                179,
                670,
                487,
                696
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·SSL-Secure Sockets LaverVersion 3.0 "
                    }
                ]
            },
            "bbox": [
                163,
                697,
                423,
                707
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "internet Draft authored by Netscape.November1996 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "Supported byall browsers "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "Vulnerable to the BEAST Cipher-Block-Chaining (CBC)attack "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                178,
                708,
                512,
                738
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "TLS-Transport Layer Security Version 1.0 (SSL3.1) "
                    }
                ]
            },
            "bbox": [
                163,
                739,
                502,
                749
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "IETFRFC2246,January1999 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "TLS 1.0 Ist not backwards compatible to SSL 3.0 (differences in MAC computation,PRF function formaster secretand keymaterial) "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "Supported byall browsers "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "Vulnerable tothe BEASTCipber-Block-Chaining (CBC)attack "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                179,
                750,
                546,
                795
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/b85f1d753ab271f4fb165278c746cb0e4a1a01c838573ce51f78379928aa0baf.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                149,
                96,
                193,
                124
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "TLS增强的基于TCP的应用协议"
                    }
                ],
                "level": 1
            },
            "bbox": [
                194,
                95,
                359,
                124
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/6ff889725aca7fb999dd5eab0f95e9f74f2c8c9afbecd927465adce0228a5aaf.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>服务名</td><td>端口号</td><td>实现的安全服务</td></tr><tr><td>https</td><td>443/tcp</td><td>http protocol over TLS</td></tr><tr><td>smtps</td><td>465/tcp</td><td>smtp protocol over TLS</td></tr><tr><td>smtp</td><td>25/tcp</td><td>STARTTLS keyword (RFC 2487)</td></tr><tr><td>imaps</td><td>993/tcp</td><td>imap4 protocol over TLS</td></tr><tr><td>imap4</td><td>143/tcp</td><td>STARTTLS keyword (RFC 2596)</td></tr><tr><td>pop3s</td><td>995/tcp</td><td>pop3 protocol over TLS</td></tr><tr><td>pop3</td><td>110/tcp</td><td>STLS keyword (RFC 2595)</td></tr><tr><td>Idaps</td><td>636/tcp</td><td>Idap protocol over TLS</td></tr><tr><td>nntp</td><td>563/tcp</td><td>nntp protocol over TLS</td></tr><tr><td>FTPS-Data</td><td>989/tcp</td><td>FTP Data over SSL/TLS</td></tr><tr><td>FTPS</td><td>990/tcp</td><td>FTP Control over SSL/TLS</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                159,
                131,
                438,
                250
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "SSL协议组件"
                    }
                ],
                "level": 1
            },
            "bbox": [
                206,
                269,
                352,
                292
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "握手协议（Handshakeprotocol）"
                    }
                ]
            },
            "bbox": [
                157,
                313,
                455,
                330
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□允许当事人协商需要交易的安全性的不同算法"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "允许当事人之问的任何身份验证"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                174,
                332,
                527,
                363
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "警报协议（Alertprotocol）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "通知异常情况或报告问题"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "更改密码说明协议（ChangeCipher Spec protocol）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "强制一个新的握手的执行重新协商安全参数，并重复认证"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "记录协议（Recordprotocol）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "涉及的压缩，加密和MAC "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                157,
                367,
                561,
                486
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Open SSL "
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                501,
                228,
                516
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "OpenSSL特性"
                    }
                ],
                "level": 1
            },
            "bbox": [
                206,
                518,
                363,
                533
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "开源，基于一个Apache风格的许可证发布"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "提供了SSLv2/v3和TLSv1.0的全功能实现"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·用C语言开发，具有优秀的跨平台性能"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "基于PKI标准，支持X509证书标准"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "提供众多的加密和摘要算法库"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "提供了命令行界面（openssl命令）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·提供了应用程序编程接口"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                151,
                563,
                527,
                696
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "功能"
                    }
                ],
                "level": 1
            },
            "bbox": [
                152,
                118,
                194,
                135
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "创建RSA，DSA&DH密钥对"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "公共密钥加密操作"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "创建X509证书，CSRs&CRLs "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "生成消息摘要"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "使用加密算法加密&解密"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "SSL/TLS服务器端/客户端测试"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "处理S/MIME签名或加密邮件"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "时间戳记的请求，生成和验证"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "创建和管理CA"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                152,
                137,
                401,
                287
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "OpenSSL 的命令和算法"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                297,
                334,
                313
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                166,
                326,
                519,
                444
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                169,
                510,
                549,
                655
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                152,
                718,
                515,
                734
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                161,
                738,
                421,
                769
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                152,
                772,
                512,
                789
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                161,
                791,
                517,
                851
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/b252cd49cbe02651e20881ae10e69a1f8282d12e197925de730523b6a0d34125.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                97,
                793,
                288
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "对称加密/解密"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                315,
                263,
                331
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/47a450f0e41dfb8c5381c4087f83280e7ec405a6d54c3377c85bcbb7378bae61.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                152,
                337,
                672,
                549
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "非对称加密和解密"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                574,
                292,
                590
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/8a30e7bca29df99f6cd121cef09ce9097cef1a05519373ed842df0925bbc761a.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                596,
                705,
                807
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/14e6550cbf3a413ff555225f6b3762c487d4d4029e1f0be7eda24bd68068e7bc.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                99,
                228,
                162
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "加密/解密（非对称）"
                    }
                ],
                "level": 1
            },
            "bbox": [
                228,
                105,
                537,
                133
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "生成密钥对"
                    }
                ],
                "level": 1
            },
            "bbox": [
                156,
                174,
                310,
                195
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "equation_inline",
                                "content": "\\$ 9"
                            },
                            {
                                "type": "text",
                                "content": "openssl genrsa-outpriv.keyfile2048 "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "equation_inline",
                                "content": "\\$ 9"
                            },
                            {
                                "type": "text",
                                "content": "opensslrsa-inpriv.keyfile-pubout "
                            },
                            {
                                "type": "equation_inline",
                                "content": ">"
                            },
                            {
                                "type": "text",
                                "content": "pub.keyfile "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                178,
                199,
                685,
                242
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "·用公钥加密 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                157,
                244,
                310,
                265
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 5"
                    },
                    {
                        "type": "text",
                        "content": "openssl rsautl-in inputfile-out outputfile\\ -pubin-inkeypub.keyfile-encrypt "
                    }
                ]
            },
            "bbox": [
                179,
                269,
                623,
                312
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "·用私钥解密 "
                    }
                ],
                "level": 1
            },
            "bbox": [
                157,
                313,
                310,
                335
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "opensslrsautl-ininputfile-outoutputfile\\ -inkeypriv.keyfiledecrypt "
                    }
                ]
            },
            "bbox": [
                179,
                338,
                623,
                382
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/270b1ef0f055502b0d5807333740d44d7d8d2b806606fbf34c7dbd77967cfce6.jpg"
                },
                "image_caption": [
                    {
                        "type": "text",
                        "content": "数字签名 "
                    }
                ],
                "image_footnote": []
            },
            "bbox": [
                147,
                445,
                721,
                682
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [],
                "level": 1
            },
            "bbox": [
                156,
                734,
                272,
                753
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                178,
                756,
                542,
                788
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [],
                "level": 1
            },
            "bbox": [
                157,
                790,
                272,
                807
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                178,
                809,
                497,
                841
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [],
                "level": 1
            },
            "bbox": [
                157,
                843,
                272,
                859
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                178,
                862,
                497,
                894
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [],
                "level": 1
            },
            "bbox": [
                215,
                131,
                394,
                152
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                164,
                180,
                310,
                197
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                179,
                199,
                364,
                230
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                164,
                234,
                319,
                249
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                179,
                252,
                369,
                282
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                164,
                287,
                339,
                302
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                179,
                305,
                386,
                336
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                168,
                405,
                218,
                420
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                186,
                423,
                552,
                546
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": []
            },
            "bbox": [
                168,
                626,
                344,
                643
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": []
            },
            "bbox": [
                203,
                646,
                571,
                766
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/769775e6a15add89fbc96bc597ffee8c74af7bae2a9211155faa7d7495501270.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                93,
                213,
                146
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "数字证书的组成"
                    }
                ],
                "level": 1
            },
            "bbox": [
                216,
                103,
                400,
                124
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "服务器公钥"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·支持的加密算法"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "DN(Distinguish Name）："
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                166,
                143,
                410,
                199
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "uCN（CommonName）：通常是服务器的FQDN"
                    }
                ]
            },
            "bbox": [
                181,
                202,
                561,
                216
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "其他的可选属性：Country（C）、State（S）、Location(L)"
                    }
                ]
            },
            "bbox": [
                183,
                219,
                552,
                247
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "■证书的有效期（起始日期，截止日期）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "证书的序列号（serialnumber）"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "被信任的CA的名字和签名"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "X.509的其他扩展属性等"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                166,
                250,
                502,
                325
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Vim "
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                357,
                194,
                374
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "vi 是 “Visual interface” 的简称，它可以执行输出、删除、查找、替换、块操作等众多文本操作，而且用户可以根据自己的需要对其进行定制，这是其他编辑程序所没有的。"
                    }
                ]
            },
            "bbox": [
                144,
                418,
                842,
                453
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "vi 不是一个排版程序，它不像 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { M } \\$ 1"
                    },
                    {
                        "type": "text",
                        "content": "Word 或 WPS 那样可以对字体、格式、段落等其他属性进行编排，它只是一个文本编辑程序。"
                    }
                ]
            },
            "bbox": [
                144,
                455,
                843,
                489
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "vi 是全屏幕文本编辑器，它没有菜单，只有命令。"
                    }
                ]
            },
            "bbox": [
                144,
                493,
                529,
                508
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "vim 即 Vi IMproved，vi 克隆版本之一。"
                    }
                ]
            },
            "bbox": [
                144,
                512,
                455,
                527
            ]
        },
        {
            "type": "table",
            "content": {
                "image_source": {
                    "path": "images/9333dcf6870e998a6570a50ff5783c89c51ebbb20f3daed0f31abaa7e78e4b5f.jpg"
                },
                "table_caption": [],
                "table_footnote": [],
                "html": "<table><tr><td>命令</td><td>说明</td></tr><tr><td>vi</td><td>直接进入</td></tr><tr><td>vi filename</td><td>打开或新建文件filename，并将光标置于第一行首</td></tr><tr><td>vi+n filename</td><td>打开文件filename，并将光标置于第n行首</td></tr><tr><td>vi+filename</td><td>打开文件filename，并将光标置于最后一行首</td></tr><tr><td>vi+/pattern filename</td><td>打开文件filename，并将光标置于第一个与pattern匹配的行</td></tr><tr><td>vi-r filename</td><td>打开上次用vi编辑时发生系统崩溃，恢复filename</td></tr></table>",
                "table_type": "simple_table",
                "table_nest_level": 1
            },
            "bbox": [
                147,
                545,
                998,
                788
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Vi的3种运行模式"
                    }
                ]
            },
            "bbox": [
                144,
                791,
                294,
                808
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/0d0f73426ce14a69adac39f65f4553e97e8ff61ab1b76e0c3bb9bb73acc5e42a.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                149,
                93,
                196,
                109
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "■普通(normal)模式"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "■插入(insert)模式"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "■命令行(Cmdline)模式"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                154,
                120,
                339,
                256
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/41e15b2ba440e2148fd57dedf6c6c920988001002ff64c0aec7ddb110d1f808f.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                344,
                105,
                724,
                267
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Normal 模式"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                278,
                253,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 shell 中输入 vim 启动编辑器时，即进入该模式。"
                    }
                ]
            },
            "bbox": [
                144,
                297,
                542,
                312
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "无论什么时候，不管用户处于何种模式，只要按一下 Esc 键，即可使 vim 进入 Normal 模式。"
                    }
                ]
            },
            "bbox": [
                144,
                315,
                842,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在该模式下，用户可以输入各种合法的 vim 命令，用于管理自己的文档。此时从键盘上输入的任何字符都被当做编辑命令来解释。"
                    }
                ]
            },
            "bbox": [
                144,
                351,
                842,
                387
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若输入的字符是合法的 vim 命令，则vim 在接受用户命令之后完成相应的动作。但需注意的是，所输入的命令并不在屏幕上显示出来。若输入的字符不是 vim 的合法命令，vim 会响铃报警。"
                    }
                ]
            },
            "bbox": [
                144,
                388,
                843,
                442
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "G 用于直接跳转到文件尾"
                    }
                ],
                "level": 1
            },
            "bbox": [
                144,
                463,
                344,
                478
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "equation_inline",
                        "content": "\\mathsf { x }"
                    },
                    {
                        "type": "text",
                        "content": "删除光标所在的字符"
                    }
                ]
            },
            "bbox": [
                146,
                482,
                324,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "r 替换光标所在的字符"
                    }
                ]
            },
            "bbox": [
                146,
                501,
                321,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "~ 切换光标所在字母的大小写"
                    }
                ]
            },
            "bbox": [
                146,
                519,
                376,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "/和？用于查找字符串"
                    }
                ]
            },
            "bbox": [
                146,
                538,
                315,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "dd、YY、p 分别用于剪切、复制和粘贴一行文本"
                    }
                ]
            },
            "bbox": [
                144,
                556,
                524,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "u 取消上一次编辑操作（undo）"
                    }
                ]
            },
            "bbox": [
                146,
                575,
                391,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ". 重复上一次编辑操作（redo）"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                381,
                609
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ZZ 用于存盘退出Vi"
                    }
                ]
            },
            "bbox": [
                146,
                612,
                300,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "ZQ用于不存盘退出Vi"
                    }
                ]
            },
            "bbox": [
                146,
                631,
                319,
                645
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Insert 模式"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                650,
                238,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 Normal 模式下输入插入命令i、附加命令a 、打开命令o、修改命令c、取代命令r 或替换命令 s 等都可以进入 Insert 模式。"
                    }
                ]
            },
            "bbox": [
                144,
                667,
                838,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在该模式下，用户输入的任何字符都被vim当做文件内容保存起来，并将其显示在屏幕上。在文本输入过程中，若想回到Normal模式下，按Esc 键即可。"
                    }
                ]
            },
            "bbox": [
                144,
                703,
                847,
                739
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "Command 模式"
                    }
                ],
                "level": 1
            },
            "bbox": [
                146,
                741,
                277,
                757
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Normal 模式下，用户按冒号“:” 即可进入 Command 模式，此时vim 会在显示窗口的最后一行 (屏幕的最后一行) 显示一个 “:” 作为 Command 模式的提示符，等待输入命令。"
                    }
                ]
            },
            "bbox": [
                144,
                760,
                847,
                794
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "多数文件管理都是在此模式下执行的 (如保存文件等)"
                    }
                ]
            },
            "bbox": [
                146,
                797,
                554,
                813
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Command 模式中所有的命令都必须按 <回车>后执行，命令执行完后，vim 自动回到Normal 模式。"
                    }
                ]
            },
            "bbox": [
                144,
                816,
                811,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "若在 Command 模式下输入命令过程中改变了主意，可按Esc键，或用退格键将输入的命令全部删除之后，再按一下退格键，即可使 vi 回到 Normal 模式下。"
                    }
                ]
            },
            "bbox": [
                144,
                852,
                843,
                887
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":n1,n2 co n3 用于块复制"
                    }
                ]
            },
            "bbox": [
                146,
                890,
                346,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":n1,n2 m n3 用于块移动"
                    }
                ]
            },
            "bbox": [
                146,
                93,
                344,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":n1,n2 d 用于块删除"
                    }
                ]
            },
            "bbox": [
                147,
                112,
                381,
                127
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":w 保存当前编辑文件，但并不退出"
                    }
                ]
            },
            "bbox": [
                147,
                131,
                428,
                145
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":w newfile 存为另外一个名为 “newfile” 的文件"
                    }
                ]
            },
            "bbox": [
                147,
                149,
                527,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":wq 用于存盘退出 Vi "
                    }
                ]
            },
            "bbox": [
                147,
                168,
                310,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":q! 用于不存盘退出 Vi "
                    }
                ]
            },
            "bbox": [
                147,
                187,
                327,
                200
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":q 用于直接退出Vi （未做修改）"
                    }
                ]
            },
            "bbox": [
                147,
                205,
                410,
                219
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置vi环境 "
                    }
                ]
            },
            "bbox": [
                147,
                223,
                242,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "配置文件 ~/.vimrc"
                    }
                ]
            },
            "bbox": [
                147,
                242,
                297,
                256
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":set 显示设置的所有选项"
                    }
                ]
            },
            "bbox": [
                147,
                261,
                344,
                274
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":set all 显示所有可以设置的选项"
                    }
                ]
            },
            "bbox": [
                147,
                279,
                401,
                293
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":set autoindent 缩进,常用于程序的编写 "
                    }
                ]
            },
            "bbox": [
                147,
                316,
                465,
                330
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":set noautoindent 取消缩进 "
                    }
                ]
            },
            "bbox": [
                147,
                335,
                373,
                349
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "显示隐藏行号 :set number/nonumber 简化:set nu/nonu"
                    }
                ]
            },
            "bbox": [
                147,
                370,
                618,
                386
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "设置 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "> >"
                    },
                    {
                        "type": "text",
                        "content": "和 "
                    },
                    {
                        "type": "equation_inline",
                        "content": "< <"
                    },
                    {
                        "type": "text",
                        "content": "缩进数量 :set shiftwidth "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ { = 4 }"
                    }
                ]
            },
            "bbox": [
                147,
                390,
                460,
                404
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "状态栏标尺 :set ruler/noruler "
                    }
                ]
            },
            "bbox": [
                147,
                409,
                396,
                423
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "自动保存 :set autowrite/noautowrite"
                    }
                ]
            },
            "bbox": [
                147,
                428,
                453,
                441
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "指示当前行 :set cursorline/nocursorline"
                    }
                ]
            },
            "bbox": [
                147,
                445,
                478,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "语法高亮 :set syntax "
                    },
                    {
                        "type": "equation_inline",
                        "content": "\\mathtt { . } { } = \\mathtt { o n }"
                    },
                    {
                        "type": "text",
                        "content": "或 :syntax on/off "
                    }
                ]
            },
            "bbox": [
                147,
                464,
                510,
                479
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Tab 宽度 :set tabstop "
                    },
                    {
                        "type": "equation_inline",
                        "content": "^ { - 4 }"
                    }
                ]
            },
            "bbox": [
                147,
                483,
                347,
                497
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "配色方案"
                    }
                ]
            },
            "bbox": [
                147,
                502,
                221,
                514
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":colorscheme #显示当前配色方案名称 "
                    }
                ]
            },
            "bbox": [
                147,
                520,
                467,
                533
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":colorscheme 方案名称 #设置配置方案"
                    }
                ]
            },
            "bbox": [
                147,
                539,
                478,
                552
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "例： :colorscheme murphy"
                    }
                ]
            },
            "bbox": [
                147,
                557,
                393,
                573
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "配色方案位置：/usr/share/vim/vim74/colors"
                    }
                ]
            },
            "bbox": [
                159,
                576,
                524,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "vim插件"
                    }
                ]
            },
            "bbox": [
                147,
                595,
                220,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "插件目录 ~/.vim/bundle"
                    }
                ]
            },
            "bbox": [
                147,
                613,
                344,
                626
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Vundle 插件管理器——vim bundle"
                    }
                ]
            },
            "bbox": [
                147,
                632,
                428,
                645
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在 github 上下载到 ~/.vim/bundle 目录中"
                    }
                ]
            },
            "bbox": [
                147,
                650,
                484,
                665
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "git clone https://github.com/VundleVim/Vundle.vim.git "
                    }
                ]
            },
            "bbox": [
                147,
                669,
                603,
                684
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "修改.vimrc 文件"
                    }
                ]
            },
            "bbox": [
                147,
                687,
                275,
                701
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ":PluginInstall "
                    }
                ]
            },
            "bbox": [
                147,
                705,
                258,
                720
            ]
        },
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "应用管理"
                    }
                ],
                "level": 1
            },
            "bbox": [
                147,
                760,
                221,
                775
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "浏览WEB网页的过程为："
                    }
                ]
            },
            "bbox": [
                147,
                778,
                344,
                793
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "服务器端开启 WEB 服务始终侦听 80 端口；"
                    }
                ]
            },
            "bbox": [
                147,
                797,
                477,
                812
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "客户端主机根据本地设置的DNS服务器，首先查询网址的IP地址，查到网站服务器的IP地址后，向其发送浏览网页的申请；"
                    }
                ]
            },
            "bbox": [
                147,
                816,
                836,
                848
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "当服务器收到浏览网页的申请时，WEB服务分配一个进程负责对这个申请进行应答，同时继续侦听80端口，准备处理其他的申请；"
                    }
                ]
            },
            "bbox": [
                147,
                853,
                843,
                885
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "根据申请的要求，WEB服务到网页所保存的目录中去查找需要浏览的内容，由WEB服务"
                    }
                ]
            },
            "bbox": [
                147,
                890,
                836,
                904
            ]
        }
    ],
    [
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "将内容发送给客户端。"
                    }
                ]
            },
            "bbox": [
                144,
                93,
                317,
                108
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "APACHE是被广泛应用的Web服务器。对于Linux用户来说，也是最容易使用的Web服务器，如果仅仅是想用APACHE提供基本的Web页面服务，可能根本不需要调整任何配置。"
                    }
                ]
            },
            "bbox": [
                144,
                112,
                836,
                162
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LANMP "
                    }
                ]
            },
            "bbox": [
                146,
                167,
                211,
                181
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux+Nginx+Apache+MySQL+PHP "
                    }
                ]
            },
            "bbox": [
                146,
                186,
                438,
                202
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LAMP "
                    }
                ]
            },
            "bbox": [
                147,
                205,
                200,
                218
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux+Nginx+MySQL+PHP "
                    }
                ]
            },
            "bbox": [
                147,
                223,
                366,
                237
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LNMP "
                    }
                ]
            },
            "bbox": [
                147,
                242,
                201,
                255
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Linux+Apache+MySQL+PHP "
                    }
                ]
            },
            "bbox": [
                147,
                260,
                379,
                275
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/7d7c1d208f59f8dd23a73e63addb2f7ed07553479e8366087eb1b6168fca6240.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                147,
                277,
                643,
                448
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "安装好 Apache 服务后，不用配置就可启动。"
                    }
                ]
            },
            "bbox": [
                144,
                482,
                490,
                498
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "启动后在客户端浏览器地址栏输入 apache 服务器的 IP 地址，检查是否可以看到 Apache的测试页，如果能看到说明安装是成功的。如IP地址为127.0.0.1，测试页如图所示。"
                    }
                ]
            },
            "bbox": [
                144,
                501,
                836,
                535
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "或者直接在 apache 服务器主机的浏览器地址栏输入“localhost”进行测试。"
                    }
                ]
            },
            "bbox": [
                146,
                538,
                729,
                554
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "模块 Module"
                    }
                ]
            },
            "bbox": [
                147,
                557,
                253,
                571
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "apache支持模块支持"
                    }
                ]
            },
            "bbox": [
                147,
                575,
                319,
                590
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "在服务器核心中只包含了最基本的功能"
                    }
                ]
            },
            "bbox": [
                147,
                594,
                450,
                608
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "扩展的功能可以模块的形式加载到服务器中。"
                    }
                ]
            },
            "bbox": [
                147,
                612,
                492,
                627
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "LoadModule "
                    }
                ]
            },
            "bbox": [
                147,
                631,
                255,
                644
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "查看已编译进去了哪些基本模块，"
                    }
                ]
            },
            "bbox": [
                147,
                649,
                403,
                664
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "#apachectl - "
                    }
                ]
            },
            "bbox": [
                147,
                669,
                252,
                683
            ]
        }
    ],
    [
        {
            "type": "title",
            "content": {
                "title_content": [
                    {
                        "type": "text",
                        "content": "容器Container "
                    }
                ],
                "level": 1
            },
            "bbox": [
                156,
                140,
                463,
                177
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "· 成对出现，如<IfDefine>和</IfDefine>; "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·指令放在容器中，限制了其使用范围。所处容器不同，指令适用范围也不同"
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "·第1类，If开头。当满足条件时，才执行指令。"
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                156,
                206,
                850,
                271
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " <lfVersion >= 2.1> "
                    }
                ]
            },
            "bbox": [
                196,
                275,
                337,
                288
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " #this happens only in versions greater or "
                    }
                ]
            },
            "bbox": [
                228,
                288,
                547,
                302
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "# equal 2.1.0. "
                    }
                ]
            },
            "bbox": [
                228,
                302,
                336,
                313
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "</IfVersion> "
                    }
                ]
            },
            "bbox": [
                196,
                313,
                295,
                326
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "·第2类，应用于filesystem/webspace。指令应用于指定的文件系统或URL"
                    }
                ]
            },
            "bbox": [
                156,
                346,
                852,
                365
            ]
        },
        {
            "type": "list",
            "content": {
                "list_type": "text_list",
                "list_items": [
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<lfDefine> "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<lfModule> "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<lfVersion> "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-<Directory> "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<DirectoryMat "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<Files> "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<FilesMatch: "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "o<Location> "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<LocationMatc "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "□<Proxy> "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "o<ProxyMatch: "
                            }
                        ]
                    },
                    {
                        "item_type": "text",
                        "item_content": [
                            {
                                "type": "text",
                                "content": "-<VirtualHost> "
                            }
                        ]
                    }
                ]
            },
            "bbox": [
                857,
                156,
                996,
                361
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " <Directory /var/web/dir1> "
                    }
                ]
            },
            "bbox": [
                196,
                382,
                403,
                395
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " Options +Indexes "
                    }
                ]
            },
            "bbox": [
                200,
                395,
                337,
                407
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "</Directory > "
                    }
                ]
            },
            "bbox": [
                200,
                407,
                302,
                422
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " <Files private.html> "
                    }
                ]
            },
            "bbox": [
                450,
                382,
                603,
                395
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Order allow,deny "
                    }
                ]
            },
            "bbox": [
                450,
                395,
                591,
                409
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Deny from all "
                    }
                ]
            },
            "bbox": [
                450,
                409,
                561,
                422
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "</Files> "
                    }
                ]
            },
            "bbox": [
                445,
                422,
                507,
                432
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " <Directory /var/web/dir1> "
                    }
                ]
            },
            "bbox": [
                675,
                381,
                880,
                395
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "<Files private.html> "
                    }
                ]
            },
            "bbox": [
                690,
                395,
                840,
                407
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": " Order allow,deny "
                    }
                ]
            },
            "bbox": [
                697,
                407,
                833,
                420
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "Deny from all "
                    }
                ]
            },
            "bbox": [
                697,
                422,
                801,
                432
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "虚拟主机概念：在同一台主机上，使用不同的配置文件，来配置不同的站点"
                    }
                ]
            },
            "bbox": [
                181,
                463,
                769,
                480
            ]
        },
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/04ad62d5c5b02cc4a4abe906d01271ba945e3306a7b217373d42361c6455d494.jpg"
                },
                "image_caption": [],
                "image_footnote": []
            },
            "bbox": [
                149,
                488,
                534,
                785
            ]
        },
        {
            "type": "page_header",
            "content": {
                "page_header_content": [
                    {
                        "type": "text",
                        "content": "#/usr/sbin/httpd -l "
                    }
                ]
            },
            "bbox": [
                147,
                93,
                305,
                109
            ]
        }
    ],
    [
        {
            "type": "image",
            "content": {
                "image_source": {
                    "path": "images/5b6b661017cc61fb721a1dbcd76bef24159f724cf65da5a4c303c1a6b79dc03e.jpg"
                },
                "image_caption": [
                    {
                        "type": "text",
                        "content": "代理 Proxy"
                    }
                ],
                "image_footnote": []
            },
            "bbox": [
                152,
                118,
                732,
                360
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "为了限制指令的有效范围，可使用<Directory>, <DirectoryMatch>, <Files>,<FilesMatch>, <Location>, <LocationMatch> , <VirtualHost>等。"
                    }
                ]
            },
            "bbox": [
                144,
                407,
                739,
                443
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "指令的有效范围分为几种类型："
                    }
                ]
            },
            "bbox": [
                146,
                445,
                389,
                460
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "server config：用于配置文件 httpd.conf ，不用于<VirtualHost> <Directory> 及文件.htaccess。"
                    }
                ]
            },
            "bbox": [
                144,
                464,
                800,
                495
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "virtual host：<VirtualHost> "
                    }
                ]
            },
            "bbox": [
                146,
                502,
                376,
                516
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": "directory：<Directory>, <Location>, <Files>, and <Proxy> "
                    }
                ]
            },
            "bbox": [
                146,
                520,
                616,
                536
            ]
        },
        {
            "type": "paragraph",
            "content": {
                "paragraph_content": [
                    {
                        "type": "text",
                        "content": ".htaccess ：放置在文件.htaccess 中的指令应用范围为该目录（放置.htaccess 文件的目录）下所有的文件和子目录。.htaccess文件被改变后会立即生效，因为每次请求都会读取该文件。可进一步控制哪些指令能放置在.htaccess文件中（即哪些指令允许放置在.htaccess 文件中，并覆盖原来的值），用 AllowOverride 控制。"
                    }
                ]
            },
            "bbox": [
                144,
                538,
                847,
                609
            ]
        }
    ]
]