git init # 初始化本地git仓库(创建新仓库)git config --global user.name "xxx" # 配置用户名git conf...
分类:
其他好文 时间:
2014-07-16 23:14:18
阅读次数:
223
git archive可以将加了tag的某个版本打包提取出来,例如: git archive -v --format=zip v0.1 > v0.1.zip --format表示打包的格式,如zip,-v表示对应的tag名,后面跟的是tag名,如v0.1。
分类:
其他好文 时间:
2014-07-16 23:10:35
阅读次数:
412
1. add a new branch cd workspace git branch user1/newbranch1 git checkout user1/newbranch1 or git checkout -b user2/newbranch2 2. when user1/newbranch...
分类:
其他好文 时间:
2014-07-16 23:09:50
阅读次数:
164
git tag is used to create labels, usually for version numbers. Format: git tag Example: git tag v0.1 HEAD is to create a version number v0.1 on curren...
分类:
其他好文 时间:
2014-07-10 14:29:01
阅读次数:
213
版本控制 版本控制是什么已不用在说了,就是记录我们对文件、目录或工程等的修改历史,方便查看更改历史,备份以便恢复以前的版本,多人协作。。。一、原始版本控制 最原始的版本控制是纯手工的版本控制:修改文件,保存文件副本。有时候偷懒省事,保存副本时命名比较随意,时间长了就不知道哪个是新的,哪个是老的了.....
分类:
其他好文 时间:
2014-07-10 14:22:39
阅读次数:
188
preface(见面礼):仅扫tcp端口:netstat -tnlp|egrep -i "$1"udp+tcpnetstat -tunlp|egrep -i "$1"(服务器端口扫描,数据保存到shell array) 1 #!/bin/bash 2 portarray=(`netstat -tn....
分类:
其他好文 时间:
2014-06-29 18:19:45
阅读次数:
253
为何写脚本每次用新的机器,都要把python的环境给安装一遍~so,这是一件很操蛋的问题,就shell练手写了一个code,嘿嘿,渣渣技术~测试环境我爱vagrant,一条命令直接还原成干净的测试环境,大爱啊~脚本如下:#!/bin/bash
#Auther:zhuima
#Date:2014-06-26
#Function:createpython..
分类:
编程语言 时间:
2014-06-28 06:37:27
阅读次数:
375
要求:批量创建10个系统账号oldboy01-oldboy10,并设置生成密码(密码不同).实现脚本:#!/bin/bash
#Question3
foriin$(seq-w10)
do
useradd-s/bin/basholdboy$i
echo"password$i"|md5sum|tee-apasswd.txt|passwd--stdinoldboy$i
done脚本执行效果:[root@localhostq4]#shq4.sh
Cha..
分类:
其他好文 时间:
2014-06-28 06:21:21
阅读次数:
340
#!/bin/bash
#
#
#thisisinstallkeepalived+lvs-DR
#
#
tar_dir=/usr/src
configure_yum()
{
echo"[rhel-local]">/etc/yum.repos.d/rhel-local.repo
echo"baseurl=file:///media/Server">>/etc/yum.repos.d/rhel-local.repo
echo"enabled=1">>/etc/yum.repos..
分类:
其他好文 时间:
2014-06-28 06:08:16
阅读次数:
373
遍历目录中所有文件,并且统计文件类型。#!/bin/bash
#filename:filestat.sh
#set-x
if[$#-ne1];
then
echo$0basepath;
echo
fi
path=$1
declare-Astatarray;
whilereadline;
do
ftype=`file-b"$line"`
letstatarray["$ftype"]++;
done<<(find$path-typef-print)
ech..
分类:
其他好文 时间:
2014-06-28 00:16:08
阅读次数:
224