0
Another life ago I used to build PCs, but have been a Mac girl for so long now... this question is almost embarrassing but it's driving me nuts.
I'm using command prompt findstr
to search website contents for a particular call: findstr /I /S /P "search string"
.
My question, though, is how to tell if it's working? Whenever I execute this command it never seems to go anywhere or pull any results, 0 or otherwise. It won't let me do anything else (like dir
or CD
) so I assume it's working, but no matter how long I wait nothing happens.
Is there any way to tell where in the search it is or how long it might take?
/S
searches for matching files in the current directory and all subdirectories. If you have a lot of files in those directories, that's going to take a long time. A very long time. Also, that won't search the contents of a website, unless you downloaded the website contents beforehand and placed them within the current directory (or a subdirectory). – Bob – 2013-03-26T17:01:46.2633The way to test this kind of thing is to create a small text file that contains you string and see if it works there. If it hangs with a 3-line text file, you know something is wrong with the command. – terdon – 2013-03-26T17:01:47.620
@terdon the
/S
option, in effect, specified the files to search. Which can be a heck of a lot. Even if searching only within the user profile, that can easily be gigabytes of data with tens of thousands of files. Don't even think about doing that in the drive root in any reasonable amount of time. – Bob – 2013-03-26T17:03:01.393This is the wwwroot directory of a web server and we are currently doing penetration testing. We found some security holes so I am trying to find all html documents that call this particular file to find all pages that need to be fixed. So yeah, the directory will have a lot of files to scan. – kristina childs – 2013-03-26T17:04:00.487
@kristinachilds How long have you waited? This should just print results as it finds them. Blank is supposed to mean it's searching. (Personally, I like Notepad++'s find when searching for text in files in a directory.) – Bob – 2013-03-26T17:16:30.840
The last search started about an hour ago. Still nothing. Notepad is able to search file contents within entire directories?? – kristina childs – 2013-03-26T17:34:53.983
Install Cygwin and use
grep
. – Daniel R Hicks – 2013-11-03T19:25:30.130