标题: [文件操作] Everything 快速搜索定位文件(es支持命令行) [打印本页]
作者: 依山居 时间: 2015-10-22 17:18 标题: Everything 快速搜索定位文件(es支持命令行)
本帖最后由 依山居 于 2016-9-9 22:21 编辑
善用佳软介绍:
Everything(官网|中文主页|教程)是速度最快的文件名搜索软件。其速度之快令人震惊,百G硬盘几十万个文件,可以在几秒钟之内完成索引;文件名搜索瞬间呈现结果。它小巧免费,支持中文,支持正则表达式,可以通过HTTP或FTP分享搜索结果。
本站也有转载过相关文章 [转载]Everything:速度最快的文件搜索工具
http://www.bathome.net/viewthrea ... p;extra=&page=1
命令行 接口es.exe 第三方工具已经有收录 http://www.bathome.net/s/tool/index.html
c:\>es -h
-r Search the database using a basic POSIX regular expression.
-i Does a case sensitive search.
-w Does a whole word search.
-p Does a full path search.
-h --help Display this help.
-n <num> Limit the amount of results shown to <num>.
-s Sort by full path.
Everything.exe [filename] [options]
filename Open the specified file list.
-? Show this help.
-admin Run Everything as Administrator.
-admin-server-share-links Use \\Server\C$ links for ETP connections.
-app-data Store data in application data.
-bookmark <name> Open a bookmark.
-case Enable case matching.
-choose-language Show the language selection page.
-choose-volumes Do not automatically index volumes.
-config <filename> The filename of the ini file.
-connect <user:pass@host:port> Connect to an ETP server.
-console Show the debugging console.
-create-filelist <filename> <path> Create a file list of a path.
-db <filename> The filename of the database.
-debug Show the debugging console.
-diacritics Enable diacritics matching.
-disable-run-as-admin Disable run as administrator.
-disable-update-notification Disable update notification on startup.
-drive-links Use C: links for ETP connections.
-edit <filename> Open a file list with the file list editor.
-enable-run-as-admin Enable run as administrator.
-enable-update-notification Enable update notification on startup.
-exit Exit "Everything".
-filelist <filename> Open a file list.
-filename <filename> Search for a file or folder by filename.
-filter <name> Select a search filter.
-ftp-links Use ftp://host/C: links for ETP connections.
-fullscreen Show the search window fullscreen.
-h Show this help.
-help Show this help.
-install <location> Install Everything to a new location.
-install-client-service Install the "Everything" client as a service.
-install-config <filename> Install the specified ini file.
-install-desktop-shortcut Install desktop shortcut.
-install-efu-association Install EFU file association.
-install-folder-context-menu Install folder context menus.
-install-quick-launch-shortcut Install Quick Launch shortcut.
-install-run-on-system-startup Install "Everything" from the system startup.
-install-service Install and start the "Everything" service.
-install-service-port <port> Install the Everything service on the specified port.
-install-start-menu-shortcuts Install "Everything" shortcuts from the Start menu.
-install-url-protocol Install URL Protocol.
-instance <name> The name of the Everything instance.
-load-delay <milliseconds> The delay in milliseconds before loading the database.
-l Load the local database.
-language <langID> Set the language to the specified language ID.
-local Load the local database.
-matchpath Enable full path matching.
-maximized Maximize the search window.
-minimized Minimize the search window.
-newwindow Create a new search window.
-noapp-data Store data in executable location.
-nocase Disable case matching.
-nodb Do not save to or load from the "Everything" database file.
-nodiacritics Disable diacritics matching.
-nofullscreen Show the search window in a window.
-nomatchpath Disable full path matching.
-nomaximized Unmaximize the search window.
-nominimized Unminimize the search window.
-nonewwindow Show an existing search window.
-noontop Disable always ontop.
-noregex Disable Regex.
-noverbose Display only basic debug messages.
-nowholeword Disable match whole word.
-noww Disable match whole word.
-ontop Enable always ontop.
-p <path> Search for a path.
-parentpath <path> Search for the parent of a path.
-path <path> Search for a path.
-quit Exit "Everything".
-read-only Loads the database in read-only mode.
-regex Enable Regex.
-reindex Force database rebuild.
-s <text> Set the search.
-search <text> Set the search.
-server-share-links Use \\Server\C: links for ETP connections.
-service-port <port> Connect to the Everything service on the specified port.
-sort <name> Set the sort to the specified name.
-sort-ascending Sort ascending.
-sort-descending Sort descending.
-start-client-service Start the Everything client service.
-start-service Start the Everything service.
-startup Run Everything in the background.
-stop-client-service Stop the Everything client service.
-stop-service Stop the Everything service.
-svc Run Everything as a service.
-svc-port <port> Run the Everything service on the specified port.
-uninstall [path] Uninstall Everything from the specified path.
-uninstall-client-service Uninstall the "Everything" client service.
-uninstall-desktop-shortcut Uninstall desktop shortcut.
-uninstall-efu-association Uninstall EFU file association.
-uninstall-folder-context-menu Uninstall folder context menus.
-uninstall-quick-launch-shortcut Uninstall Quick Launch shortcut.
-uninstall-run-on-system-startup Remove "Everything" from the system startup.
-uninstall-service Uninstall the "Everything" service.
-uninstall-start-menu-shortcuts Uninstall "Everything" shortcuts from the Start menu.
-uninstall-url-protocol Uninstall URL Protocol.
-uninstall-user Uninstall user files.
-update Save the database to disk.
-url <[es:]search> Set the search from an ES: URL.
-verbose Display all debug messages.
-wholeword Enable match whole word.
-ww Enable match whole word.
搜索语法:复制代码
作者: 依山居 时间: 2015-10-22 17:32
举例搜索出电脑中有sed.exe的目录:- c:\>es -i "sed.exe"
- C:\cygwin64\bin\sed.exe
- C:\cygwinx86\bin\sed.exe
- D:\Dev\Git\usr\bin\sed.exe
- D:\Dev\gnuwin32\GetGnuWin32\bin\sed.exe
复制代码
作者: 依山居 时间: 2015-10-22 18:17
本帖最后由 依山居 于 2015-10-29 21:39 编辑
需要erverything 运行状态,否则es不能工作。- c:\>es -r "[ww]cmd"
- C:\Program Files\Double Commander\pixmaps\dctheme\32x32\actions\cm_showcmdlinehistory.png
- C:\Program Files (x86)\AliWorkbench\3.03.06N\WWCmd.exe
- C:\Program Files (x86)\AliWorkbench\3.05.05N\WWCmd.exe
- D:\AliWorkbenchData\System\Update\0\remote\0_beta_package\2.08.12N\WWCmd.exe.PE
- D:\AliWorkbenchData\System\Update\0\remote\0_beta_package\3.05.05N\WWCmd.exe.PE
-
- c:\>es -r "[ww]cmd"
- Everything IPC window not found, IPC unavailable.
复制代码
再贴个例子:可以看到3秒以内完成了搜索。比用dir来扫描文件速度要快很多。时间是生命- 21:24:30.50 D:\Dev\py3564em>es -r "system.ini$"
- C:\Windows\system.ini
- C:\Windows\winsxs\amd64_microsoft-windows-coreos_31bf3856ad364e35_6.1.7601.17514_none_83784bb654f0d178\syst
- em.ini
-
- 21:24:31.59 D:\Dev\py3564em>
复制代码
作者: CrLf 时间: 2015-10-22 21:03
好东西,重装必备三剑客:
everything
listary
autohotkey
作者: 依山居 时间: 2015-10-22 21:20
回复 4# CrLf
第三方库里光有ES不行的。
需要everything 运行着才能用。
作者: CrLf 时间: 2015-10-22 22:28
回复 5# 依山居
没注意,确实提示 Everything IPC window not found, IPC unavailable.
作者: 依山居 时间: 2015-10-22 22:38
回复 6# CrLf
官方有SDK,你给调SDK写个吗
作者: CrLf 时间: 2015-10-22 22:45
回复 7# 依山居
不需要,everything.exe -svc 就能运行服务了,想用的人自己去下好了
作者: 依山居 时间: 2015-11-3 09:24
贴个例子- @echo off
-
- :: 现在欲删除文本名称中“值”字前面为3位数的文本(比如上列中的 wj3苏州-114值-记录期),也即倒数第9个字符是"_"的文本。这样的代码如何写?
- :: http://www.bathome.net/thread-37925-1-1.html
-
- :: everything 的命令行工具es 搜索文件很好用。
- :: http://www.bathome.net/thread-37744-1-1.html
-
- ::生成测试用的空文件
- echo;>wj1苏州-64值-记录期.txt
- echo;>wj3苏州-114值-记录期.txt
- echo;>wj12苏州-86值-记录期.txt
-
-
-
- echo es 搜索文件用法,开启正则的时候\是转义符,所是双斜杠\\
- es -r "D:\\temp\\stringtie\\.*-[0-9]{3}值-记录期\.txt"
-
- echo ==============
- echo.
- echo 可以只搜索文件名,可以搜索到硬盘上文件名匹配的文件
- es -r ".*-[0-9]{3}值-记录期\.txt$
-
-
- echo ==============
- echo.
- echo 以下是放在for 中执行
-
- for /f "tokens=*" %%a in ('es -r "D:\\temp\\stringtie\\.*-[0-9]{3}值-记录期\.txt"') do (
- echo 要删除%%a
- echo del %%a 只是测试用,自行修改删除命令
- )
-
- pause
复制代码
作者: Uns8083 时间: 2016-7-29 11:00
回复 9# 依山居
请问有没有获取不包含文件名的路径的方法?
作者: DiamondbacK 时间: 2016-9-9 20:35
本帖最后由 DiamondbacK 于 2016-9-9 20:37 编辑
回复 10# Uns8083
用 for in loop 从完整路径中解析父目录路径,或者稍微读一读 Everything 自带帮助:复制代码
作者: codegay 时间: 2016-9-9 22:29
在pypi搜了一下,发现这个 :findeverything
https://pypi.python.org/pypi/findeverything/0.1.1
python 实现的 利用everything实现快速搜索文件。
源码这里:作者把es.exe base64后放到源码中了。
https://github.com/yejinlei/abou ... g/findeverything.py
作者: whiter 时间: 2018-1-9 22:28
类似的命令行搜索工具fzf.exe,效果类似于vim的ctrlP
不过还能绑定其他按键,比如到粘贴板 用clip,直接用指定编辑器编辑,less预览等
详见
地址https://github.com/junegunn/fzf
自行发掘
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |