到了 1991年 ,芬兰的赫尔辛基大学的Linus Torvalds宣称他用gcc、bash等程序写了一个小kernel,这个kernel可以在Intel的386机上面跑,从此时开始,Linux问世。 ...
分类:
系统相关 时间:
2016-08-05 13:47:02
阅读次数:
320
#!/bin/bash
fdisk-l|grep-o"/dev/[a-z].*d[a-z]"|uniq
read-p"qingxuanzeyaogeshihuadediskqisexit:"disk
if[$disk==q]
then
echo"exit#######################33"
exit1
fi
untilfdisk-l|grep-o"/dev/[a-z].*d[a-z]"|uniq|grep-o$disk
do
echo"error..............exit######..
分类:
系统相关 时间:
2016-08-05 08:58:05
阅读次数:
184
bash中一切变量都是以字符串的形式存储,env命令可以查看与此终端进程相关的环境变量。 查看一个进程的环境变量 1.获得程序的PID,例如Java# pgrep java234922.查看对应的环境变量# cat /proc/23492/environ3.将输出格式化,这样查看会比上图清晰# ca ...
分类:
系统相关 时间:
2016-08-05 06:24:25
阅读次数:
195
#!/bin/bash
#nginxStartupscriptfortheNginxHTTPServer
#itisv.0.0.2version.
#chkconfig:-8515
#description:Nginxisahigh-performancewebandproxyserver.
#Ithasalotoffeatures,butit‘snotforeveryone.
#processname:nginx
#pidfile:/var/run/nginx.pid
#config:/usr/local/..
分类:
其他好文 时间:
2016-08-05 01:14:51
阅读次数:
166
passwd文件格式以冒号为分隔符,分为7段:loginname:登录用名(wang)passwd:密码(x)UID:用户身份编号(1000)GID:登录默认所在组编号(1000)GECOS:用户全名或注释homedirectory:用户主目录(/home/wang)shell:用户默认使用shell(/bin/bash)shadow文件格式以冒号为分隔符,..
分类:
其他好文 时间:
2016-08-05 01:13:15
阅读次数:
233
通过命令行和Mysql交互 [root]#mysql -uroot -p123 -e "show databases" -e: execute: 执行数据库命令 通过脚本和数据库进行交互,sql一定要用""引起来表示执行语句 #!/bin/bash #mysql.sh mysql="/usr/loc ...
分类:
数据库 时间:
2016-08-05 00:35:22
阅读次数:
707
PS背景:我在公司做sdk 的pc端开发,所以经常会在win下编译通过之后跑到linux下再运行一次已确保能支持多平台。 今儿在win下跑完一程序,然后放到linux下跑的时候,我用指令: [plain] view plain copy sudo ./build.sh 但是却没有任何反应。于是我换了... ...
分类:
系统相关 时间:
2016-08-04 21:25:06
阅读次数:
267
安装redistar-xfredis-3.0.7.tar.gz-C/usr/local
cd/usr/local&&mvredis-3.0.7redis
cdredis
makeinstall2.编写redis优化脚本echo"vm.overcommit_memory=1">>/etc/sysctl.conf
sysctl-p
[root@游戏测试~]#cat/data/scripts/redis.sh
#!/bin/bash
ln-s/usr/local/..
分类:
其他好文 时间:
2016-08-04 19:56:37
阅读次数:
186
创建发送邮件的脚本:[root@m01~]#cd/usr/lib/zabbix/alertscripts/
[root@m01alertscripts]#catemail.sh
#!/bin/bash
email_File=/tmp/email.log
#在/tmp目录里面创建email.log文件
functionmain(){
echo"$3">$email_File
#把邮件内容传入到email.log文件里面
/usr/bin/dos..
分类:
其他好文 时间:
2016-08-04 19:50:04
阅读次数:
235
本文包含的命令:type、echo、evn、set、locale、read、declare / typeset、ulimit、alias、unalias、history、!、source、stty、cut、grep、sort、uniq、wc、tee、tr、col、join、paste、expand、 ...
分类:
系统相关 时间:
2016-08-04 10:18:50
阅读次数:
270