ITeye博客

2013 年文章归档

共 8 篇文章

svn resolved

svn st | grep ! | cut -c 9- | while read line;do svn resolved $line;done

2013-06-12 16:21 · svn

xargs

svn一次添加太多文件,网络不是很稳定,提交总是超时,所以每次提交40个文件。 svn st | grep -v ? | head -n 40 | cut -c 9- | xargs svn commit -m 'xx'

2013-06-12 15:20 · svn

Shell遍历文件夹删除匹配文件

#!/bin/sh list_alldir(){ for file2 in `ls -a $1` do if [ x"$file2" != x"." -a x"$file2" != x".." ];then if [ -d "$1/$file2" ] && (echo $file2 | grep -qv '.svn');then list_alldir "$1/$file2" elif (echo $1/$file2 | egrep -q '(de|el|fr|it)\.yml$');then echo "$1/$file2" rm $1/$file2 fi fi done } list_a…

2013-06-11 17:28 · Shell

photo move

#!/bin/bash COLOR_PHOTO_PATH="/var/www/rails/webapp/public/data/images/colors/" CHIP_COLOR_PATH="/mnt/chip/colors" cd $COLOR_PHOTO_PATH ls | grep -E 'front|back' | while read line;do cp $line $CHIP_COLOR_PATH done cd "/mnt/chip/" tar czvfP color_photo.tar.gz $COLOR_PHOTO_PATH

2013-06-11 17:25 · Shell

Ruby 搭建环境

http://kidlet.sinaapp.com/blog/archives/185.html http://kidlet.sinaapp.com/blog/archives/205.html 因为想装RVM 所以要对上述程序进行删除,其中 Ruby 和 RubyGem 均是采用从官方下载源代码进行编译安装的 结果发现 官方提供的 Makefile 文件并没有提供 uninstall功能, 而当初我在configure的时候也并没有指定 prefix参数 所以都是采用默认路径安装的。 首先我们先卸载 通过 Gem 安装的东西。 通过 gem list 可以看到安装了哪些, 其中当然包括了r…

2013-06-01 11:17 · ruby

启LINUX防火墙后,FTP PASV不能正常登录问题

转载:http://www.cnblogs.com/redhatlinux/archive/2012/04/03/2431453.html linux服务器开启防火墙,常规设置在防火墙配置文件中添加21端口, FTP服务器通过port能够访问,pasv不能访问。而客户端一般是采用pasv方式连接。解决方法如下: 首先要了解概念; FTP支持两种模式,一种方式叫做Standard (也就是 PORT方式,主动方式),一种是 Passive (也就是PASV,被动方式)。 Standard模式 FTP的客户端发送 PORT 命令到FTP服务器。Passive模式FTP的客户端发送 PASV命令到…

2013-05-31 15:23 · linux

CentOS 5.5下FTP安装及配置(转载)

转载自http://www.blogjava.net/Alpha/archive/2012/02/02/369246.html CentOS 5.5下FTP安装及配置 一、FTP的安装 1、检测是否安装了FTP : [root@localhost ~]# rpm -q vsftpd vsftpd-2.0.5-16.el5_5.1 否则显示:[root@localhost ~]# package vsftpd is not installed 查看ftp运行状态 service vsftpd status 2、如果没安装FTP,运行yum install vsftpd命令进行安装 如果无法下载…

2013-05-22 11:32 · linux

工作记录(待续)

1,增加一个Sql远程登录用户 SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user; GRANT select ON endysis.* TO eshop@localhost IDENTIFIED BY 'abc'; GRANT select ON endysis.* TO eshop@"%" IDENTIFIED BY 'abc'; 2,rails_sql_views https://github.com/activewarehouse/rails_sql_views cre…

2013-03-14 17:00 · mysql · Rails