一:locate命令 locate命令用于查找文件,它比find命令的搜索速度快,它需要一个数据库,这个数据库由每天的例行工作(crontab)程序来建立。当我们建立好这个数据库后,就可以方便地来搜寻所需文件了。 即先运行:updatedb(无论在那个目录中均可,可以放在crontab中 )后在 / ...
分类:
系统相关 时间:
2016-12-22 10:53:58
阅读次数:
258
locate非实时,模糊查找,查找根据全系统文件数据库进行。updatedb:手动生成文件数据库优点:速度快find实时查找,精确查找。语法:find[查找路径][查找标准][处理动作]查找路径:默认为当前目录查找标准:默认为指定路径下所有文件处理动作:默认为显示选项[查找标准]:-name..
分类:
系统相关 时间:
2016-12-22 07:20:09
阅读次数:
169
#include<stack>#include<iostream>#include<queue>#include<string>#include<iomanip> using namespace std;bool visited[100]; //判断是否被访问过 bool searched[100] ...
分类:
其他好文 时间:
2016-12-21 15:59:49
阅读次数:
152
1. 用法一 LOCATE(substr,str) POSITION(substr IN str) 函数返回子串substr在字符串str中第一次出现的位置。如果子串substr在str中不存在,返回值为0。 mysql> SELECT LOCATE('bar', 'foobarbar'); -> ...
分类:
数据库 时间:
2016-12-21 02:40:38
阅读次数:
157
该错误信息是我在一个.h文件里申明了公共变量,然后在其他类里重复使用。 Build Settings ->No Common Blocks默认为YES,编译器就报错了,需要修改Build Settings里的No Common Blocks为NO。 NO Common Blocks 是什么? 官方的 ...
分类:
移动开发 时间:
2016-12-19 10:46:33
阅读次数:
210
算法:在无序的栈里面,求出这个数组排序后的任意两个相邻元素的最大差值. ...
分类:
其他好文 时间:
2016-12-18 12:19:55
阅读次数:
245
在mlocate数据库中搜索条目 locate [option] pattern 参数 pattern 是locate需要搜索的文件名或者正则表达式 选项 -i 忽略大小写 -r 使用正则表达式搜索 示例 locate Tips 1.locate 程序搜索的是已更新在mlocate.db中的内容,该 ...
分类:
其他好文 时间:
2016-12-17 02:30:42
阅读次数:
151
Q: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lon... ...
分类:
其他好文 时间:
2016-12-13 08:08:14
阅读次数:
143
文件的新增和拷贝 新增空文件的命令:touch 拷贝文件的命令:cp 文件的删除命令:rm 文件的删除 文件的删除命令:rm 文件的移动、改名和查找 文件的移动改名命令:mv 文件的查找命令:find 系统命令文件的查找命令:which 系统命令文件的快速查找命令:locate ...
分类:
系统相关 时间:
2016-12-13 07:41:31
阅读次数:
155
实用命令 ll dirname | grep jpg | wc –l //count the num of jpg file in dirname find //同locate,只不过直接从硬盘中查找数据,更慢但更准确 du –h //读取文件夹大小 tree -d //查看当前文本夹中所有文件夹的 ...
分类:
其他好文 时间:
2016-12-12 22:22:03
阅读次数:
131