<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5">
    <title>hashlinux常用命令有哪些 | 云图网</title>
    <meta name="description" content="这篇文章主要介绍hashlinux常用命令有哪些，文中介绍的非常详细，具有一定的参考价值，感兴趣的小伙伴们一定要看完！----------------------------------1 文件管理----------------------------------创建空白文件touch不提示删除非空目录rm -rf目…">
<meta property="og:type" content="article">
<meta property="og:url" content="https://blog.ytso.com/tech/bigdata/205591.html">
<meta property="og:site_name" content="云图网">
<meta property="og:title" content="hashlinux常用命令有哪些">
<meta property="og:description" content="这篇文章主要介绍hashlinux常用命令有哪些，文中介绍的非常详细，具有一定的参考价值，感兴趣的小伙伴们一定要看完！----------------------------------1 文件管理----------------------------------创建空白文件touch不提示删除非空目录rm -rf目…">
<link rel="canonical" href="https://blog.ytso.com/tech/bigdata/205591.html">
<meta name="applicable-device" content="pc,mobile">
<meta http-equiv="Cache-Control" content="no-transform">
<link rel="shortcut icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg">
<link rel='dns-prefetch' href='//cdnjs.cloudflare.com' />
<style id='wp-img-auto-sizes-contain-inline-css' type='text/css'>
img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
/*# sourceURL=wp-img-auto-sizes-contain-inline-css */
</style>
<link rel='stylesheet' id='stylesheet-css' href='https://blog.ytso.com/wp-content/themes/justnews/css/style.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='material-icons-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/material-icons.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='remixicon-css' href='https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.min.css?ver=6.9.4' type='text/css' media='all' />
<link rel='stylesheet' id='font-awesome-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/font-awesome.css?ver=6.21.5' type='text/css' media='all' />
<style id='wp-block-library-inline-css' type='text/css'>
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:69d071a75a0c6*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<style id='classic-theme-styles-inline-css' type='text/css'>
/*! This file is auto-generated */
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
/*# sourceURL=/wp-includes/css/classic-themes.min.css */
</style>
<link rel='stylesheet' id='wpcom-member-css' href='https://blog.ytso.com/wp-content/plugins/wpcom-member/css/style.css?ver=1.7.19' type='text/css' media='all' />
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script>
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://blog.ytso.com/xmlrpc.php?rsd" />
<meta name='description' content='这篇文章主要介绍hashlinux常用命令有哪些，文中介绍的非常详细，具有一定的参考价值，感兴趣的小伙伴们一定要看完！ ---------------------------------- 1 文件管理 ---------------------------------- 创建空白…' />
<style>:root{--theme-color: #08c; --theme-hover: #07c; --logo-height: 32px; --logo-height-mobile: 26px; --menu-item-gap: 28px; --member-login-bg: url('https://blog.ytso.com/loginwall.jpg'); --header-bg-color: #fff; --header-bg-image: none; --theme-border-radius-s: 3px; --theme-border-radius-m: 5px; --theme-border-radius-l: 8px; --theme-border-radius-xl: 12px; --thumb-ratio-default: 480 / 300; --thumb-ratio-post: 480 / 300; --post-video-ratio: 860 / 482;}</style>
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="32x32" />
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="192x192" />
<link rel="apple-touch-icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
<meta name="msapplication-TileImage" content="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
    <!--[if lte IE 11]><script src="https://blog.ytso.com/wp-content/themes/justnews/js/update.js"></script><![endif]-->
</head>
<body class="wp-singular post-template-default single single-post postid-205591 single-format-standard wp-theme-justnews lang-cn el-boxed header-fixed">
<header class="header header-fluid">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-label="menu">
                <span class="icon-bar icon-bar-1"></span>
                <span class="icon-bar icon-bar-2"></span>
                <span class="icon-bar icon-bar-3"></span>
            </button>
                        <div class="logo">
                <a href="https://blog.ytso.com/" rel="home">
                    <img src="https://imgcdn.ytso.com/wp-content/uploads/2021/12/20211207181156143.png" alt="云图网">
                </a>
            </div>
        </div>
        <div class="collapse navbar-collapse mobile-style-0">
            <nav class="primary-menu"><ul id="menu-justnews-footer-menu" class="nav navbar-nav wpcom-adv-menu"><li class="menu-item"><a href="https://blog.ytso.com/category/industrynews">业界资讯</a></li>
<li class="menu-item current-post-ancestor active menu-item-style menu-item-style-1 dropdown"><a target="_blank" href="https://blog.ytso.com/category/tech" class="dropdown-toggle">技术专区</a>
<ul class="dropdown-menu menu-item-wrap menu-item-col-5">
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/cloud">云计算</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/ai">人工智能</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/safety">信息安全</a></li>
	<li class="menu-item current-post-ancestor current-post-parent active"><a href="https://blog.ytso.com/category/tech/bigdata">大数据</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/dev">研发管理</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/webdev">大前端</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/opensource">开源</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/aiops">智能运维</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/pnotes">编程笔记</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/wp">WordPress</a></li>
</ul>
</li>
<li class="menu-item"><a href="https://blog.ytso.com/category/enterprise-strategic-planning">企业战略规划</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/download">下载专区</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/it%e6%b1%9f%e6%b9%96%e5%8f%b2">江湖史</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/notes">随笔记录</a></li>
</ul></nav>            <div class="navbar-action">
                <div class="navbar-search-icon j-navbar-search"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></div><form class="navbar-search" action="https://blog.ytso.com/" method="get" role="search"><div class="navbar-search-inner"><i class="wpcom-icon wi navbar-search-close"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i><input type="text" name="s" class="navbar-search-input" autocomplete="off" maxlength="100" placeholder="输入关键词搜索..." value=""><button class="navbar-search-btn" type="submit" aria-label="搜索"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></button></div></form>                    <div id="j-user-wrap">
                        <a class="login" href="https://blog.ytso.com/login">登录</a>
                        <a class="login register" href="https://blog.ytso.com/register">注册</a>
                    </div>
                                            <a class="wpcom-btn btn-primary btn-xs publish" href="https://blog.ytso.com/contribute">
                            <i class="fa fa-edit"></i> 投稿                        </a>
                                </div>
        </div>
    </div><!-- /.container -->
</header>

<div id="wrap">    <div class="wrap container">
        <ol class="breadcrumb" vocab="https://schema.org/" typeof="BreadcrumbList"><li class="home" property="itemListElement" typeof="ListItem"><a href="https://blog.ytso.com" property="item" typeof="WebPage"><span property="name" class="hide">云图网</span>首页</a><meta property="position" content="1"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech" property="item" typeof="WebPage"><span property="name">技术专区</span></a><meta property="position" content="2"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech/bigdata" property="item" typeof="WebPage"><span property="name">大数据</span></a><meta property="position" content="3"></li></ol>        <main class="main">
                            <article id="post-205591" class="post-205591 post type-post status-publish format-standard hentry category-bigdata entry">
                    <div class="entry-main">
                                                                        <div class="entry-head">
                            <h1 class="entry-title">hashlinux常用命令有哪些</h1>
                            <div class="entry-info">
                                                                <time class="entry-date published" datetime="2021-11-29T23:04:47+08:00" pubdate>
                                    2021年11月29日 23:04                                </time>
                                <span class="dot">•</span>
                                <a href="https://blog.ytso.com/category/tech/bigdata" rel="category tag">大数据</a>                                                            </div>
                        </div>
                        
                                                <div class="entry-content text-indent text-justify">
                            <p class="introduction">这篇文章主要介绍hashlinux常用命令有哪些，文中介绍的非常详细，具有一定的参考价值，感兴趣的小伙伴们一定要看完！</p>
<p>----------------------------------</p>
<p>1 文件管理</p>
<p>----------------------------------</p>
<p>创建空白文件</p>
<p>touch</p>
<p>不提示删除非空目录</p>
<p>rm -rf目录名</p>
<p>(-r:递归删除 -f 强制)</p>
<p>##################################</p>
<p>恢复 rm 删除的文件(ext3)</p>
<p>查看磁盘分区格式</p>
<p>df -T</p>
<p>卸载挂载</p>
<p>umount /data/</p>
<p>ext3grep /dev/sdb1 --ls --inode 2</p>
<p>记录信息继续查找目录下文件 inode信息</p>
<p>ext3grep /dev/sdb1 --ls --inode 131081 # 此处是 inode</p>
<p>记录下 inode信息开始恢复目录</p>
<p>ext3grep /dev/sdb1 --restore-inode 49153</p>
<p>##################################</p>
<p>windows 文本转 linux 文本</p>
<p>dos2unix</p>
<p>linux 文本转 windows 文本</p>
<p>unix2dos</p>
<p>转换编码</p>
<p>iconv -f gbk -tutf8 原.txt &gt; 新.txt</p>
<p>查看 md5 值</p>
<p>md5sum</p>
<p>硬链接</p>
<p>ln</p>
<p>符号连接</p>
<p>ln -s</p>
<p>查看上下翻页且显示行号</p>
<p>cat ? | nl |less</p>
<p>q 退出</p>
<p>结束状态</p>
<p>ctrl+z</p>
<p>查看文件开头内容</p>
<p>head</p>
<p>查看文件结尾内容</p>
<p>tail -f # 监视日志文件</p>
<p>检查文件类型</p>
<p>file</p>
<p>重命名</p>
<p>rename</p>
<p>rename source_pattern target_pattern source_files</p>
<p>更改默认权限</p>
<p>umask</p>
<p>按数字排序</p>
<p>sort -n</p>
<p>按数字倒叙</p>
<p>sort -nr</p>
<p>过滤重复行</p>
<p>sort -u</p>
<p>删除重复的行</p>
<p>uniq</p>
<p>重复的行出现次数</p>
<p>uniq -c</p>
<p>只显示不重复行</p>
<p>uniq -u</p>
<p>将两个文件合并用 tab键分隔开</p>
<p>paste a b</p>
<p>将两个文件合并指定&#39;+&#39;符号隔开</p>
<p>paste -d&#39;+&#39; a b</p>
<p>将多行数据合并到一行用 tab 键隔开</p>
<p>paste -s a</p>
<p>设置隐藏属性</p>
<p>chattr [+-=] [ASacdistu] 文件或目录</p>
<p>向下分面器</p>
<p>more</p>
<p>搜索</p>
<p>locate 字符串</p>
<p>查看行数</p>
<p>wc -l</p>
<p>实时某个目录下查看最新改动过的文件</p>
<p>watch -d-n 1 &#39;df; ls -FlAt /path&#39;</p>
<p>快速备份一个文件</p>
<p>cp filename{,.bak}</p>
<p>##################################</p>
<p>配置编辑器</p>
<p>gconf-editor</p>
<p>vi 配置文件</p>
<p>vi /etc/vimrc</p>
<p>编辑文件</p>
<p>vim</p>
<p>打开行号</p>
<p>:set nu</p>
<p>取消行号</p>
<p>:set nonu</p>
<p>跳转到 200</p>
<p>200G</p>
<p>取消高亮</p>
<p>:nohl</p>
<p>设置自动缩进</p>
<p>:set autoindent</p>
<p>查看文本格式</p>
<p>set ff</p>
<p>改为 unix 格式</p>
<p>set binary</p>
<p>向前翻页</p>
<p>ctrl+ U</p>
<p>向后翻页</p>
<p>ctrl+ D</p>
<p>全部替换</p>
<p>g/字符 1/s//字符 2/g</p>
<p>%s/字符 1/字符 2/g</p>
<p># 普通用户打开文档不能保存</p>
<p># tee 是一个把 stdin 保存到文件的小工具,而%,是 vim 当中一个只读寄存器的名字,总保存着当</p>
<p>前编辑文件的文件路径</p>
<p>:w !sudotee %</p>
<p>##################################</p>
<p>按文件名查找</p>
<p>find /etc -name http</p>
<p>查找某一类型文件</p>
<p>find . -type f</p>
<p>按照文件权限查找</p>
<p>find / -perm</p>
<p>按照文件属主查找</p>
<p>find / -user</p>
<p>按照文件所属的组来查找文件</p>
<p>find / -group</p>
<p>文件使用时间在 N 天以内</p>
<p>find / -atime -n</p>
<p>文件使用时间在 N 天以前</p>
<p>find / -atime +n</p>
<p>文件内容改变时间在 N 天以内</p>
<p>find / -mtime -n</p>
<p>文件内容改变时间在 N 天以前</p>
<p>find / -mtime +n</p>
<p>文件状态改变时间在 N 天前</p>
<p>find / -ctime +n</p>
<p>文件状态改变时间在 N 天内</p>
<p>find / -ctime -n</p>
<p># linux 文件无创建时间</p>
<p># Access 使用时间</p>
<p># Modify 内容修改时间</p>
<p># Change 状态改变时间(权限、属主)</p>
<p>查找文件长度大于 1M 字节的文件</p>
<p>find / -size +1000000c -print</p>
<p>按名字查找文件传递给-exec 后命令</p>
<p>find /etc -name &quot;passwd*&quot; -exec grep &quot;hashlinux&quot; {}/;</p>
<p>查找文件名，不取路径</p>
<p>find . -name &#39;t*&#39; -exec basename {} /;</p>
<p>##################################</p>
<p>====================================================================</p>
<p>----------------------------------</p>
<p>2 软件管理</p>
<p>----------------------------------</p>
<p>解包 tar</p>
<p>tar xvf 1.tar -C 目录</p>
<p>打包 tar</p>
<p>tar -cvf 1.tar *</p>
<p>查看 tar</p>
<p>tar tvf 1.tar</p>
<p>给 tar 追加文件</p>
<p>tar -rvf 1.tar 文件名</p>
<p>解包 gz</p>
<p>tar zxvpf gz.tar.gz</p>
<p>打包 gz</p>
<p>tar zcvpf gz.tar.gz</p>
<p>查看 gz</p>
<p>tar ztvpf gz.tar.gz</p>
<p>解压 bzip2</p>
<p>bzip2 -dv 1.tar.bz2</p>
<p>解压 gzip 到 tar</p>
<p>gzip -dv 1.tar.gz</p>
<p>压缩 tar 到 gz</p>
<p>gzip -v 1.tar</p>
<p>bzip2 压缩</p>
<p>bzip2 -v 1.tar</p>
<p>查看 bzip2</p>
<p>bzcat</p>
<p>rpm 安装</p>
<p>rpm -ivh</p>
<p>卸载</p>
<p>rpm -e lynx</p>
<p>强制卸载</p>
<p>rpm -e lynx --nodeps</p>
<p>测试</p>
<p>rpm --test lynx</p>
<p>查看所有安装的 rpm 包</p>
<p>rpm -qa</p>
<p>查找包是否安装</p>
<p>rpm -qa | grep http</p>
<p>解压 zip</p>
<p>unzip zip.zip</p>
<p>压缩 zip</p>
<p>zip zip.zip *</p>
<p>rar3.6 下载地址</p>
<p>https://cache.yisu.com/upload/information/20200310/34/104726.jpg</p>
<p>解压 rar 包</p>
<p>unrar x rar.rar</p>
<p>7z 压缩</p>
<p>7z a 7z.7z *</p>
<p>7z 解压</p>
<p>7z e 7z.7z</p>
<p>查看字符行</p>
<p>zgrep 字符 1.gz</p>
<p>打包/home, /etc ，但排除 /home/dmtsai</p>
<p>tar --exclude /home/dmtsai -zcvf myfile.tar.gz /home} # 去掉第一条 / 及其左边的字串：dir1/dir2/dir3/my.file.txt</p>
<p>${file##*/} # 去掉最后一条/ 及其左边的字串：my.file.txt</p>
<p>${file#*.} # 去掉第一个 . 及其左边的字串：file.txt</p>
<p>${file##*.} # 去掉最后一个 . 及其左边的字串：txt</p>
<p>${file%/p}&quot;</p>
<p>删除含关键的一行</p>
<p>sed -i &quot;/^$f/d&quot; a</p>
<p>直接对文本替换</p>
<p>sed -i &quot;s/=/:/&quot; c</p>
<p>找到 pearls 开头在行尾加 jcui</p>
<p>sed -i &quot;/^pearls/s/$/jcui/&quot; ab.txt</p>
<p>标签(保存/(mar/)作为标签 1)</p>
<p>sed -n &#39;s//(mar/)got//1ianne/p&#39; 文件</p>
<p>echo &quot;margot&quot;|sed -n &#39;s//(mar/).*/(t/)//1/2/p&#39;</p>
<p>sed -e &#39;s/^/([a-zA-Z]/+/) /([a-zA-Z]/+/)/(.*/)//2 /1/3/g&#39; file</p>
<p>在以[0-9][0-9]结尾的行后加 5</p>
<p>sed &#39;s/[0-9][0-9]$/&amp;5&#39; 文件</p>
<p>打印从第 5 行到以 no 开头行之间的所有行</p>
<p>sed -n &#39;5,/^no/p&#39; 文件</p>
<p>修改 west 和 east 之间的所有行，在结尾处加*VACA*</p>
<p>sed &#39;/west/,/east/s/$&#39; 文件</p>
<p>多重编辑(先删除 1-3 行，在将 1 替换成 2)</p>
<p>sed -e &#39;1,3d&#39; -e&#39;s/1/2/&#39; 文件</p>
<p>找到含 suan 的行，在后面加上读入的文件内容</p>
<p>sed &#39;/suan/r 读入文件&#39; 文件</p>
<p>找到含 no 的行，写入到指定文件中</p>
<p>sed -n &#39;/no/w 写入文件&#39; 文件</p>
<p>取出第一组数字，并且忽略掉开头的 0</p>
<p>sed &#39;s/[^1-9]*/([0-9]/+/).*//1/&#39;</p>
<p>打印 1 和 3 之间的行</p>
<p>sed &#39;/1/,/3/p&#39; file</p>
<p>取出指定行</p>
<p>sed -n &#39;1p&#39; 文件</p>
<p>在第 5 行之前插入行</p>
<p>sed &#39;5i/aaa&#39;file</p>
<p>在第 5 行之后抽入行</p>
<p>sed &#39;5a/aaa&#39; file</p>
<p>在匹配行前插入一行</p>
<p>echo a|sed -e &#39;/a/i/b&#39;</p>
<p>在匹配行后插入一行</p>
<p>echo a|sed -e &#39;/a/a/b&#39;</p>
<p>echo a|sed &#39;s/a/&amp;/nb/g&#39;</p>
<p>引用外部变量</p>
<p>sed -n &#39;&#39;$a&#39;,10p&#39;</p>
<p>sed -n &quot;&quot;$a&quot;,10p&quot;</p>
<p>取用户家目录(匹配不为/的字符和匹配:到结尾的字符全部删除)</p>
<p>sed -n &#39;{s/^[^//]*//;s//:.*//;p}&#39; /etc/passwd</p>
<p>将换行符转换为换行</p>
<p>echo abcd//nabcde |sed &#39;s///n/@/g&#39; |tr &#39;@&#39; &#39;/n&#39;</p>
<p>删除掉@后面所有字符，和空行</p>
<p>sed -e &#39;s/@.*//g&#39; -e &#39;/^$/d&#39;</p>
<p>将几行合并成一行</p>
<p>echo $(cat file)|sed &#39;s/ //g&#39;</p>
<p>取一列最大值</p>
<p>cat tmp|awk &#39;{print $1}&#39;|sort -n|sed -n &#39;$p&#39;</p>
<p>查找属主权限为 7的文件</p>
<p>ls -l|sed -n &#39;/^.rwx.*/p&#39;</p>
<p>在 a 前面加#号</p>
<p>echo a|sed -e &#39;s/a/#&amp;/g&#39;</p>
<p>##################################</p>
<p>图形 dialog</p>
<p>多选界面[方括号]</p>
<p>dialog --title &quot;Check me&quot; --checklist &quot;Pick Numbers&quot; 15 25 3 1 &quot;one&quot; &quot;off&quot; 2 &quot;two&quot;&quot;on&quot; 3 &quot;three&quot;</p>
<p>&quot;off&quot; 2&gt;tmp</p>
<p>多选界面(圆括号)</p>
<p>dialog --title &quot;title&quot; --radiolist &quot;checklist&quot; 20 60 14 tag1 &quot;item1&quot;on tag2 &quot;item2&quot;off 2&gt;tmp</p>
<p>单选界面</p>
<p>dialog --title &quot;title&quot; --menu &quot;MENU&quot; 20 60 14 tag1 &quot;item1&quot; tag2 &quot;item2&quot; 2&gt;tmp</p>
<p>进度条</p>
<p>dialog --title &quot;Installation&quot; --backtitle&quot;Star Linux&quot; --gauge &quot;Linux Kernel&quot; 10 60 50</p>
<p>选择 yes/no</p>
<p>dialog --title &quot;标题&quot;--backtitle &quot;Dialog&quot; --yesno &quot;说明&quot; 2060</p>
<p>公告</p>
<p>dialog --title &quot;公告标题&quot;--backtitle &quot;Dialog&quot; --msgbox &quot;内容&quot; 20 60</p>
<p>显示讯息后立即离开</p>
<p>dialog --title &quot;hey&quot; --backtitle &quot;Dialog&quot; --infobox &quot;Is everything okay?&quot;10 60</p>
<p>输入对话框</p>
<p>dialog --title &quot;hey&quot; --backtitle &quot;Dialog&quot; --inputbox &quot;Is okay?&quot; 10 60 &quot;yes&quot;</p>
<p>显示文档内容</p>
<p>dialog --title &quot;Array 30&quot; --backtitle &quot;All &quot; --textbox /root/txt 20 75</p>
<p>多条输入对话框</p>
<p>dialog --title &quot;Add a user&quot; --form &quot;Add a user&quot; 12 40 4 &quot;Username:&quot; 1 1 &quot;&quot; 1 15 15 0 &quot;Full</p>
<p>name:&quot; 2 1 &quot;&quot; 2 15 15 0 2&gt;tmp</p>
<p>星号显示输入--insecure</p>
<p>dialog --title &quot;Password&quot; --insecure --passwordbox &quot;请输入密码&quot; 10 35</p>
<p>选择日期</p>
<p>dialog --stdout --title &quot;日历&quot; --calendar &quot;请选择&quot; 0 0 9 1 2010</p>
<p>##################################</p>
<p>脚本头 # sh 为当前系统默认 shell,可指定为 bash 等</p>
<p>#!/bin/sh</p>
<p>临时文件定义</p>
<p>errtmp=/tmp/$$`date +%s%N`.errtmp</p>
<p>outtmp=/tmp/$$`date +%s%N`.outtmp</p>
<p>true &gt; $outtmp</p>
<p>随机数</p>
<p>$RANDOM</p>
<p>进程号</p>
<p>$$</p>
<p>纳秒</p>
<p>date +%N</p>
<p>在当前 bash 环境下读取并执行 FileName 中的命令</p>
<p>sourcefile-name # 等同 . FileName</p>
<p>间隔睡眠 5 秒</p>
<p>sleep 5</p>
<p>在接收到信号后将要采取的行动</p>
<p>trap</p>
<p>当前目录</p>
<p>$PWD</p>
<p>之前一个目录的路径</p>
<p>$OLDPWD</p>
<p>返回上一个目录路径</p>
<p>cd -</p>
<p>重复打印</p>
<p>yes</p>
<p>自动回答 y 或者其他</p>
<p>yes |rm-i*</p>
<p>查看目录所有文件夹</p>
<p>ls -p/home</p>
<p>查看匹配完整路径</p>
<p>ls -d/home/</p>
<p>命令替换 xargs</p>
<p>#将前面的内容，作为后面命令的参数</p>
<p>find / -perm +7000 | xargs ls -l</p>
<p>不换行执行下一句话</p>
<p>echo -n aa;echo bb</p>
<p>使转义生效</p>
<p>echo -e &quot;s/tss/n/n/n&quot;</p>
<p>取字符串中字元</p>
<p>echo $a | cut -c2-6</p>
<p>排列组合(括号内一个元素分别和其他括号内元素组合)</p>
<p>echo {a,b,c}{a,b,c}{a,b,c}</p>
<p>返回目录名</p>
<p>pwd | awk -F/ &#39;{ print &quot;目录名:&quot;,$2 }&#39;</p>
<p>替换上一条命令中的(foo)一个短语(bar)</p>
<p>^foo^bar^</p>
<p>!!:s/foo/bar/</p>
<p>!!:gs/foo/bar</p>
<p>##################################</p>
<p>shell 例子</p>
<p>判断参数是否为空-空退出并打印 null</p>
<p>#!/bin/sh</p>
<p>echo $1</p>
<p>name=${1:?&quot;null&quot;}</p>
<p>echo $name</p>
<p>##################################</p>
<p>循环数组</p>
<p>for ((i=0;i&lt;${#o[*]};i++))</p>
<p>do</p>
<p>echo ${o[$i]}</p>
<p>done</p>
<p>##################################</p>
<p>判断路径</p>
<p>if[ -d /root/Desktop/text/123 ];then</p>
<p>echo &quot;找到了 123&quot;</p>
<p>if[ -d /root/Desktop/text ]</p>
<p>then echo &quot;找到了 text&quot;</p>
<p>else echo &quot;没找到 text&quot;</p>
<p>fi</p>
<p>else echo &quot;没找到 123 文件夹&quot;</p>
<p>fi</p>
<p>##################################</p>
<p>匹配替换密码</p>
<p>#!/bin/sh</p>
<p>cat mailpassword &gt; temp.txt</p>
<p>sed -i &quot;s/:/ =/&quot; temp.txt</p>
<p>w=`awk -F &quot; = &quot; &#39;{print $1}&#39; temp.txt`</p>
<p>for d in $w</p>
<p>do</p>
<p>grep -w $d svnpassword&gt;/dev/null</p>
<p>if[ $? -eq 0 ]</p>
<p>then</p>
<p>sed -i &quot;/^$d/d&quot; svnpassword</p>
<p>grep &quot;^$d&quot; temp.txt &gt;&gt; svnpassword</p>
<p>#替换到转义就出问题</p>
<p>#sed -i &quot;/^$d/c $(grep &quot;^$d&quot; temp.txt)&quot; svnpassword</p>
<p>fi</p>
<p>done</p>
<p>rm temp.txt</p>
<p>##################################</p>
<p>多行合并</p>
<p>将两行并为一行(去掉换行符)</p>
<p>sed &#39;{N;s//n//}&#39; file</p>
<p>将 4行合并为一行(可扩展)</p>
<p>awk &#39;{if(NR%4==0){print $0} else {printf&quot;%s &quot;,$0}}&#39; file</p>
<p>将所有行合并</p>
<p>awk &#39;{printf&quot;%s &quot;,$0}&#39;</p>
<p>##################################</p>
<p>shift 用法</p>
<p>./cs.sh 1 2 3</p>
<p>#!/bin/sh</p>
<p>until [ $# -eq 0 ]</p>
<p>do</p>
<p>echo &quot;第一个参数为: $1参数个数为: $#&quot;</p>
<p>#shift 命令执行前变量 $1 的值在 shift 命令执行后不可用</p>
<p>shift</p>
<p>done</p>
<p>##################################</p>
<p>给脚本加参数 getopts</p>
<p>#!/bin/sh</p>
<p>while getopts :ab: name</p>
<p>do</p>
<p>case $name in</p>
<p>a) aflag=1</p>
<p>;;</p>
<p>b) bflag=1</p>
<p>bval=$OPTARG</p>
<p>;;</p>
<p>/?) echo &quot;USAGE:`basename $0` [-a] [-b value]&quot;</p>
<p>exit 1</p>
<p>;;</p>
<p>esac</p>
<p>done</p>
<p>if[ ! -z $aflag ] ; then</p>
<p>echo &quot;option -a specified&quot;</p>
<p>echo &quot;$aflag&quot;</p>
<p>echo &quot;$OPTIND&quot;</p>
<p>fi</p>
<p>if[ ! -z $bflag ] ; then</p>
<p>echo &quot;option -b specified&quot;</p>
<p>echo &quot;$bflag&quot;</p>
<p>echo &quot;$bval&quot;</p>
<p>echo &quot;$OPTIND&quot;</p>
<p>fi</p>
<p>echo &quot;here $OPTIND&quot;</p>
<p>shift $(($OPTIND -1))</p>
<p>echo &quot;$OPTIND&quot;</p>
<p>echo &quot; `shift $(($OPTIND -1))` &quot;</p>
<p>##################################</p>
<p>判断脚本参数是否正确</p>
<p>./test.sh -p123 -P 3306 -h 127.0.0.1 -u root</p>
<p>#!/bin/sh</p>
<p>if[ $# -ne 8 ];then</p>
<p>echo &quot;USAGE: $0 -u user -p passwd -P port -h host&quot;</p>
<p>exit 1</p>
<p>fi</p>
<p>while getopts :u:p:P:h: name</p>
<p>do</p>
<p>case $name in</p>
<p>u)</p>
<p><a title="mysql" target="_blank" href="https://www.yisu.com/mysql/" rel="noopener">mysql</a>_user=$OPTARG</p>
<p>;;</p>
<p>p)</p>
<p>mysql_passwd=$OPTARG</p>
<p>;;</p>
<p>P)</p>
<p>mysql_port=$OPTARG</p>
<p>;;</p>
<p>h)</p>
<p>mysql_host=$OPTARG</p>
<p>;;</p>
<p>*)</p>
<p>echo &quot;USAGE: $0 -u user -p passwd -P port -h host&quot;</p>
<p>exit 1</p>
<p>;;</p>
<p>esac</p>
<p>done</p>
<p>if[ -z $mysql_user ] || [ -z $mysql_passwd ] || [ -z $mysql_port ] || [ -z $mysql_host ]</p>
<p>then</p>
<p>echo &quot;USAGE: $0 -u user -p passwd -P port -h host&quot;</p>
<p>exit 1</p>
<p>fi</p>
<p>echo $mysql_user $mysql_passwd $mysql_port $mysql_host</p>
<p>#结果 root123 3306127.0.0.1</p>
<p>##################################</p>
<p>dialog 取值接值退出</p>
<p>outtmp=/tmp/outtmp</p>
<p>dialog --no-shadow --backtitle &quot;hashlinux制作&quot; --title &quot;请选择&quot; --ok-label &quot;提交&quot; --cancel-label &quot;取消&quot;</p>
<p>--menu &quot;请选择&quot; 10 60 0 /</p>
<p>1 &quot;[目录]&quot; /</p>
<p>q &quot;[退出]&quot; /</p>
<p>2&gt; $outtmp</p>
<p>#判断提交取消</p>
<p>if[ $? == &quot;1&quot; ]</p>
<p>then</p>
<p>break</p>
<p>#continue</p>
<p>fi</p>
<p>#只判断退出</p>
<p>pt=`awk &#39;{print}&#39; $outtmp`</p>
<p>if[ $pt == q ]</p>
<p>then</p>
<p>break</p>
<p>fi</p>
<p>#判断操作</p>
<p>case $pt in</p>
<p>1)</p>
<p>#操作</p>
<p>;;</p>
<p>q)</p>
<p>exit #break</p>
<p>;;</p>
<p>esac</p>
<p>##################################</p>
<p>dialog 输入对话框加判断</p>
<p>while :</p>
<p>do</p>
<p>outtmp=/tmp/outtmp</p>
<p>dialog --title &quot;hashlinux制作&quot; --form &quot;请输入&quot; 20 60 10 &quot;用户:&quot; 1 2 &quot;&quot; 1 15 35 0 &quot;ID:&quot; 2 2 &quot;&quot; 2</p>
<p>15 35 0 &quot;&quot; 6 2 &quot;&quot;6 0 0 0 &quot;输入格式如下&quot; 7 2 &quot;&quot; 7 0 0 0 &quot;说明&quot; 8 2 &quot;&quot; 8 0 0</p>
<p>0 2&gt; $outtmp</p>
<p>yh=`sed -n &#39;1p&#39; $outtmp`</p>
<p>id=`sed -n &#39;2p&#39; $outtmp`</p>
<p>ifecho $yh | grep -e &#39;^[1-9][0-9]/{0,2/}&#39; &gt; /dev/null 2&gt;&amp;1</p>
<p>then</p>
<p>if echo $id | grep -e &#39;^[1-9][0-9]/{0,12/}&#39; &gt; /dev/null 2&gt;&amp;1</p>
<p>then</p>
<p>break</p>
<p>else</p>
<p>echo &quot;您输入的不合法，请从新输入！&quot;</p>
<p>fi</p>
<p>else</p>
<p>echo &quot;您输入的不合法，请从新输入！&quot;</p>
<p>fi</p>
<p>done</p>
<p>##################################</p>
<p>打印表格</p>
<p>#!/bin/sh</p>
<p>clear</p>
<p>awk &#39;BEGIN{</p>
<p>print &quot;+--------------------+--------------------+&quot;;</p>
<p>printf &quot;|%-20s|%-20s|/n&quot;,&quot;Name&quot;,&quot;Number&quot;;</p>
<p>print &quot;+--------------------+--------------------+&quot;;</p>
<p>}&#39;</p>
<p>a=`grep &quot;^[A-Z]&quot; a.txt |sort +1 -n |awk &#39;{print $1&quot;:&quot;$2}&#39;`</p>
<p>#cat a.txt |sort +1 -n |while read list</p>
<p>for list in $a</p>
<p>do</p>
<p>name=`echo $list |awk -F: &#39;{print $1}&#39;`</p>
<p>number=`echo $list |awk -F: &#39;{print $2}&#39;`</p>
<p>awk &#39;BEGIN{printf &quot;|%-20s|%-20s|/n&quot;,&quot;&#39;&quot;$name&quot;&#39;&quot;,&quot;&#39;&quot;$number&quot;&#39;&quot;;</p>
<p>print &quot;+--------------------+--------------------+&quot;;</p>
<p>}&#39;</p>
<p>done</p>
<p>awk &#39;BEGIN{</p>
<p>print &quot; *** The End *** &quot;</p>
<p>print &quot; &quot;</p>
<p>}&#39;</p>
<p>##################################</p>
<p>判断日期是否合法</p>
<p>#!/bin/sh</p>
<p>while read a</p>
<p>do</p>
<p>if echo$a | grep -q &quot;-&quot; &amp;&amp; date -d $a +%Y%m%d &gt; /dev/null 2&gt;&amp;1</p>
<p>then</p>
<p>if echo $a | grep -e &#39;^[0-9]/{4/}-[01][0-9]-[0-3][0-9]$&#39;</p>
<p>then</p>
<p>break</p>
<p>else</p>
<p>echo &quot;您输入的日期不合法，请从新输入！&quot;</p>
<p>fi</p>
<p>else</p>
<p>echo &quot;您输入的日期不合法，请从新输入！&quot;</p>
<p>fi</p>
<p>done</p>
<p>echo &quot;日期为$a&quot;</p>
<p>##################################</p>
<p>打印日期段所有日期</p>
<p>#!/bin/bash</p>
<p>qsrq=20010101</p>
<p>jsrq=20010227</p>
<p>n=0</p>
<p>&gt;tmp</p>
<p>while :;do</p>
<p>current=$(date +%Y%m%d -d&quot;$n day $qsrq&quot;)</p>
<p>if[[ $current == $jsrq ]];then</p>
<p>echo $current &gt;&gt;tmp;break</p>
<p>else</p>
<p>echo $current &gt;&gt;tmp</p>
<p>((n++))</p>
<p>fi</p>
<p>done</p>
<p>rq=`awk &#39;NR==1{print}&#39; tmp`</p>
<p>##################################</p>
<p>打印提示</p>
<p>cat &lt;&lt;EOF</p>
<p>#内容</p>
<p>EOF</p>
<p>登陆远程执行命令（特殊符号需要/转义）</p>
<p>ssh root@ip &lt;&lt; EOF</p>
<p>#执行命令</p>
<p>EOF</p>
<p>登陆 mysql 执行命令</p>
<p>mysql -uroot -ppasswd -S mysql.sock --default-character-set=gbk -A&lt;&lt;EOF&gt;outtmp</p>
<p>#mysql 命令</p>
<p>EOF</p>
<p>##################################</p>
<p>数学计算的小算法</p>
<p>#!/bin/sh</p>
<p>A=1</p>
<p>B=1</p>
<p>while [ $A-le 10 ]</p>
<p>do</p>
<p>SUM=`expr $A/* $B`</p>
<p>echo &quot;$SUM&quot;</p>
<p>if[ $A= 10 ]</p>
<p>then</p>
<p>B=`expr $B + 1`</p>
<p>A=1</p>
<p>fi</p>
<p>A=`expr $A+ 1`</p>
<p>done</p>
<p>##################################</p>
<p>竖行转横行(三种)</p>
<p>cat file|tr &#39;/n&#39; &#39; &#39;</p>
<p>echo $(cat file)</p>
<p>#!/bin/sh</p>
<p>for i in `cat file`</p>
<p>do</p>
<p>a=${a}&quot;&quot;${i}</p>
<p>done</p>
<p>echo $a</p>
<p>##################################</p>
<p>取用户的根目录</p>
<p>#! /bin/bash</p>
<p>#showhome.sh</p>
<p>IFS=:</p>
<p>while read namepass uid gid gecos home shell</p>
<p>do</p>
<p>echo $home</p>
<p>done</p>
<p>执行./showhome.sh &lt; /etc/passwd</p>
<p>##################################</p>
<p>把汉字转成 encode 格式：</p>
<p>echo 论坛 | tr -d &quot;/n&quot; | xxd -i | sed -e &quot;s/0x/%/g&quot; | tr-d &quot; ,/n&quot;</p>
<p>大写的：</p>
<p>echo 论坛 | tr -d &quot;/n&quot; | xxd -i | sed -e &quot;s/0x/%/g&quot; | tr-d &quot; ,/n&quot; | tr &quot;[a-f]&quot; &quot;[A-F]&quot;</p>
<p>##################################</p>
<p>把带有大写字母的文件名改为全部小写</p>
<p>#!/bin/bash</p>
<p>for fin *;do</p>
<p>mv $f `echo $f |tr &quot;[A-Z]&quot; &quot;[a-z]&quot;`</p>
<p>done</p>
<p>##################################</p>
<p>查找连续多行，在不连续的行前插入</p>
<p>#/bin/bash</p>
<p>lastrow=null</p>
<p>i=0</p>
<p>cat incl|while read line</p>
<p>do</p>
<p>i=`expr $i + 1`</p>
<p>ifecho &quot;$lastrow&quot; | grep &quot;#include &lt;[A-Z].h&gt;&quot;</p>
<p>then</p>
<p>if echo &quot;$line&quot; | grep -v &quot;#include&lt;[A-Z].h&gt;&quot;</p>
<p>then</p>
<p>sed -i &#39;&#39;$i&#39;i/////Allheader files are include&#39; incl</p>
<p>i=`expr $i + 1`</p>
<p>fi</p>
<p>fi</p>
<p>lastrow=&quot;$line&quot;</p>
<p>done</p>
<p>##################################</p>
<p>====================================================================</p>
<p>----------------------------------</p>
<p>9 服务配置</p>
<p>----------------------------------</p>
<p>samba</p>
<p>修改配置文</p>
<p>/etc/samba/smb.conf</p>
<p>[global]</p>
<p>workgroup =WORKGROUP</p>
<p>server string = sambaserver</p>
<p>security=share</p>
<p>hosts allow=网络主机</p>
<p>[file]</p>
<p>comment=home directories</p>
<p>path=/etc/samba/hashlinux</p>
<p>public=yes</p>
<p>writable=yes</p>
<p>browseable=yes</p>
<p>重启</p>
<p>service smb restart</p>
<p>linux 访问 windows 共享</p>
<p>smbclient -L //ip 地址或计算机名</p>
<p>##################################</p>
<p><a title="DNS" target="_blank" href="https://www.yisu.com/dns/" rel="noopener">DNS</a> <a title="服务器" target="_blank" href="https://www.yisu.com/" rel="noopener">服务器</a></p>
<p>DNS 主配置文件，moon.com 域名，zone.moon.com 域的配置文件</p>
<p>vi /etc/named.conf</p>
<p>zone &quot;moon.com&quot; IN {</p>
<p>type master;</p>
<p>file &quot;zone.moon.com&quot;;</p>
<p>allow-update { none; };</p>
<p>};</p>
<p>测试主配置文件</p>
<p>named-checkconf</p>
<p>新建域的配置文件 zone.moon.com</p>
<p>vi /var/named/chroot/var/named/zone.moon.com</p>
<p>$TTL 86400</p>
<p>@ IN SOA xs. quanzhou722.163.com. (</p>
<p>20102014</p>
<p>3H</p>
<p>15M</p>
<p>1W</p>
<p>1D</p>
<p>)</p>
<p>IN NS xs.</p>
<p>IN MX 5 mail.</p>
<p>www IN A 192.168.1.209</p>
<p>ftp IN A 192.168.1.209</p>
<p>mail IN A 192.168.1.209</p>
<p>测试 moon.com 域配置文件</p>
<p>named-checkzone moon.com /var/named/chroot/var/named/zone.moon.com</p>
<p>建立域配置文件的软连接</p>
<p>ln -s/var/named/chroot/var/named/zone.moon.com /var/named/zone.moon.com</p>
<p>重启 named 服务</p>
<p>service named restart</p>
<p>设置 DNS</p>
<p>vi /etc/resolv.conf</p>
<p>测试解析是否成功</p>
<p>host www.moon.com</p>
<p>nslookup www.moon.com</p>
<p>##################################</p>
<p>ftp 配置</p>
<p>查看 vsftp 是否安装</p>
<p>rpm -qa | grep vsftp</p>
<p>主配置文件</p>
<p>vi /etc/vsftpd/vsftpd.conf</p>
<p>启动 VSFTPD 服务</p>
<p>service vsftpd restart</p>
<p>查看 21 端口是否开放</p>
<p>netstat-atln |grep 21</p>
<p>1、匿名用户是否允许访问</p>
<p>anonymous_enable=YES</p>
<p>anon_mkdir_write_enable=YES</p>
<p>2、本地用户管理</p>
<p>local_enable=YES</p>
<p>chroot_list_enable=YES</p>
<p>chroot_list_file=/etc/vsftpd.chroot_list</p>
<p>将用户添加到 vsftpd.chroot_list 文件中允许访问</p>
<p>cat /etc/passwd |grep &quot;:5[0-9][0-9]:&quot; | awk -F : &#39;{print $1}&#39; &gt; /etc/vsftpd.chroot_list</p>
<p>3、虚拟用户管理</p>
<p>（1）要用到文件数据库 db4</p>
<p>rpm -qa |grep db4</p>
<p>（2）将帐户放入文本：（奇数行）用户名 （偶数行）密码</p>
<p>vi zhanghu.dat</p>
<p>（3）生成帐户的文件数据库</p>
<p>db_load -T -t hash -fzhanghu.dat /etc/vsftpd/vsftpd_zhanghu.db</p>
<p>（4）修改文件数据库访问权限</p>
<p>chmod 600 /etc/vsftpd/vsftpd_zhanghu.db</p>
<p>（5）手工建立虚拟用户所需的 PAM 配置文件</p>
<p>vi /etc/pam.d/vsftpd.zhanghu</p>
<p>auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_zhanghu</p>
<p>account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_zhanghu</p>
<p>（6）添加一个虚拟用户的入口帐户</p>
<p>useradd -d /var/ZhanDian -s /sbin/nologin XuNiRuKou</p>
<p>（7）在主配置文件中添加虚拟用户的配置内容</p>
<p>虚拟用户的新添加配置</p>
<p>chroot_local_user=YES</p>
<p>guest_enable=YES</p>
<p>guest_username=XuNiRuKou</p>
<p>pam_service_name=vsftpd.zhanghu</p>
<p>（8）在 vsftpd.conf 配置文件中指定用户配置文件的目录</p>
<p>user_config_dir=/etc/vsftpd/vsftpd_zhandian</p>
<p>（9）建立配置文件中指定用户配置文件的目录</p>
<p>mkdir /etc/vsftpd/vsftpd_zhandian</p>
<p>（10）因为入口帐户是一个本地帐户，所以要指定虚拟用户具有本地帐户的权限，才能读写 自</p>
<p>己空间中的文件</p>
<p>虚拟用户就可以就拥有写权限</p>
<p>virtual_use_local_privs=YES</p>
<p>（11）</p>
<p>touch /etc/vsftpd/vsftpd_zhandian/hashlinux</p>
<p>echo &quot;local_root=/var/ZhanDian/hashlinux&quot; &gt;&gt; /etc/vsftpd/vsftpd_zhandian/hashlinux</p>
<p>（12）</p>
<p>mkdir /var/ZhanDian/hashlinux</p>
<p>（13）</p>
<p>chown -R XuNiRuKou:XuNiRuKou /var/ZhanDian/</p>
<p>（14）重启服务</p>
<p>/etc/init.d/vsftpd restart</p>
<p>（15）客户端虚拟账号测试</p>
<p>建立用户脚本。最好在加上判断用户名是否存在</p>
<p>#!/bin/sh</p>
<p>echo 请输入用户名</p>
<p>read y</p>
<p>echo $y &gt;&gt; zhanghu.dat</p>
<p>echo 请输入密码</p>
<p>read m</p>
<p>echo $m &gt;&gt; zhanghu.dat</p>
<p>db_load -T -t hash -fzhanghu.dat /etc/vsftpd/vsftpd_zhanghu.db</p>
<p>chmod 600 /etc/vsftpd/vsftpd_zhanghu.db</p>
<p>touch /etc/vsftpd/vsftpd_zhandian/$y</p>
<p>echo &quot;local_root=/var/ZhanDian/$y&quot; &gt;&gt; /etc/vsftpd/vsftpd_zhandian/$y</p>
<p>mkdir /var/ZhanDian/$y</p>
<p>chown -R XuNiRuKou:XuNiRuKou /var/ZhanDian/$y</p>
<p>/etc/init.d/vsftpd restart</p>
<p>##################################</p>
<p>httpd 安装</p>
<p>tar zxvf httpd-2.2.12.tar.gz</p>
<p>cd httpd-2.2.12</p>
<p>./configure --prefix=/usr/local/httpd /</p>
<p>--enable-rewrite</p>
<p>make &amp;&amp; make install</p>
<p>ls /usr/local/</p>
<p>groupadd www</p>
<p>useradd -g www-M -s /sbin/nologin www</p>
<p>cd /usr/local/httpd/</p>
<p>vi conf/httpd.conf</p>
<p>服务器开启在软件安装目录的 bin 中</p>
<p>./apachectl start</p>
<p>网页放在的 htdocs 中</p>
<p>开机启动</p>
<p>vi /etc/rc.d/rc.local</p>
<p>/usr/local/httpd/bin/apachectl start</p>
<p>如果启动提示</p>
<p>httpd: Could not reliably determine the server fully qualified domain name, using 127.0.0.1 for</p>
<p>ServerName</p>
<p>修改/etc/hosts 计算机名</p>
<p>在 httpd.conf 中开启</p>
<p>ServerName 127.0.0.1:80</p>
<p>编码设置</p>
<p>AddDefaultCharset UTF-8</p>
<p>AddDefaultCharset GB2312</p>
<p>##################################</p>
<p>mysql 源码安装</p>
<p>groupadd mysql</p>
<p>useradd mysql -g mysql -M -s /bin/false</p>
<p>tar zxvf mysql-5.0.22.tar.gz</p>
<p>cd mysql-5.0.22</p>
<p>./configure --prefix=/usr/local/mysql /</p>
<p>--with-client-ldflags=-all-static /</p>
<p>--with-mysqld-ldflags=-all-static /</p>
<p>--with-mysqld-user=mysql /</p>
<p>--with-extra-charsets=all /</p>
<p>--with-unix-socket-path=/var/tmp/mysql.sock</p>
<p>make &amp;&amp; make install</p>
<p>生成 mysql 用户数据库和表文件，在安装包中输入。</p>
<p>scripts/mysql_install_db --user=mysql</p>
<p>vi ~/.bashrc</p>
<p>export PATH=&quot;$PATH: /usr/local/mysql/bin&quot;</p>
<p>配置文件,有 large,medium,small 三个，根据机器性能选择</p>
<p>cp support-files/my-medium.cnf /etc/my.cnf</p>
<p>cp support-files/mysql.server /etc/init.d/mysqld</p>
<p>chmod 700 /etc/init.d/mysqld</p>
<p>cd /usr/local</p>
<p>chmod 750 mysql -R</p>
<p>chgrp mysql mysql -R</p>
<p>chown mysql mysql/var -R</p>
<p>cp /usr/local/mysql/libexec/mysqld mysqld.old</p>
<p>ln -s/usr/local/mysql/bin/mysql /sbin/mysql</p>
<p>ln -s/usr/local/mysql/bin/mysqladmin /sbin/mysqladmin</p>
<p>ln -s-f /usr/local/mysql/bin/mysqld_safe /etc/rc.d/rc3.d/S15mysql5</p>
<p>ln -s-f /usr/local/mysql/bin/mysqld_safe /etc/rc.d/rc0.d/K15mysql5</p>
<p>##################################</p>
<p>mysql rpm 安装</p>
<p>到 http://www.mysql.com/downloads/mysql 下载 mysql RPM（service 和 client） ，</p>
<p>MySQL-server-community-5.1.51-1.rhel5.i386.rpm 安装服务端</p>
<p>MySQL-client-community-5.1.51-1.rhel5.i386.rpm 安装客户端</p>
<p>MySQL-devel-community-5.1.51-1.rhel5.i386.rpm 用于 php 的 mysql 安装</p>
<p>rpm –ivh MySQL-server-community-5.1.51-1.rhel5.i386.rpm</p>
<p>rpm –ivh MySQL-client-community-5.1.51-1.rhel5.i386.rpm</p>
<p>rpm –ivh MySQL-devel-community-5.1.51-1.rhel5.i386.rpm</p>
<p>/etc/init.d/mysqld start</p>
<p>mysqladmin -u root password &#39;hashlinux&#39;</p>
<p>mysql -u root -S /var/lib/mysql/mysql.sock -p</p>
<p>数据目录/var/lib/mysql</p>
<p>chkconfig --list |grep mysqld</p>
<p>chkconfig --level 3 mysqld on</p>
<p>配置文件(日志/pid)</p>
<p>/etc/my.cnf</p>
<p>ll /usr/bin/mysql*</p>
<p>##################################</p>
<p>mysql 常用命令</p>
<p>启动 mysql 服务</p>
<p>./mysql/bin/mysqld_safe --user=mysql &amp;</p>
<p>登录 mysql 的命令</p>
<p>格式： mysql -h 主机地址 -u 用户名-p 用户密码</p>
<p>mysql -h210.110.110.110 -P3306 -uroot -p</p>
<p>mysql -uroot -p -S /data1/mysql5/data/mysql.sock -A --default-character-set=GBK</p>
<p>刷新</p>
<p>flush privileges;</p>
<p>显示所有数据库</p>
<p>show databases;</p>
<p>打开数据库</p>
<p>use dbname;</p>
<p>显示选中数据库中所有的表</p>
<p>show tables;</p>
<p>查看表结构</p>
<p>desc tables;</p>
<p>删除数据库</p>
<p>drop database name;</p>
<p>删除表</p>
<p>drop table name;</p>
<p>创建数据库</p>
<p>create database name;</p>
<p>mysqladmin -h myhost -u root -p create dbname</p>
<p>创建表</p>
<p>create table ka(ka_idvarchar(6),qianshu int);</p>
<p>插入字段</p>
<p>alter table name add column accountid(列名) int(11) NOT NULL(字段不为空);</p>
<p>不登陆 mysql 插入字段</p>
<p>mysql -uroot -p -S mysql.sock -e &quot;use db;alter table gift add column accountid int(11) NOT</p>
<p>NULL;flush privileges;&quot;</p>
<p>查询</p>
<p>select 列名称 from 表名称;</p>
<p>select host,user,password from user;</p>
<p>备份数据库</p>
<p>mysqldump -h host -u root -pdbname &gt;dbname_backup.sql</p>
<p>mysqlhotcopy 只能备份 MyISAM 引擎</p>
<p>/bin/mysqlhotcopy -u root -p</p>
<p>还原数据库</p>
<p>mysql -h host -u root -pdbname &lt; dbname_backup.sql</p>
<p>登陆 mysql 后还原 sql 文件</p>
<p>source 路径.sql</p>
<p>赋予查询权限(没有用户，直接创建)</p>
<p>grant select on db.* to log@&quot;%&quot; Identified by &quot;123456&quot;;</p>
<p>赋予所有权限(没有用户，直接创建)</p>
<p>grant all privileges on db.* to log@&quot;IP&quot; identified by &#39;123456&#39; withgrant option;</p>
<p>更改密码</p>
<p>update user set password=password(&#39;新密码&#39;) where user=&#39;root&#39;</p>
<p>mysqladmin -u root password &#39;hashlinux&#39;</p>
<p>mysql 查看所有用户的语句</p>
<p>select user();</p>
<p>删除用户</p>
<p>delete from user where user=&#39;sss&#39; andhost=&#39;localhost&#39; ;</p>
<p>查看主从</p>
<p>show slave status/G;</p>
<p>查看主从复制进程</p>
<p>show processlist;</p>
<p>添加索引 解决停 mysql 速度慢</p>
<p>ALTER TABLE playerADD INDEX weekcredit_faction_index (weekcredit, faction);</p>
<p>创建主从复制用户</p>
<p>grant replication slave on *.* to &#39;用户&#39;@&#39;%&#39; identifiedby &#39;密码&#39;;</p>
<p>备份表</p>
<p>mysqldump -u root -p -S mysql.sock --default-character-set=utf8 --hex-blob db table1 table1 &gt;</p>
<p>/data/db.sql</p>
<p>查看系统的字符集和排序方式的设定</p>
<p>SHOW VARIABLES LIKE &#39;character_set_%&#39;;</p>
<p>查看 mysql 所有参数</p>
<p>show variables;</p>
<p>删除空用户</p>
<p>delete from user where user=&#39;&#39;;</p>
<p>创建表指定存储引擎的类型:</p>
<p>CREATE TABLE innodb (id int, titlechar(20)) ENGINE = INNODB</p>
<p>CREATE TABLE myisam (id int, title char(20)) ENGINE =MyISAM</p>
<p>改变现有的表使用的存储引擎:</p>
<p>ALTER TABLE mytable ENGINE = MyISAM</p>
<p>查询表引擎</p>
<p>SHOW TABLE STATUS from 数据库库名 where Name=&#39;表名&#39;;</p>
<p>SHOW TABLE STATUS from db where Name=&#39;innodb&#39;;</p>
<p>查看 mysql 变量</p>
<p>SHOW VARIABLES;</p>
<p>查询用户权限</p>
<p>select host,user,password from user;</p>
<p>查看表的引擎状态</p>
<p>show table status</p>
<p>##################################</p>
<p>gd 安装</p>
<p>分别安装组件 libxml、zlib、freetype、libpng、jpegsrc、gd</p>
<p>libxml2-2.6.24.tar.bz2</p>
<p>zlib-1.2.3.tar.gz</p>
<p>freetype-2.2.1.tar.gz</p>
<p>libpng-1.2.10.tar.gz</p>
<p>jpegsrc.v6b.tar.gz</p>
<p>gd-2.0.33.tar.gz</p>
<p>libxml安装</p>
<p>tar xzvf libxml2-2.6.24.tar.bz2</p>
<p>tar xvf libxml2-2.6.24.tar</p>
<p>cd libxml2-2.6.24</p>
<p>./configure</p>
<p>make</p>
<p>make install</p>
<p>zlib 安装</p>
<p>tar xzvf zlib-1.2.3.tar.gz</p>
<p>cd zlib-1.2.3</p>
<p>./configure</p>
<p>make</p>
<p>make install</p>
<p>freetype 安装</p>
<p>tar xzvf freetype-2.2.1.tar.gz</p>
<p>cd freetype-2.2.1</p>
<p>./configure --prefix=/usr/local/php/modules/freetype</p>
<p>make</p>
<p>make install</p>
<p>libpng 安装</p>
<p>tar xzvf libpng-1.2.10.tar.gz</p>
<p>cd libpng-1.2.10</p>
<p>./configure --prefix=/usr/local/php/modules/libpng</p>
<p>jpeg 安装</p>
<p>mkdir /usr/local/php/modules/jpeg6</p>
<p>mkdir /usr/local/php/modules/jpeg6/bin</p>
<p>mkdir /usr/local/php/modules/jpeg6/lib</p>
<p>mkdir /usr/local/php/modules/jpeg6/include</p>
<p>mkdir /usr/local/php/modules/jpeg6/man</p>
<p>mkdir /usr/local/php/modules/jpeg6/man/man1</p>
<p>一句创建</p>
<p>mkdir -pv /usr/local/jpeg/{,bin,lib,include,man/man1,man1}</p>
<p>tar zxvf jpegsrc.v6b.tar.gz</p>
<p>cd jpeg-6b/</p>
<p>./configure --prefix=/usr/local/php/modules/jpeg6 /</p>
<p>--enable-shared /</p>
<p>--enable-static</p>
<p>make</p>
<p>make install</p>
<p>gd 安装</p>
<p>tar zxvf gd-2.0.33.tar.gz</p>
<p>cd gd-2.0.33</p>
<p>./configure --prefix=/usr/local/gd2 /</p>
<p>--with-jpeg=/usr/local/php/modules/jpeg6 /</p>
<p>--with-png=/usr/local/php/modules/libpng /</p>
<p>--with-zlib /</p>
<p>--with-freetype=/usr/local/php/modules/freetype</p>
<p>修改 Makefile 文件 231 行，重复的第二个 freetype 改为 libpng</p>
<p>make</p>
<p>make install</p>
<p>php 安装</p>
<p>tar xvf php-5.1.6.tar</p>
<p>cd php-5.1.bz2.6</p>
<p>./configure --prefix=/usr/local/php /</p>
<p>--sysconfdir=/etc /</p>
<p>--with-apxs2=/usr/local/httpd/bin/apxs /</p>
<p>--with-config-file-path=/usr/local/php/lib /</p>
<p>--with-libxml-dir=/usr/local/libxml2 /</p>
<p>--with-zlib /</p>
<p>--with-jpeg-dir=/usr/local/php/modules/jpeg6 /</p>
<p>--with-freetype-dir=/usr/local/php/modules/freetype /</p>
<p>--with-gd=/usr/local/gd2 /</p>
<p>--with-openssl /</p>
<p>--with-regex=php /</p>
<p>--with-gnu-ld /</p>
<p>--with-tsrm-pthreads /</p>
<p>--with-bz2 /</p>
<p>--with-gettext /</p>
<p>--with-db4=/usr /</p>
<p>--enable-ftp /</p>
<p>--enable-bcmath /</p>
<p>--enable-dba /</p>
<p>--enable-sockets /</p>
<p>--enable-soap /</p>
<p>--enable-zend-multibyte /</p>
<p>--enable-mbstring /</p>
<p>--with-curlwrappers /</p>
<p>--with-curl=/usr/local/curl /</p>
<p>--with-pdo-mysql=/usr/local/mysql /</p>
<p>--with-mysql=/usr/local/mysql /</p>
<p>--with-mysqli=/usr/local/mysql/bin/mysql_config</p>
<p>make</p>
<p>make install</p>
<p>cp php.ini-recommended /usr/local/php/lib/php.ini</p>
<p>vi /usr/local/php/lib/php.ini</p>
<p>在 PHP.IN 添加</p>
<p>[eaccelerator]</p>
<p>extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so</p>
<p>eaccelerator.shm_size=&quot;32&quot;</p>
<p>eaccelerator.cache_dir=&quot;/usr/local/cache/eaccelerator&quot;</p>
<p>eaccelerator.enable=&quot;1&quot;</p>
<p>eaccelerator.optimizer=&quot;1&quot;</p>
<p>eaccelerator.check_mtime=&quot;1&quot;</p>
<p>eaccelerator.debug=&quot;0&quot;</p>
<p>eaccelerator.filter=&quot;&quot;</p>
<p>eaccelerator.shm_max=&quot;0&quot;</p>
<p>eaccelerator.shm_ttl=&quot;0&quot;</p>
<p>eaccelerator.shm_prune_period=&quot;0&quot;</p>
<p>eaccelerator.shm_only=&quot;0&quot;</p>
<p>eaccelerator.compress=&quot;1&quot;</p>
<p>eaccelerator.compress_level=&quot;9&quot;</p>
<p>完成后在/usr/local/httpd/conf/httpd.conf 文件上添加如下一行：</p>
<p>AddType application/x-httpd-php .php .php5</p>
<p>ln -s/usr/local/php/bin/php /sbin/php</p>
<p>vi index.php</p>
<p class="introduction">以上是“hashlinux常用命令有哪些”这篇文章的所有内容，感谢各位的阅读！希望分享的内容对大家有帮助，更多相关知识，欢迎关注亿速云行业资讯频道！</p>
<div class="entry-readmore"><div class="entry-readmore-btn"></div></div>                                                        <div class="entry-copyright"><p>原创文章，作者：306829225，如若转载，请注明出处：https://blog.ytso.com/tech/bigdata/205591.html</p></div>                        </div>

                        <div class="entry-tag"></div>
                        <div class="entry-action">
                            <div class="btn-zan" data-id="205591"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up-fill"></use></svg></i> 赞 <span class="entry-action-num">(0)</span></div>
                                                    </div>

                        <div class="entry-bar">
                            <div class="entry-bar-inner">
                                                                <div class="entry-bar-info entry-bar-info2">
                                    <div class="info-item meta">
                                                                                    <a class="meta-item j-heart" href="javascript:;" data-id="205591"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i> <span class="data">0</span></a>                                        <a class="meta-item" href="#comments"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i> <span class="data">0</span></a>                                                                            </div>
                                    <div class="info-item share">
                                                                                    <a class="meta-item mobile j-mobile-share" href="javascript:;" data-id="205591" data-qrcode="https://blog.ytso.com/tech/bigdata/205591.html">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> 生成海报                                            </a>
                                                                                    <a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qzone" data-share="qzone" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qzone"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item douban" data-share="douban" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-douban"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item linkedin" data-share="linkedin" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-linkedin"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item facebook" data-share="facebook" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-facebook"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item twitter" data-share="twitter" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-twitter"></use></svg></i>                                            </a>
                                                                            </div>
                                    <div class="info-item act">
                                        <a href="javascript:;" id="j-reading"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                                            <div class="entry-page">
                    <div class="entry-page-prev entry-page-nobg">
                <a href="https://blog.ytso.com/tech/bigdata/205590.html" title="RAC日常运行中基本启停命令有哪些" rel="prev">
                    <span>RAC日常运行中基本启停命令有哪些</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-left"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-left-double"></use></svg></i> 上一篇</span>
                    <span class="pull-right">2021年11月29日 23:04</span>
                </div>
            </div>
                            <div class="entry-page-next entry-page-nobg">
                <a href="https://blog.ytso.com/tech/bigdata/205592.html" title="Django开发中常用的命令有哪些" rel="next">
                    <span>Django开发中常用的命令有哪些</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-right">下一篇 <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-double"></use></svg></i></span>
                    <span class="pull-left">2021年11月29日 23:04</span>
                </div>
            </div>
            </div>
                                        <error>
    <code>wp_die</code>
    <title><![CDATA[WordPress &amp;rsaquo; Error]]></title>
    <message><![CDATA[&lt;h1&gt;Error establishing a Redis connection&lt;/h1&gt;
&lt;p&gt;To disable Redis, delete the &lt;code&gt;object-cache.php&lt;/code&gt; file in the &lt;code&gt;/wp-content/&lt;/code&gt; directory.&lt;/p&gt;
]]></message>
    <data>
        <status>500</status>
    </data>
</error>
<!--
Performance optimized by Redis Object Cache. Learn more: https://wprediscache.com

Retrieved 1722 objects (341 KB) from Redis using Predis (v2.4.0).
-->
