svn cp $from $to
其中: $from $to 都可以是url或本地路径, 如果 $to 是本地路径,则还需一次 commit, 如果 $to 是url 则是直接提交
DevOps
svn cp $from $to
其中: $from $to 都可以是url或本地路径, 如果 $to 是本地路径,则还需一次 commit, 如果 $to 是url 则是直接提交
http://svnbook.red-bean.com/en/1.7/
Your Subversion repository is like a time machine. It keeps a record of every change ever committed and allows you to explore this history by examining previous versions of files and directories as well as the metadata that accompanies them. With a single Subversion command, you can check out the repository (or restore an existing working copy) exactly as it was at any date or revision number in the past. However, sometimes you just want to peer into the past instead of going into it.
Several commands can provide you with historical data from the repository:
SVN是以版本号(revision number)来记录版本库的每一次改变,一般的SVN操作不需要用到版本号,但是有些SVN操作需要指定版本号。我们可以指定一个明确的整数版本号,但是也可以使用SVN关键字来指代某个特殊的版本号,SVN会真正计算出它所指代的实际整数版本号:
HEAD:版本库中最新的版本;
BASE:某个工作副本项的版本,注意这个是你上次update该项时的版本号,可能晚于当前最新的版本号;
COMMITTED:某个工作副本项最近修改的版本,与BASE相同或更早;
PREV:COMMITTED – 1。
HEAD针对于版本库,另外3个针对于某个工作副本目录或文件。
示例:
$ svn diff -r PREV:COMMITTED foo.c
# shows the last change committed to foo.c
$ svn log -r HEAD
# shows log message for the latest repository commit
$ svn diff -r HEAD
# compares your working copy (with all of its local changes) to the latest version of that tree in the repository
$ svn diff -r BASE:HEAD foo.c
# compares the unmodified version of foo.c with the latest version of foo.c in the repository
$ svn log -r BASE:HEAD
# shows all commit logs for the current versioned directory since you last updated
$ svn update -r PREV foo.c
# rewinds the last change on foo.c, decreasing foo.c’s working revision
$ svn diff -r BASE:14 foo.c
# compares the unmodified version of foo.c with the way foo.c looked in revision 14
原文链接: http://www.cnblogs.com/frydsh/archive/2012/08/25/2655569.html
1 2 |
cd /path/to/trunk svn merge --reintegrate ^/branch_xxx |
1 2 |
cd /path/to/branch svn merge ^/trunk |
1 |
apt-get install package-name |
查看包描述信息
1 |
apt show package-name |
1 |
dpkg -L package-name |
1 |
dpkg -S /path/to/file |
1 |
apt list patten-of-package-name #(只匹配报名) |
1 |
apt search patten-to-search (搜索包描述信息) |
1 |
apt-get remove package-name |
1 |
echo "foo hold"|sudo dpkg --set-selections |
(禁止 foo 更新)
当存在 http_proxy 时, 如下命令会有问题:
1 |
docker ps |
原因:
docker 和 docker -d 之间的通信走的是http协议,而且会默认参考 http_proxy 环境变量(go程序默认如此)
解决办法:
1 |
unset http_proxy |
1 |
export no_proxy=$no_proxy,/var/run/docker.sock |
参考:https://github.com/tmatilai/vagrant-proxyconf/issues/109
如下命令可以看到我们预期的输出:
1 |
while :; do echo abcd; sleep 1; done|grep abcd |
如下命令不能看到预期的输出: (不是立即看到,其实,只要等等她就会来)
1 |
while :; do echo abcd; sleep 1; done|grep abcd|grep abcd |
原因: 第一个grep命令buffer了输出
解决办法: 添加 –line-buffered 选项
同样, awk 也有类似问题,但是使用awk就没有添加选项这么幸运了;可以通过在awk的输出后面添加 system(“”); 来刷新buffer,如:
1 |
# while :; do echo abcd; sleep 1; done|awk '{print $0;system("");}'|awk '{print $0;}' |