December 19, 2009

In windows a command line tool used to search string in file(like grep in Unix)

findstr

This is command line tool in windows( From windows 2000), used to grep string from files. I used it when I reach some codes.

Example:

findstr /I /S /P "main()" * // Search "main()" in all files of this directory and it's sub dir, Case-insensitive
findstr /I /S /P /M main * // get the file name only

For more details, refert to http://www.ss64.com/nt/findstr.html
For others command in Widnows, refert to http://www.ss64.com/nt/

No comments:

Post a Comment