2014年10月31日
摘要: deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.debdpkg 是Debian Package的简写,是为Debian 专门开发的套件管理系统,方便软件的安装、更新及移除。所有源自Debian的Linux发行版都使用dpkg... 阅读全文
posted @ 2014-10-31 21:50 寒星12345678999 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 关于shell中的for循环用法很多,一直想总结一下,今天网上看到上一篇关于for循环用法的总结,感觉很全面,所以就转过来研究研究,嘿嘿...1、 for((i=1;i<=10;i++));do echo $(expr $i \* 4);done2、在shell中常用的是 for i in $(se... 阅读全文
posted @ 2014-10-31 19:03 寒星12345678999 阅读(144) 评论(0) 推荐(0) 编辑
  2014年10月29日
摘要: cut -d$'\t' -f1 file #分隔符是 \t是需要加一个$ 不然会报错 “\t”就是tab分割 “ ”是空格分割 # sed替换不需要 sed s@"\t"@\|@g 1.txtzzx@sdcm152:~$ cat /etc/passwd |cut -f1 -d:|head -3 ... 阅读全文
posted @ 2014-10-29 19:00 寒星12345678999 阅读(179) 评论(0) 推荐(0) 编辑
摘要: linux 下shell 编写脚本: 1.程序结构练习:编写一个脚本,给定一个正整数,计算出这个数所有位的数字之和。 例如:程序给定输入123,那么应该返回1+2+3=6。 2.程序结构练习:编写一个脚本,给定一个正整数,反序输出这个这个数... 阅读全文
posted @ 2014-10-29 17:15 寒星12345678999 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 两个变量相加 c=$[$a+$b] 或者 c=$(($a+$b)) echo $((a++)) $(($a+3))计算() if (($1$b"| bc` -ne 0 ] # 或-eq 1${} ${a}bzzx@zzx:~$ a=1.1zzx@zzx:~$ b=2.2zzx@zzx... 阅读全文
posted @ 2014-10-29 14:51 寒星12345678999 阅读(301) 评论(1) 推荐(0) 编辑
摘要: 把eth0和wlan0桥接在一起作用:测试wlan0网卡的并发性能 两个网卡桥接后把linux主机模拟成一个“无线路由交换机”Vi br0.sh#!/bin/bashifconfig eth0 0.0.0.0 up #取消eth0的ipifconfig wlan0 0.0.0.0 upbrctl a... 阅读全文
posted @ 2014-10-29 14:04 寒星12345678999 阅读(930) 评论(0) 推荐(0) 编辑
  2014年10月28日
摘要: Ubuntu 中sendmail 的安装、配置与发送邮件的具体实现 centos安装sendmail与使用详解 CentOS下搭建Sendmail邮件服务器 使用外部SMTP发送邮件 使用mailx发送邮件 一、安装 ubuntu中sendmail函数可以很方便的发送邮件,ubuntu sendma 阅读全文
posted @ 2014-10-28 18:15 寒星12345678999 阅读(538) 评论(0) 推荐(0) 编辑
摘要: #!/bin/basha=$1if [ $a ] #判断$1是否为空then #非空echo "the input is No:$a"exit 0else #空read -p "input a Nov:" a#a=$bficase $a in"1")echo "your input is No... 阅读全文
posted @ 2014-10-28 17:18 寒星12345678999 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 压缩后删除源文件 tar -zcvf {}.tar.gz {} --remove-files 遍历解压tar.gz文件,并删除tar.gz文件 [plain] view plaincopy find . -name "*.tar.gz" -type f -exec tar -zxvf {} \; - 阅读全文
posted @ 2014-10-28 11:24 寒星12345678999 阅读(419) 评论(6) 推荐(0) 编辑
  2014年10月27日
摘要: Ubuntu# vim ~/.vimrc # /hom/zzx 下set nomodeline "(这个一定要写,目前有这个安全漏洞)set nocpset hls isset icset autoindentset backspace=2syntax onset bg=dark... 阅读全文
posted @ 2014-10-27 20:16 寒星12345678999 阅读(669) 评论(0) 推荐(0) 编辑