先查看一下ssh服务状态:# svcs或# svcs | grep sshonline
Aug_07 svc:/network/ssh:default 如需要关闭ssh服务(关闭完可以 svcs | grep ssh 查看一下状态):#
svcadm disable svc:/n...
分类:
其他好文 时间:
2014-05-08 11:30:53
阅读次数:
443
1.shell程序格式 #! /bin/bash 首行#!指定shell编译器 # program
除首行的#外,其他的都表示注释 # read var1 read var2 if[ $var1 -eq $var2 ] then echo "$var1 is
equal to $var2" elif...
分类:
其他好文 时间:
2014-05-08 10:36:56
阅读次数:
252
1、查看物理cpu个数
cat /proc/cupinfo |grep 'physical id'|sort|uniq|wc -l
2、查看一个cpu的物理核数
cat /proc/cupinfo |grep 'core id'|sort|uniq -c|wc -l
或
cat /proc/cupinfo |grep 'cpu cores'|uniq|awk -F ":" '{print...
分类:
系统相关 时间:
2014-05-08 04:07:55
阅读次数:
483
1、创建菜单//创建菜单
publicfunctioncreateMenu(){
$url="https://api.weixin.qq.com/cgi-bin/menu/create?access_token=";
$url.=$this->getacctoken();
//目前自定义菜单最多包括3个一级菜单,每个一级菜单最多包含5个二级菜单。一级菜单最多4个汉字,
//二级菜单最多7..
分类:
微信 时间:
2014-05-08 03:20:39
阅读次数:
550
linux中crontab实现以秒执行任务很多时候,我们计划任务需要精确到秒来执行,根据以下方法,可以很容易地以秒执行任务。以下方法将每10秒执行一次1.编辑crontabcrontab-e*****/bin/date>>/tmp/date.txt*****sleep10;/bin/date>>/tmp/date.txt*****sleep20;/bin/dat..
分类:
其他好文 时间:
2014-05-08 02:23:09
阅读次数:
337
Red Hat Package Manager 简称rpm
rpm格式的文件就是我们可以使用RPM命令进行管理的软件包格式的文件
JDK的安装
#sh /root/Desktop/jdk-6u23-linux-i586-rpm.bin
.bin 可以使用sh命令来解压执行
Linux的用户的登录过程
/etc/profile
/etc/profile.d(各个脚本)
/et...
分类:
编程语言 时间:
2014-05-08 02:08:50
阅读次数:
329
来源:http://poj.org/problem?id=2406
Power Strings
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 30293
Accepted: 12631
Description
Given two strin...
分类:
其他好文 时间:
2014-05-08 02:03:40
阅读次数:
337
一、安装Python2.7二、双击运行cocos2d-x-3.0根目录下的setup.py三、在命令行中进入到下面的路径下,输入cocos.py new -l
cppcocos2d-x-3.0\tools\cocos2d-console\bin四、进入上面路径下新生成的MyCppGame目录,选择相...
分类:
其他好文 时间:
2014-05-08 00:54:53
阅读次数:
436
我们在机房选择、测试网络的质量的时候,往往只根据跳数、延迟、抖动、网络吞吐量等指标来衡量,很多时候跳数并不能完全显示网络拓扑优劣,于是写了个traceroute结合whois的小脚本来直观显示每一跳所处的网络位置。
需要安装mtr和whois
脚本:
[root@localhost ~]# more geotrace.sh
#!/bin/bash
ec...
分类:
其他好文 时间:
2014-05-07 23:56:29
阅读次数:
474
很早写的,最近别人问过一次,贴出来吧。#!/bin/bash
#
source/etc/profile&>/dev/null
basedir=$(cd`dirname$0`;pwd)
nowmonth=`date+%m`
nowday=`date+%d`
email="$basedir/email/sendemail.sh"
functionGaiMiMa(){
user="$1"
passwd=$(/usr/bin/mkpasswd-l20-d5-c2-C..
分类:
其他好文 时间:
2014-05-07 22:26:08
阅读次数:
951