发布时间:2013-04-17 14:36:34
Encode:perl -p -e 's/([^\w\-\.\@])/$1 eq "\n" ? "\n":sprintf("%%%2.2x",ord($1))/eg' filenameDecode:perl -p -e 's/%(..)/pack("c", hex($1))/eg' filename必要时转一下码: perl -p -e 's/%(..)/pack("c", hex($1))/eg' filename | iconv -f utf-8 -t gb18030......【阅读全文】
发布时间:2013-01-21 14:16:16
#include "iostream"#include "unistd.h"#include "vector"using namespace std;string pathName = ""; string fileName = ""; string separator = ""; vector<int> field;int getOpt(int argc,char *argv[]){ int ch = 0; opterr = 0; while((ch = getopt(argc,argv,"p:f:s:k:h")) != -1) { .........【阅读全文】
发布时间:2013-01-15 16:26:11
1. 在~/目录下面配置 .screenrc文件,文件的内容:#se the startup messagestartup_message off term linux##use ` as the Global Key## escape ``##set a biger bufferdefscrollback 4096#设置状态栏hardstatus alwayslastline shelltitle "$|bash"caption always "%?%F%{-b 4w}%?.........【阅读全文】
发布时间:2013-01-07 16:54:20
假设现在有两台机器A,B,现在想做的事情是A登录机器B不需要密码,做法如下:1. A机器的~/.ssh/目录下面执行如下命令 【没有目录,可以新建一个】 ssh-keygen -t dsa 之后会在这个目录下面生成两个文件:id_dsa && id_dsa.pub 【如果这两个文件原来存在,可删除,但是这个时候其他人的设置可能会失效】2. 将 id_dsa.pub 文件拷到B机器的 ~/.ssh/ 目录下面,之后执行如下命令: cat id_dsa.pub >>authorized_k......【阅读全文】