[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

how do i search the files which include roshan in windows c:\ drive using the dos grep command with is in the following location http://web.kcua.ac.jp/pub/dos/grep20.zip




how do i search the files which include roshan in windows c:\ drive using the dos grep command  with is in the following  location http://web.kcua.ac.jp/pub/dos/grep20.zip
0
Roshanw4
Asked:
Roshanw4
  • 3
  • 3
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Why not use the built in "FIND" command instead.  The command you want to use is pre-long file name and might have difficulty in doing this.  It might also have limitations on file sizes etc.

What operating system do you use?  XP?  2000? Me? 98?

For XP and 2000 (and NT4), the find command should be usable as such:

Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]

  /V         Displays all lines NOT containing the specified string.
  /C         Displays only the count of lines containing the string.
  /N         Displays line numbers with the displayed lines.
  /I         Ignores the case of characters when searching for the string.
  /OFF[LINE] Do not skip files with offline attribute set.
  "string"   Specifies the text string to find.
  [drive:][path]filename
             Specifies a file or files to search.

If a path is not specified, FIND searches the text typed at the prompt
or piped from another command.

For example to search all files in the C:\ root directory (NOT subdirectories) you can use:

FIND /I "ROSHAN" *
0
 
Roshanw4Author Commented:

I AM USING THIS GREP UTILITY  http://web.kcua.ac.jp/pub/dos/grep20.zip AND I WANT TO SEARCH SPECIALLY IN DOS AND WINDOWS (2000,98,95)
0
 
Roshanw4Author Commented:
I FEEL YOU DID NOT GET THE QUESTION ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Roshanw4Author Commented:
IF YOU FEEL NEED MORE EXPLANATION I CAN DO SO !!
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Perhaps you did not understand my response:
The command you want to use is a 16bit application, pre-long file name (meaning it likely will not be able to read/understand files specified by their long file names.  It might also have limitations on file sizes meaning if try to "grep" a file over 32,000 bytes (or 64,000, or some other appropriate number), it might crash.  Making the command useless for you.

If you INSIST upon using this one, then I the command in its most basic sense would be:

grep -l roshan *.*
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Grep has MANY options - I highly recommend you open the GREP.MAN file in notepad and read what they are.  Your desired output can greatly effect the syntax of the command used.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now