1.MAC安装Ruby环境 1> 安装RVM 控制台命令:$curl –L https://get.rvm.io | bash –s stable$source ~/.rvm/scripts/rvm$rvm –v (查看版本,检查是否安装正确)2> 用rvm安装ruby环境$rvm install ...
分类:
其他好文 时间:
2014-08-27 18:23:48
阅读次数:
217
在使用Linux的时候,最常见的终端解释器就是bash了。bash下有很多技巧,我知道这么几个:0.关于按键模式bash默认的按键模式是emacs风格的。你也可以通过set -i vi设定为vi风格。我用默认的emacs风格的,后面的快捷键基本能上都是...
分类:
其他好文 时间:
2014-08-27 02:43:27
阅读次数:
212
Linux中添加用户、删除用户时新手可能遇到的问题
1.创建新用户后切换到新用户:No directory, logging in with HOME=/
添加用户
#sudo useradd -m -s /bin/bash -g group loginname
-m 创建home目录 (不加这个要手动添加目录,不然会出现No directory,Logging...
分类:
系统相关 时间:
2014-08-26 23:03:06
阅读次数:
759
#!/bin/bash#encodebegin##endcodeend#compile=true#Author:birdman#CreateDate:2013-04-28#AlterDate:2013-04-28#Description:#Usage:functionBirdman_Init(){source/etc/profile>>/dev/null2>&1ScriptName=`basename$0`exportpid="${pid}-->$ScriptName"LogF..
分类:
其他好文 时间:
2014-08-26 19:51:38
阅读次数:
325
#!/bin/bash#encodebegin##endcodeend#compile=false#Author:birdman#CreateDate:2013-04-28#AlterDate:2013-05-02#Description:用于加密shell编译#Usage:shcompile.shfunctionBirdman_Init(){source/etc/profile>>/dev/null2>&1ScriptName=`basename$0`exportpid..
分类:
其他好文 时间:
2014-08-26 19:51:17
阅读次数:
210
getopt命令并不是bash的内建命令,它是由util-linux包提供的外部命令。相比较bash的内置命令,getopt不只支持短参-s,还支持--longopt的长参数,甚至支持-longopt的简化参数。getopt可以用于tcsh其它的shell。现在就以系统自带的帮助文件,说说getopt在bash下的使用技巧。#!/bi..
分类:
其他好文 时间:
2014-08-26 19:50:37
阅读次数:
287
publicstaticvoidport_check(stringip){booltcpListen=false;booludpListen=false;//设定端口状态标识位stringip_str=ip;System.Net.IPAddressmyIpAddress=IPAddress.Parse(ip_str);System.Net.IPEndPointmyIpEndPoint=newIPEndPoint(myIpAddress,80);try{System.Net.Sockets.T..
分类:
其他好文 时间:
2014-08-26 17:36:16
阅读次数:
595
修改位置:/u02/weblogic/wlserver_10.3/server/lib/consoleapp/META-INF/application.xml: gscf文件内容-bash-3.2$ more /u02/weblogic/wlserver_10.3/server/lib/cons.....
分类:
Web程序 时间:
2014-08-26 16:59:46
阅读次数:
674
ubuntu下/bin/sh的指向ubuntu 下 /bin/sh 默认是dash,用ll /bin/sh就能够看出来sh是指向dash的链接,有时候会导致使用bash脚本的时候出问题。假设遇到这个问题了,就要把sh指向bash。用以下的命令把dash改动为bash用sudo dpkg-reconf...
分类:
其他好文 时间:
2014-08-26 15:12:46
阅读次数:
224
一、设置定时任务 crontab 新增:crontab -e二、日志查看 tail -200f logs/catalina.out三、mysql备份shell #!/bin/bash# Shell script to backup MySql database# Author: Henry h...
分类:
系统相关 时间:
2014-08-26 11:27:55
阅读次数:
292