Divi WordPress Theme

How to find if a file contains a given string using dos command line

Topic: How to find if a file contains a given string using dos command line  (Read 1934 times)

Offline Chris

  • Junior Guru
  • **
  • Posts: 81
  • iTrader: +0/-0
    • View Profile
I want to search all files in a specific folder and its subfolders having particular word (like we can use grep command in Linux) on my Windows server. How can I use Windows command prompt to search it?
VPS Hosting - AccuWebHosting

Offline Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 660
  • iTrader: +153/-0
    • View Profile
Re: How to find if a file contains a given string using dos command line
« Reply #1 on: October 30, 2019, 05:31:39 PM »
You can use findstr command to search specific string via command prompt:

To search only one word:

findstr /s “hello” *.*

If there is a space in the search word, you have to use /C option as follow:

findstr /s /C:”hello world” *.*

Hope this will be helpful!
Shopify Divi WordPress Theme
Tags:

Execute ASP code on HTM or HTML file

Started by KailashBoard How Tos

Replies: 0
Views: 7656
Last post January 10, 2007, 02:31:38 PM
by Kailash
command to check Exim mail queue on server

Started by digitalpointBoard cPanel/WHM

Replies: 4
Views: 11831
Last post December 01, 2009, 10:49:16 PM
by kvchosting
How to find processes running by particular user on Linux server

Started by KailashBoard Linux

Replies: 2
Views: 13138
Last post April 02, 2014, 12:14:34 PM
by Rick
Could not load file or assembly System.Web.Extensions

Started by MikeBoard .NET Development

Replies: 1
Views: 5721
Last post July 17, 2007, 12:09:04 PM
by Kailash
command to edit/remove cron job (crontab) on Linux server

Started by KailashBoard cPanel/WHM

Replies: 7
Views: 97752
Last post July 21, 2010, 11:34:10 AM
by webhosting.am