推荐
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页

2013年1月16日

MYSQL使用mysqldump导出某个表的部分数据

摘要: mysqldump -uroot -pMfuxsNH -h10.13.2.137 --where=" 1 limit 5000" finance zdy_znzd>zdy_znzd.sql参考:http://blog.csdn.net/jibing57/article/details/7924476 阅读全文

posted @ 2013-01-16 16:05 高华 阅读(291) 评论(0) 推荐(0) 编辑

2012年12月26日

优化页面上的sql

摘要: mysql_query('set profiling=1'); $query = mysql_query('show profiles'); while($row = mysql_fetch_assoc($query)){ var_dump($row); } 阅读全文

posted @ 2012-12-26 15:05 高华 阅读(119) 评论(0) 推荐(0) 编辑

2012年12月21日

打通两台机器

摘要: 1.route add -net 10.13.2.0 netmask 255.255.255.0 eth0可以ping通了,telnet不通2.查资料说是可能是防火墙设置的问题sudo /sbin/iptables -I INPUT 7 -s 10.13.0.0/16 -j ACCEPT 933 sudo /sbin/iptables-save 934 sudo /sbin/iptables -L --line-numbers 阅读全文

posted @ 2012-12-21 15:21 高华 阅读(142) 评论(0) 推荐(0) 编辑

2012年12月20日

一个段错误调试

摘要: ulimit -a 409 ulimit -c unlimited 410 pwd 411 ./qspider_daemon /home/publish/projects/gsps/conf/qspider.cfg finance 412 ls -lrth 413 gdb qspider_daemon core.28856 发现是因为写入的那个文件太大 阅读全文

posted @ 2012-12-20 10:16 高华 阅读(122) 评论(0) 推荐(0) 编辑

2012年11月28日

查看linux的用户

摘要: cat /etc/passwd |cut -f 1 -d : 阅读全文

posted @ 2012-11-28 15:33 高华 阅读(138) 评论(0) 推荐(0) 编辑

2012年11月26日

linux批量备份文件时候,想保持相对路径

摘要: 找到的sql文件保存在了~/Documents下find . -name '*.sql'|(xargs tar -cpf - | ( cd ~/Documents/; tar -xpf - )) 阅读全文

posted @ 2012-11-26 17:13 高华 阅读(216) 评论(0) 推荐(0) 编辑

用户组相关

摘要: 一。查看某个用户的用户组:groups gaohua二。修改用户的用户组:usermod -g group loginname 强行设置某个用户所在组usermod -G groups loginname把某个用户改为 group(s) usermod -a -G groups loginname把用户添加进入某个组(s) 阅读全文

posted @ 2012-11-26 13:25 高华 阅读(114) 评论(0) 推荐(0) 编辑

2012年11月21日

删除mysql sleep的连接

摘要: #!/bin/sh#while :#do n=`/data/mysql/bin/mysqladmin -uroot -hmaster_db_72 -ppassword -P3306 processlist | grep -i sleep | awk '$12>300 {print $2}' | wc -l` date=`date +%Y%m%d\[%H:%M:%S]` if [ "$n" -gt 10 ] then for i in `/data/mysql/bin/mysqladmin -uroot -hmaster_db_72 -ppassword 阅读全文

posted @ 2012-11-21 14:23 高华 阅读(1020) 评论(0) 推荐(0) 编辑

2012年11月15日

查询数据库空间

摘要: select concat(truncate(sum(data_length)/1024/1024,2),'MB') as data_size, concat(truncate(sum(max_data_length)/1024/1024,2),'MB') as max_data_size, concat(truncate(sum(data_free)/1024/1024,2),'MB') as data_free, concat(truncate(sum(index_length)/1024/1024,2),'MB') as i 阅读全文

posted @ 2012-11-15 21:44 高华 阅读(136) 评论(0) 推荐(0) 编辑

2012年11月14日

shell 批量替换多个文件中字符串

摘要: 用sed命令可以批量替换多个文件中的字符串。sed -i "s/原字符串/新字符串/g" `grep 原字符串 -rl 所在目录`例如:我要把mahuinan替换为huinanma,执行命令:sed -i "s/mahuinan/huinanma/g" 'grep mahuinan -rl /www'这是目前linux最简单的批量替换字符串命令了!具体格式如下:sed -i "s/oldString/newString/g" `grep oldString -rl /path`实例代码:sed -i "s/大 阅读全文

posted @ 2012-11-14 16:39 高华 阅读(5631) 评论(0) 推荐(1) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页

导航