You can use the 'type' and 'find' command in Dos/Windows to get the equivalent output of the UNIX 'cat' and 'grep' commands. The 'find' command can be very useful when you are trying to search for a specific text or phrase over multiple files. The 'find' command also comes in handy when searching for all the occurrences of a specific text or phrase in all the files under all the sub-directories of a given directory. The Type Command The 'type' command in Dos simply displays the contents of a text file or files. To see the content of a file simply enter the following in the command prompt: C:>type "filename" The Find Command The 'find' command in Dos can be used to search for a text string in a file or files. below is the usage and optional parameters of the 'find' command. [lang='css'] 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 ...
This list of DOS commands is very useful when repairing Windows after a system crash when Windows doesn't load and the only option you have is a Dos command prompt. Use the "help" command to find the usage and details of any particular command e.g. C:\>help copy
Choose a category below to browse and subscribe to specific content.
Here are some recent comments from our users.
Tech tips, WordPress plugins, WordPress tweaks and Technical tips to build a better blog.