上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页
摘要: 今天整理东西。需要删掉小于5M的文件。一个find就可以了find . -type f -size -5M -exec rm -f {} \;然后需要删掉所有的空目录。没想到简单的命令,于是组合一下命令#!/bin/bash#filename:rm_empty_dir.shfor i in `find . -type d`do if [ `ls $i | wc -l` = 0 ] then rm -rf $i fidone用while#!/bin/bash#filename:rm_empty_dir_2.shfind . -type d | while r... 阅读全文
posted @ 2012-07-08 00:29 Leo Forest 阅读(1756) 评论(0) 推荐(0) 编辑
摘要: Arch默认是安装有openssh,没有的安装之,然后修改/etc/ssh/sshd.conf把这几个的注释去掉#Port 22#AddressFamily any#PermitRootLogin yes然后$ sudo /etc/rc.d/sshd start如果要在外网用的话,给路由器设置转发规则,把对本机外网ip的22端口请求转发到本机 阅读全文
posted @ 2012-07-06 23:08 Leo Forest 阅读(356) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>class A{ private: char data; public: A(){data = 'A';}; virtual void Show() { std::cout << data << std::endl; }; virtual void Display() { std::cout << 'A' << std::endl; }};class B{ private: ... 阅读全文
posted @ 2012-07-06 16:14 Leo Forest 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 在本机生成公钥:# ssh-keygen -t rsa -C "someone@host.com"提示:enter file in which to save the key(/root/.ssh/id_rsa):直接回车就可以,然后是输密码。接下复制 /root/.ssh/id_rsa.pub的内容,添加到github。 阅读全文
posted @ 2012-07-06 12:10 Leo Forest 阅读(159) 评论(0) 推荐(0) 编辑
摘要: yum里没有git,所以只好编译安装,在网上发现一个下载git的好地址:http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz最新版本的git 。。#wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz#tar -zxvf git-latest.tar.gz#cd git......#./configure#make#make install.....为解压出来的目录 阅读全文
posted @ 2012-07-06 11:33 Leo Forest 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 把所有的.cc文件改成.cpp文件find . -name "*.cc" | while read file; do mv $file `echo $file |sed 's/\.cc$/\.cpp/'`; done感觉有点二了,找到更好的办法在补充。。。 阅读全文
posted @ 2012-07-05 22:20 Leo Forest 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.cppblog.com/luke/archive/2009/03/13/76411.html今日粗看boost的代码,发现很多类都继承noncopyable,以下是noncopyable的代码:class noncopyable { protected: noncopyable() {} ~noncopyable() {} private: // emphasize the following members are private noncopyable( const noncopyable& ); const noncopyable& opera 阅读全文
posted @ 2012-07-05 18:01 Leo Forest 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 找不到库。vi/etc/ld.so.conf加上/usr/local/lib64位的同时加上/usr/local/lib64然后ldconfig 阅读全文
posted @ 2012-07-03 11:00 Leo Forest 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 详解看原文:http://xingxing5421.blog.163.com/blog/static/1194463192012317105319559/在64位系统中,/usr/lib/mysql/下的相关库文件无法标识,需要将/usr/lib64/mysql 下的库来做个软链接# ln -sf /usr/lib64/mysql/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so# ln -sf /usr/lib64/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient.a 阅读全文
posted @ 2012-07-03 10:59 Leo Forest 阅读(1624) 评论(0) 推荐(0) 编辑
摘要: $ sudo pacman -S postgresql$ sudo /etc/rc.d/postgresql start$ groups postgressu rootsu - postgres详细解释看:https://wiki.archlinux.org/index.php/PostgreSQL_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29给postgresql射密码$ su root# passwd postgres开始使用# su postgres建立数据库createdb test;进入数据库psql test;建一个叫cats的表:test. 阅读全文
posted @ 2012-07-02 23:25 Leo Forest 阅读(665) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 29 下一页