原理非常easy,递归删除当前文件夹下全部的 .svn 文件。把 .svn 换成 .git 就可以用于删除 git 控制
分类:
其他好文 时间:
2014-06-18 17:41:02
阅读次数:
117
#!/bin/bash##oracle: Start/Stop Oracle Database 11g R2/12c## chkconfig: 345 90 10# description: The Oracle Database Server is an RDBMS created by Orac...
分类:
数据库 时间:
2014-06-18 12:46:02
阅读次数:
183
无意中将home下的所有文件都删除了,一些配置文件都丢了。重新登陆后,发现无法加载bashrc。查找后,发现问题不在于bashrc,而在与.bash_profile丢失login shell mode 只会读取 ~/.bash_profile , ~/.bash_login , ~/.profile...
分类:
其他好文 时间:
2014-06-17 20:29:17
阅读次数:
213
二十三. Bash Shell编程:1. 读取用户变量: read命令是用于从终端或者文件中读取输入的内建命令,read命令读取整行输入,每行末尾的换行符不被读入。在read命令后面,如果没有指定变量名,读取的数据将被自动赋值给特定的变量REPLY。下面的列表给出了read命令的常用方式:命令格式描...
分类:
系统相关 时间:
2014-06-17 14:58:55
阅读次数:
370
public static void main(String[] args) {System.out.print("红色的号码为:");Set set=new HashSet();while (true) {int i=(int)(Math.random()*33+1);set.add(i);if ...
分类:
编程语言 时间:
2014-06-17 13:35:14
阅读次数:
748
C/C++如何产生随机数:这里要用到的是rand()函数, srand()函数,C语言/C++里没有自带的random(int number)函数。(1) 假设你仅仅要产生随机数而不须要设定范围的话,你仅仅要用rand()就能够了:rand()会返回一随机数值, 范围在0至RAND_MAX 间。RA...
分类:
编程语言 时间:
2014-06-17 13:19:47
阅读次数:
288
经常需要根据IP地址统计apache站点访问量,最基本的脚本.根据IP访问量降序排列:#!/bin/bash
#Script_name:access_count
acc_log=/usr/local/apache2/logs/access_log
/bin/awk‘{print$1}‘$acc_log|sort|uniq-c|sort-nr执行效果:[root@zabbix~]#shaccess_count
94989192.168.1..
分类:
移动开发 时间:
2014-06-16 18:18:50
阅读次数:
332
RHEL5.3安装光盘主要文件内容:ClusterClusterStoragep_w_picpathsisolinuxServerVTshowmount-e10.1.1.20显示指定的主机可供挂载的目录将U盘作为引导盘ddif=diskboot.imgof=/dev/sdbCTRL+SHIFT+T增加终端标签常用的shellcat/etc/shells/bin/sh/bin/bash/sbin/nologin/bin/tc..
分类:
其他好文 时间:
2014-06-16 17:21:21
阅读次数:
400
大纲1、TheBashShell2、OutputinColor3、Howcandoit?1、TheBashShellBashistheprimaryshelloftheLinuxmachine,includedherearesometips/trickswiththeshell.UsethemanualpageandlearnaboutPS1,PS2andPROMPT_COMMAND.Thetricksinherecanbeusein~/.bash_profileor~/.bashrc.2、Ou..
分类:
系统相关 时间:
2014-06-16 16:53:26
阅读次数:
407
linux:禁pingvim/proc/sys/net/ipv4/icmp_echo_ignore_all0代表允许1代表禁止ping.sh#!/bin/bash
foriin{2..5};
do
host=122.152.172.$i
ping-c2$host>/dev/null
if[$?=0]
then
echo"122.152.172.$iisconnected"
else
echo"122.152.172.$iisnotconnected"
fi
done显示结果..
分类:
其他好文 时间:
2014-06-16 15:37:33
阅读次数:
235