其他常用命令

head head file 看头部的文件(head -n 2 test.txt) tail 实时看一些文件 tail -f file uniq 去重 sort 排序 wc–l file(计算文件行数),wc -w file(计算文件中的单词数),wc -c file(计算文件中的字符数) ifconfig 查看ip php aaa.php > c.txt 将结果生成到c.txt文件中 expr 2 "+" 3 计算2+3的结果。

对于ubuntu linux 系统安装 apt-get install xxx 安装 apt-get remove xxx 卸载 apt-cache search xxx 搜索

centos linux 是 yum -y install xxx 安装 yum remove xxx 卸载 yum search xxx 搜索

一般编译软件的方法是: cd xxx 进入目录 ./configure --prefix=路径 make 编译 make install 安装

Rsync 同步备份工具 安装 Ubuntu:apt-get install rsync Centos:yum install rsync

Curl Wget命令

SQL: 基础 select * from tab where xxxx 1:a=10 2:a in (10,11,12) 3:a <= 10 4:a=10 and b>10 5: a = 10 or a =15 6: a like '%a%'... 7:a regexp '^[h]'

PHP: A:简单的搜索 B:分词搜索

输入:我喜欢美女 = 我 喜欢 美女 我喜欢 简单的使用mysql 做词典 或者memcache 或者文本文件 将一个词语匹配出多个关键词