简体   繁体   English

如何在整个TYPO3文件中搜索

[英]How to search in Entire TYPO3 files

I am working with lots of extensions so I have lots of problems with searching string, language specific text, other specific code etc. 我正在使用大量扩展程序,因此在搜索字符串,特定于语言的文本,其他特定代码等方面遇到很多问题。

Please let me know if there any easy way to search the string that can save my time. 请让我知道是否有任何简单的方法可以节省我的时间来搜索字符串。

While you're working with local setup you can easily search in all the files using some good editor like NOtepad++. 使用本地设置时,您可以使用一些不错的编辑器(例如NOtepad ++)轻松搜索所有文件。

But when you're working with live site via FTP or something you'll have difficulty to search it. 但是,当您通过FTP或其他方式使用实时站点时,将很难进行搜索。

For that you can use a simple script that will work fine with ubuntu server and will run just by url. 为此,您可以使用一个简单的脚本,该脚本可以在ubuntu服务器上正常运行,并且仅通过url运行。 So you can search your string from there. 因此,您可以从此处搜索字符串。 You can use it. 您可以使用它。

Follow below link to setup the script. 请点击以下链接来设置脚本。

http://typo3techie.blogspot.in/2014/05/findtypo3-find-code-statement-syntex-or.html http://typo3techie.blogspot.in/2014/05/findtypo3-find-code-statement-syntex-or.html

If you have shell access to the server I would use ACK or better " The Silver Searcher " aka ag . 如果您可以通过外壳访问服务器,则可以使用ACK或更好的“ Silver Searcher ”(又名ag

This simple example will search only *.php files for the string ">exec_SELECTquery": ag --php \\>exec_SELECTquery 这个简单的示例将仅在* .php文件中搜索字符串“> exec_SELECTquery”: ag --php \\>exec_SELECTquery

The difference between ack and ag is just speed. ackag之间的区别只是速度。 Most of the commands are the same. 大多数命令是相同的。

$ ag --stats -l --php \>exec_SELECTquery
238 matches
3208 files searched
23046323 bytes searched
0.466188 seconds

$ time ack -l --php \>exec_SELECTquery
ack -l --php \>exec_SELECTquery  2,63s user 1,06s system 45% cpu 8,046 total

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM