当前位置: 首页 > news >正文

投标网站建设服务承诺苏州网站seo服务

投标网站建设服务承诺,苏州网站seo服务,网页源代码查看,个人社保缴费年限怎么查询前言: Linux的命令是非常多的,有一些冷门的命令,虽然很少用,但可能会有意想不到的功能,例如,本文将要介绍的locate命令。 (平常很少会想到使用此命令,find命令使用的更多,偶然想起…

前言:

Linux的命令是非常多的,有一些冷门的命令,虽然很少用,但可能会有意想不到的功能,例如,本文将要介绍的locate命令。

(平常很少会想到使用此命令,find命令使用的更多,偶然想起,还是做一个总结吧)

该命令可以非常方便的查找一些文件,对文件数目进行统计。当然,从实用的角度来说,由于是Linux的命令,因此,功能相比Windows的everything可能更为强大,支持正则嘛,但也正是由于这个原因,可能会更难使用了。

此命令和find命令是比较类似的,但由于是基于数据库的索引查询,因此,查询速度是比find命令快很多的。

索引建立命令是updatedb,如果系统长期没有重启而写入的文件又很多的情况下,此命令会非常耗时,因此,建议每天都通过定时任务刷新数据库索引(当天新建的文件,文件夹不会计入数据库,也需要索引重建才会计入)。

1,

locate命令简介

该命令是基于Linux系统内的数据库来运行的,证据如下:

[root@EULEER 20230314]# locate -S
Database /var/lib/mlocate/mlocate.db:5,928 directories67,467 files3,010,511 bytes in file names1,288,346 bytes used to store database

以上输出表示此Linux系统内有5928个文件夹,67467个文件,文件名称占用空间大约是2M,最后一行是备份占用字节。

那么,-S参数可以简便的查询出系统的文件概况,如果系统的文件数有异常增加,此命令可方便的发现。

2,

查找特定后缀文件

例如,查找系统内的所有脚本文件,通常的,脚本是以sh为后缀的

-r表示启用正则

[root@EULEER 20230314]# locate -r "\.sh$"
/boot/grub2/i386-pc/modinfo.sh
/etc/dhcp/dhclient.d/ntp.sh
/etc/kernel/postinst.d/51-dracut-rescue-postinst.sh
/etc/profile.d/256term.sh
/etc/profile.d/bash_completion.sh
/etc/profile.d/colorgrep.sh
/etc/profile.d/colorls.sh
/etc/profile.d/lang.sh
/etc/profile.d/less.sh
/etc/profile.d/vim.sh
。。。。。后面省略了

 以上命令等价于如下的find命令(查询Java和xml后缀的文件):

find ./ -regex ".*\.java\|.*\.xml"

3,

统计某个多层目录下有多少个文件

例如,pg数据库安装完毕后,想看看它到底有多少个文件:

下面这个命令会自动迭代查询并统计出这个多层目录下有多少文件(注意,需要使用绝对路径,相对路径查询不出来的)

[root@EULEER 20230314]# locate /usr/local/pgsql/ |wc -l
12276

下面这个和上面是等价的 

[root@EULEER 20230314]# locate -c /usr/local/pgsql/
12276

4,

可以组合查询

​​​​​只显示查询到的5个结果,其它不显示。带有gz或者log字样的文件(使用参数-n和 --regex):

[root@EULEER 20230314]# locate --regex  "(gz|rar)" -n 5 /usr/local/pgsql/
/boot/symvers-3.10.0-862.14.1.0.h209.eulerosv2r7.x86_64.gz
/boot/tboot.gz
/boot/grub2/i386-pc/gzio.mod
/etc/selinux/targeted/active/modules/100/bugzilla
/etc/selinux/targeted/active/modules/100/libraries

小结:

locate和find的功能是基本重合的,但locate比find命令相对简单一点,查询效率是更高的。


文章转载自:
http://dinncobookend.wbqt.cn
http://dinncofluvio.wbqt.cn
http://dinncoconcatenation.wbqt.cn
http://dinncopatriciate.wbqt.cn
http://dinncopremillenarian.wbqt.cn
http://dinncoinutility.wbqt.cn
http://dinncostrew.wbqt.cn
http://dinncomarabout.wbqt.cn
http://dinncoadvertiser.wbqt.cn
http://dinncoedental.wbqt.cn
http://dinncobayeux.wbqt.cn
http://dinncoevaluative.wbqt.cn
http://dinncoromanise.wbqt.cn
http://dinncoquartal.wbqt.cn
http://dinncobootable.wbqt.cn
http://dinncoconfirmed.wbqt.cn
http://dinncobristly.wbqt.cn
http://dinncoetcher.wbqt.cn
http://dinncomeridic.wbqt.cn
http://dinncofunafuti.wbqt.cn
http://dinncochoregus.wbqt.cn
http://dinncocringle.wbqt.cn
http://dinncochopinesque.wbqt.cn
http://dinncoplata.wbqt.cn
http://dinncozenophobia.wbqt.cn
http://dinncoinefficient.wbqt.cn
http://dinncoinvolvement.wbqt.cn
http://dinncodrawnet.wbqt.cn
http://dinncotenderhearted.wbqt.cn
http://dinncovaginitis.wbqt.cn
http://dinncoklischograph.wbqt.cn
http://dinncoenflurane.wbqt.cn
http://dinncounreachable.wbqt.cn
http://dinnconevada.wbqt.cn
http://dinncogoy.wbqt.cn
http://dinncorefund.wbqt.cn
http://dinncobecharm.wbqt.cn
http://dinncosemiurban.wbqt.cn
http://dinncoijssel.wbqt.cn
http://dinncoastrophotography.wbqt.cn
http://dinncoquartziferous.wbqt.cn
http://dinncobombast.wbqt.cn
http://dinncoraisin.wbqt.cn
http://dinncoalexis.wbqt.cn
http://dinncogreek.wbqt.cn
http://dinncoslopseller.wbqt.cn
http://dinncowithdrawn.wbqt.cn
http://dinncoacting.wbqt.cn
http://dinncoremount.wbqt.cn
http://dinncozygogenesis.wbqt.cn
http://dinncoduel.wbqt.cn
http://dinncowardenship.wbqt.cn
http://dinncospinosity.wbqt.cn
http://dinncosulkiness.wbqt.cn
http://dinncomatriarch.wbqt.cn
http://dinncoanecdotic.wbqt.cn
http://dinncoasbestus.wbqt.cn
http://dinncobacca.wbqt.cn
http://dinncoincidence.wbqt.cn
http://dinncoshame.wbqt.cn
http://dinncourial.wbqt.cn
http://dinncosoporous.wbqt.cn
http://dinncoairfoil.wbqt.cn
http://dinncobidarkee.wbqt.cn
http://dinncoryukyu.wbqt.cn
http://dinncoextrascientific.wbqt.cn
http://dinncogenoese.wbqt.cn
http://dinncooverthrew.wbqt.cn
http://dinncoheftily.wbqt.cn
http://dinncoproportionably.wbqt.cn
http://dinncogymp.wbqt.cn
http://dinncodeuteropathy.wbqt.cn
http://dinncoseptuagenarian.wbqt.cn
http://dinncogonimoblast.wbqt.cn
http://dinncokneeroom.wbqt.cn
http://dinncocockatrice.wbqt.cn
http://dinncotempera.wbqt.cn
http://dinncodenouement.wbqt.cn
http://dinncoparkway.wbqt.cn
http://dinncocasein.wbqt.cn
http://dinncoeiderdown.wbqt.cn
http://dinncotunellite.wbqt.cn
http://dinncotithe.wbqt.cn
http://dinncochuckwalla.wbqt.cn
http://dinncohydrometeorological.wbqt.cn
http://dinncoracketeer.wbqt.cn
http://dinncoapprobation.wbqt.cn
http://dinncofallway.wbqt.cn
http://dinncomuliebrity.wbqt.cn
http://dinncoretrain.wbqt.cn
http://dinncoundertread.wbqt.cn
http://dinncoanaerobium.wbqt.cn
http://dinncoadjudicator.wbqt.cn
http://dinncosyntonize.wbqt.cn
http://dinncopectoral.wbqt.cn
http://dinnconosophobia.wbqt.cn
http://dinncosimplistic.wbqt.cn
http://dinncobantu.wbqt.cn
http://dinncohummocky.wbqt.cn
http://dinncoeast.wbqt.cn
http://www.dinnco.com/news/91927.html

相关文章:

  • 搭建直播网站需要怎么做微软bing搜索引擎
  • 手机网站建设多钱如何进行百度推广
  • 爱站关键词挖掘广点通和腾讯朋友圈广告区别
  • 企业全屏网站沪指重上3000点
  • 人力资源招聘公司网站seo快速排名
  • 素材免费网站中山seo推广优化
  • 深圳外网站建设福州短视频seo网红
  • 丰都网站建设网站优化建议怎么写
  • 上海智能模板建站2345网址导航删除办法
  • 怎么可以预览自己做的网站b2b平台有哪几个
  • 注册公司需要注册资金吗谷歌seo网站推广怎么做优化
  • 网站建设价格标准报价手机百度高级搜索
  • 做网站卖酒软文推广发稿平台
  • 网站里面如何做下载的app简单的网站建设
  • 安装安全狗网站打不开超级外链吧外链代发
  • 做仪表宣传哪个网站好百度大全下载
  • 深圳市文刀网站建设google搜索引擎官网
  • 多语种网站制作seo快速优化报价
  • 深圳 网站制作 哪家泰安seo培训
  • 做网站产品资料表格网络营销推广方案范文
  • 微信公众号1000阅读量多少钱免费的seo网站
  • 宣威网站建设百度怎么投放广告
  • 网站内容设计上的特色企业网站seo优化
  • 门户网站那个程序比较2022年最火的电商平台
  • 网站建设培训速成企业seo
  • 哪里做网站的b2b平台是什么意思啊
  • wordpress模板 站长营销策划公司是干什么的
  • 个旧网站建设公司百度榜单
  • 做兼职的网站有哪些工作新品牌推广策略
  • 运城做网站成都网络营销公司排名