<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BizSmooth——企顺学校博客 &#187; shell</title>
	<atom:link href="http://blog.bizsmooth.com/?feed=rss2&#038;tag=shell" rel="self" type="application/rss+xml" />
	<link>http://blog.bizsmooth.com</link>
	<description>企顺学校老师和同学们的交流园地</description>
	<lastBuildDate>Wed, 04 Feb 2026 12:22:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>【转载】shell编程入门教程</title>
		<link>http://blog.bizsmooth.com/?p=1310</link>
		<comments>http://blog.bizsmooth.com/?p=1310#comments</comments>
		<pubDate>Mon, 05 Oct 2015 01:55:25 +0000</pubDate>
		<dc:creator>李 伟斌</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[操作系统]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[企顺]]></category>
		<category><![CDATA[系统管理]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[脚本]]></category>
		<category><![CDATA[自动化运维]]></category>

		<guid isPermaLink="false">http://blog.bizsmooth.org/?p=1310</guid>
		<description><![CDATA[shell是每个Linux工程师离不开的强大工具，通过这个工具能够快速完成系统管理和调试的操作，甚至为将来实现无人值守的自动化运维提供强有力的脚本支持！希望该文章对大家有用！ <a href="http://blog.bizsmooth.com/?p=1310">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.bizsmooth.com/?feed=rss2&amp;p=1310</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Physical examination reveals abnormal looseness within the ankle joint</title>
		<link>http://blog.bizsmooth.com/?p=1295</link>
		<comments>http://blog.bizsmooth.com/?p=1295#comments</comments>
		<pubDate>Sat, 23 Aug 2014 03:33:06 +0000</pubDate>
		<dc:creator>李 伟斌</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[操作系统]]></category>
		<category><![CDATA[LFS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[企顺]]></category>
		<category><![CDATA[命令集合]]></category>
		<category><![CDATA[定制操作系统]]></category>
		<category><![CDATA[脚本]]></category>

		<guid isPermaLink="false">http://blog.bizsmooth.org/?p=1295</guid>
		<description><![CDATA[前不久自己定制了Linux操作系统，是基于LFS的说明文档执行完成的，后来去查看历史记录的时候，发现这些命令其实就可以生成一个shell脚本，熟练使用LFS构建自己操作系统的朋友可以直接做成shell脚本。 <a href="http://blog.bizsmooth.com/?p=1295">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.bizsmooth.com/?feed=rss2&amp;p=1295</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转载]高可用环境的Keepalived+mysql 自动切换</title>
		<link>http://blog.bizsmooth.com/?p=991</link>
		<comments>http://blog.bizsmooth.com/?p=991#comments</comments>
		<pubDate>Wed, 05 Jun 2013 12:35:22 +0000</pubDate>
		<dc:creator>李 伟斌</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[操作系统]]></category>
		<category><![CDATA[keepalive]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[企顺]]></category>
		<category><![CDATA[双主同步]]></category>
		<category><![CDATA[运维]]></category>
		<category><![CDATA[高可用]]></category>

		<guid isPermaLink="false">http://blog.bizsmooth.org/?p=991</guid>
		<description><![CDATA[Keepalived+mysql 自动切换 网络结构： VIP 192.168.20.50 mysq11 192.168.20.37 主 mysql2 192.168.20.38 备 一 mysql 主主同步 二 安装keepalived 三 keepalived 主备配置文件 四 mysql状态检测脚本/root/bin/keepalived_check_mysql.sh 五 防火墙设置 六 测试及诊断 七 参考资料 注 keepalived之间使用vrrp组播方式通信使用的IP地址是224.0.0.18 一 mysql 主主同步 请百度谷歌。 二 安装keepalived wget http://www.keepalived.org/software/keepalived-1.2.2.tar.gz tar zxvf keepalived-1.2.2.tar.gz &#8230; <a href="http://blog.bizsmooth.com/?p=991">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.bizsmooth.com/?feed=rss2&amp;p=991</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>【shell】利用shell脚本实现监视远程主机磁盘的健康状态</title>
		<link>http://blog.bizsmooth.com/?p=910</link>
		<comments>http://blog.bizsmooth.com/?p=910#comments</comments>
		<pubDate>Fri, 01 Feb 2013 09:42:24 +0000</pubDate>
		<dc:creator>李 伟斌</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[操作系统]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[while]]></category>
		<category><![CDATA[企顺]]></category>
		<category><![CDATA[磁盘]]></category>
		<category><![CDATA[脚本]]></category>
		<category><![CDATA[自动登陆]]></category>
		<category><![CDATA[远程监控]]></category>

		<guid isPermaLink="false">http://blog.bizsmooth.org/?p=910</guid>
		<description><![CDATA[最近买了一本书：《Linux shell 脚本攻略》，人民邮电出版社的。 看了几天有点儿感觉了，目前应用linux授课时间比较多，看了很多书，发现计算机技术类的书基本分为两大类：入门类和实战类 入门的书，多是从最基础，最简单的内容开始，循序渐进，由浅入深地展开，旨在引导读者完成一个从“无”到“有”的过程。 而实战类的书，则是假定读者已经有了一定的基础，将重点放在特定情境下展开，帮助读者完成从“有”到“精”的过程。 很多人都能很快的在网上看到一些关于shell入门的资料，而就如何利用shell解决平时运行linux系统遇到的问题，相关的技巧大多散落在各个linux论坛，博客中，不易查找和归纳总结。 老外常常写的一种书叫做cookbook，就是像菜谱一样，你照着做，就能完成相应的功能。很实用，很简单。可以这样认为： 菜谱&#8212;-亟待解决的问题。 做法&#8212;-具体的命令或者脚本 在学习了一段时间后，我发现通过这本书，学到了很多小技巧，其中一个就是身边正好要用到的实例： 最近朋友做个一个linux系统的管理工作，想监视远程磁盘的健康情况： 由于linux主机数量多，一台台看日志肯定是很低效率的，所以作为网络管理员，他得每天记录网络中所有主机的磁盘使用情况。日志的每一行应该包含日期、主机IP地址、设备、设备容量、已用空间、剩余空间、使用比例、健康状况等细节信息。如果任何远程主机中的任意分区使用率超过了80%，那么就应该将健康状况设置为ALERT，否则就设置为SAFE。 下面就演示一下如何编写一个可以收集远程网络主机详细信息的脚本，当然了，如果不愿意折腾的朋友可以选择nagios或者别的软件来实现监控。 思路： 1.分别从网络中的每台主机收集磁盘使用情况的统计信息，并写入中央主机的日志文件中。 2.将负责收集信息并写入日志的脚本调度为每天执行。 PS：其中ssh可以用于登陆远程系统收集磁盘数据 实战操作： 1.首先，我们得在所有网络中的远程主机上设置一个公用的账户。这个账户供脚本yoyodiskchecklog登陆系统使用。同时需要为这个账户配置ssh自动登陆。 #useradd diskcheck #echo &#8220;mypassword&#8221; &#124; passwd &#8211;stdin diskcheck 2. 设置ssh自动化登陆认证 2.1 创建ssh密钥，这需要登陆到远程主机。 #ssh -keygen -t rsa 创建过程中需要输入口令来成一对公钥和私钥。但是我们是需要利用自动登陆来登陆多个主机来执行监控脚本，因此这里不要填入口令了，可以避免在脚本运行时向你索要口令了。现在，你已经有~/.ssh/id_rsa.pub和~/.ssh/id_rsa两个文件了，一个是公钥，一个是私钥。 其中公钥必须要添加到远程服务器~/.ssh/authorized_keys文件中去，这台服务器也就是我们想从当前主机自动登入的那台服务器。 2.2 将生成的公钥传输到远程主机，并将其加入到文件： &#8230; <a href="http://blog.bizsmooth.com/?p=910">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.bizsmooth.com/?feed=rss2&amp;p=910</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Linux命令小技巧]关于seq的使用技巧.</title>
		<link>http://blog.bizsmooth.com/?p=568</link>
		<comments>http://blog.bizsmooth.com/?p=568#comments</comments>
		<pubDate>Tue, 20 Dec 2011 08:02:10 +0000</pubDate>
		<dc:creator>李 伟斌</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[seq]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[企顺]]></category>
		<category><![CDATA[伪随机码]]></category>
		<category><![CDATA[序列]]></category>
		<category><![CDATA[批量添加用户]]></category>
		<category><![CDATA[用户管理]]></category>
		<category><![CDATA[脚本]]></category>

		<guid isPermaLink="false">http://blog.bizsmooth.org/?p=568</guid>
		<description><![CDATA[seq 可以表达数字，一串数字。 例如 seq 50 就会从一打印到 50 个数字 ，还可以跳着出数。例如想每隔两个数出一个数字 seq 1 2 10 这样就只有奇数输出. 例如想产生一个前边家字符的循环 seq -f &#8216;yoyojacky%g&#8217; 10 这样就会产生从yoyojacky1-yoyojacky10的字符串。 用于产生从某个数到另外一个数之间的所有整数 　　例一： 　　# seq 1 10 　　结果是1 2 3 4 5 6 7 8 9 10 seq -f, &#8211;format=FORMAT use &#8230; <a href="http://blog.bizsmooth.com/?p=568">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.bizsmooth.com/?feed=rss2&amp;p=568</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>通过配置一级命令提示符让你的终端色彩缤纷</title>
		<link>http://blog.bizsmooth.com/?p=446</link>
		<comments>http://blog.bizsmooth.com/?p=446#comments</comments>
		<pubDate>Fri, 01 Apr 2011 07:37:36 +0000</pubDate>
		<dc:creator>李 伟斌</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[企顺]]></category>
		<category><![CDATA[命令提示符]]></category>
		<category><![CDATA[颜色]]></category>

		<guid isPermaLink="false">http://blog.bizsmooth.org/?p=446</guid>
		<description><![CDATA[如果您很容易使 shell 提示行变得色彩绚烂斓且带有更多信息，为什么还要坚持用单调的标准 shell 提示行呢？在这篇技巧中，Daniel Robbins 将说明如何获得符合您的意愿的 shell 提示行，并会说明如何动态更新 X 终端的标题栏。 　　作为 Linux/UNIX 人，我们有很长的时间是在 shell 中工作，并且在许多情况下，下面这一行就是始终盯着我们的那个提示行： 　　bash-2.04$ 　　如果您恰巧是超级用户 (root)，您就有权使用下面这个美丽的标示“身份”的提示行版本： 　　bash-2.04# 　　这些提示行并不是十分漂亮。这也就难怪几种 Linux 版本对默认提示行进行了升级，在其中增加了颜色和更多的信息。但是，即便您恰好有一个本身带有很好的彩色提示行的新式版本，它也不可能是完美无缺的。您或许希望在提示行中增加或更改几种颜色，或者增加（或删除）一些信息。从头开始设计属于您自己的彩色的、经过装饰的提示行并不难。 　　提示行基础 　　在 bash 下，可以通过更改 PS1 环境变量的值来设置提示行，如下所示： 　　$ export PS1=&#8221;&#62; &#8221; 　　&#62; 　　更改会立即生效，通过将 &#8220;export&#8221; 定义放在您的 ~/.bashrc 文件中可将这种更改固定下来。只要您愿意，PS1 可以包含任意数量的纯文本： &#8230; <a href="http://blog.bizsmooth.com/?p=446">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.bizsmooth.com/?feed=rss2&amp;p=446</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux中如何查看服务是否可以使用tcpwraps来进行访问控制？</title>
		<link>http://blog.bizsmooth.com/?p=415</link>
		<comments>http://blog.bizsmooth.com/?p=415#comments</comments>
		<pubDate>Thu, 17 Feb 2011 02:55:47 +0000</pubDate>
		<dc:creator>李 伟斌</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ldd]]></category>
		<category><![CDATA[libwrap.so]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tcpwrap]]></category>
		<category><![CDATA[企顺]]></category>
		<category><![CDATA[库]]></category>
		<category><![CDATA[模块]]></category>

		<guid isPermaLink="false">http://blog.bizsmooth.org/?p=415</guid>
		<description><![CDATA[今天有人问我，如果有四个程序: xinetd, httpd,sshd,syslogd 如何可以查到这4个程序中，支持tcpwrap的程序呢？ 据我所知，如果支持tcpwrap就一定有libwrap的库文件参与。那么程序在运行的时候肯定会加载相应的库模块。 而查询加载的模块命令我们用ldd。可是查询的时候如何快速查询是否有libwrap的模块呢？就需要我们写一个简单的shell脚本了。。。呵呵 分解一下： 首先第一步。测试一下 xinetd程序在那里。可以用which命令来定位。 [root@RHEL5 ~]# which xinetd /usr/sbin/xinetd 得到结果是/usr/sbin/xinetd这个程序，然后利用ldd 查看该程序加载了哪些模块。 [root@RHEL5 ~]# ldd /usr/sbin/xinetd linux-gate.so.1 =&#62; (0x00e7b000) libselinux.so.1 =&#62; /lib/libselinux.so.1 (0x0036f000) libwrap.so.0 =&#62; /usr/lib/libwrap.so.0 (0&#215;00582000) libnsl.so.1 =&#62; /lib/libnsl.so.1 (0&#215;00294000) libm.so.6 =&#62; /lib/i686/nosegneg/libm.so.6 (0&#215;00256000) libcrypt.so.1 &#8230; <a href="http://blog.bizsmooth.com/?p=415">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://blog.bizsmooth.com/?feed=rss2&amp;p=415</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
