인덱싱없이 파일 내에서 문자열을 검색하는 도구
믿을 수 없을 정도로 오래된 레거시 응용 프로그램에서 일부 연결 문자열을 변경해야하며, 그것을 만든 프로그래머는 전체 응용 프로그램을 연결 문자열로 모든 장소에 석고로 칠하는 것이 좋습니다.
Visual Studio의 "현재 프로젝트"검색은 엄청나게 느리고 Windows 검색을 신뢰하지 않습니다.
그렇다면 색인없는 무료 무료 텍스트 검색 도구는 무엇입니까? 폴더와 하위 폴더 안에 원하는 문자열이 포함 된 파일이있는 목록을 반환하면됩니다.
Windows 2003 Server를 실행하고 있습니다.
Windows Grep 이이 작업을 잘 수행합니다.
편집 : Windows Grep은 더 이상 개발자가 유지 관리하거나 사용할 수 없습니다. 대체 다운로드 링크는 다음과 같습니다. Windows Grep-alternate
Notepad ++ 의 Find-In-Files 대화 상자 의 팬입니다 . 보너스 : 무료입니다.
findstr.exe
파일 내에서 검색 할 수 있는 Windows 기본 제공 프로그램도 있습니다.
>findstr /s "provider=sqloledb" *.cs
란삭 요원 은 또 다른 좋은 사람입니다 빠르고 무료이며 쉘 통합과 같은 다른 멋진 기능이 있습니다.
나는 AstroGrep을 좋아합니다. 결과가 목록에 표시됩니다. 행을 클릭하면 적중을 강조하는 미리보기로 전체 라인이 표시됩니다. 그것은 매우 빠르고, 마른 것처럼 보이고 무료입니다. Windows 7, 8, 10 및 Windows Server 2008 R2에서 테스트되었습니다. 정규식을 허용합니다.
AstroGrep is a Microsoft Windows GUI File Searching (grep) utility. Its features include regular expressions, versatile printing options, stores most recent used paths and has a "context" feature which is very nice for looking at source code
Reference: AstroGrep
I'm a big fan of grepWin. It's free, lightweight and available from the explorer shell. I like not having to deliberately go find and start a program in order to search for something. I can just right click in explorer and bring it up.
SeekFast is very convenient to search text in files - text files, MS Word, Excel, OpenOffice and others. It has a free version.
FileSeek. It's fast and it's free. It can find text strings, or match regular expressions.
Visual Studio's search in folders is by far the fastest I've found.
I believe it intelligently searches only text (non-binary) files, and subsequent searches in the same folder are extremely fast, unlike with the other tools (likely the text files fit in the windows disk cache).
VS2010 on a regular hard drive, no SSD, takes 1 minute to search a 20GB folder with 26k files, source code and binaries mixed up. 15k files are searched - the rest are likely skipped due to being binary files. Subsequent searches in the same folder are on the order of seconds (until stuff gets evicted form the cache).
The next closest I've found for the same folder was grepWin. Around 3 minutes. I excluded files larger than 2000KB (default). The "Include binary files" setting seems to do nothing in terms of speeding up the search, it looks like binary files are still touched (bug?), but they don't show up in the search results. Subsequent searches all take the same 3 minutes - can't take advantage of hard drive cache. If I restrict to files smaller than 200k, the initial search is 2.5min and subsequent searches are on the order of seconds, about as fast as VS - in the cache.
Agent Ransack and FileSeek are both very slow on that folder, around 20min, due to searching through everything, including giant multi-gigabyte binary files. They search at about 10-20MB per second according to Resource Monitor.
UPDATE: Agent Ransack can be set to search files of certain sizes, and using the <200KB cutoff it's 1:15min for a fresh search and 5s for subsequent searches. Faster than grepWin and as fast as VS overall. It's actually pretty nice if you want to keep several searches in tabs and you don't want to pollute the VS recently searched folders list, and you want to keep the ability to search binaries, which VS doesn't seem to wanna do. Agent Ransack also creates an explorer context menu entry, so it's easy to launch from a folder. Same as grepWin but nicer UI and faster.
My new search setup is Agent Ransack for contents and Everything for file names (awesome tool, instant results!).
TextPad is really good for this sort of thing. You can use it for free, but you get a warning message asking you to buy it. Other than that it is an excellent tool all round.
If you don't want to install Non-Microsoft tools, please download STRINGS.EXE from Microsoft Sysinternals and make a procedure like this one:
@echo off
if '%1' == '' goto NOPARAM
if '%2' == '' goto NOPARAM
if not exist %1 goto NOFOLDER
echo ------------------------------------------
echo - %1 : folder
echo - %2 : string to be searched in the folder
echo - PLEASE WAIT FOR THE RESULTS ...
strings -s %1\* | findstr /i %2 > grep.txt
notepad.exe grep.txt
goto END
:NOPARAM rem - input command not correct
echo ====================================
echo Usage of GREP.CMD:
echo Grep "SearchFolder" SearchString
echo Please specify all parameters
echo ====================================
goto END
:NOFOLDER
echo Folder %1 does not exist
goto END
:END rem - exit
You could install cygwin (takes some time) and use grep -R .
I tend to always use grep or find from unxutils. This works great on ms-windows.
FileSearchy. It's quick and free. It does have indexing, but only for file names and not contents.
I'd recommend GOW over cygwin, as it's much lighter, but still includes grep as well as another 130 or so *nix command-line utils in 18MB instead of >100MB.
If you are looking for a console based utility to do that then you can refer to this url and create one for yourself.
what is does is find the list of search text in folder and return file matching with same name also returns if some file contains the text also
리눅스 루트가있는 명령 줄 프로그램 인 ack 을 추천 할 수 있습니다 . 이는 Windows에서도 훌륭하게 작동합니다. grep보다 빠르며 git / subversion 디렉토리와 바이너리 파일을 무시하고 출력이 더 이해하기 쉽습니다. 그리고 ack 입력은 grep보다 25 % 빠릅니다.)
나는 babun (cygwin)과 git의 msys에서 시도했다-훌륭하게 작동한다. 그것은 perl로 작성되었으므로 OS의 어딘가에 perl이 설치된 cmd.exe에서도 작동해야합니다.
Windows의 경우 자동으로 "Seekfast"를 시도 할 수 있습니다. 여기 https://seekfast.org 안전 링크.
참고 URL : https://stackoverflow.com/questions/317944/tools-to-search-for-strings-inside-files-without-indexing
'Programing' 카테고리의 다른 글
현재 위치 권한 대화 상자가 너무 빨리 사라짐 (0) | 2020.05.31 |
---|---|
3/4가 참인지 테스트하는 논리 (0) | 2020.05.31 |
Disney의 FastPass가 유효하고 유용한 대기열 이론입니까? (0) | 2020.05.31 |
태깅을위한 데이터베이스 디자인 (0) | 2020.05.31 |
MS Excel 버전 관리를 수행하는 가장 좋은 방법 (0) | 2020.05.31 |