IZBORNIK HOME FORUM ACCESS EXCEL WORD  
 

HOME

   
1 UVOD
2 CMD sintaksa i XP naredbeni interpreter
3 Parametri i Prekidači
4 Kretanje pomoću tipki
5 Podešavanje prozora
6 Zamjenski znakovi
7 Editiranje TXTdatoteka
8 Posebni simboli u CMD naredbi
9 BATCH datoteke u CMD
10 HELP u CMD prozoru
11 ERROR u CMD prozoru
 

-- NAREDBE U  CMD-u --

  ASSOC
  AT
  ATTRIB
  BREAK
  CACLS
  CALL
  CD
  CHCP
  CHDIR
  CHKDSK
  CHKNTFS
  CLS
  CLIP
  CMD
  COLOR
  COMP
  COMPACT
  CONVERT
  COPY
  DATE
  DEL
  DIR
  DISKCOMP
  DISKCOPY
  DOSKEY
  ECHO
  ENDLOCAL
  ERASE
  EXIT
  FC
  FIND
  FINDSTR
  FOR
  FORMAT
  FTYPE
  GOTO
  GRAFTABL
  HELP
  IF
  LABEL
  MD
  MKDIR
  MODE
  MORE
  MOVE
  PATH
  PAUSE
  POPD
  PRINT
  PROMPT
  PUSHD
  RD
  RECOVER
  REM
  REN
  RENAME
  REPLACE
  RMDIR
  SET
  SETLOCAL
  SHIFT
  SORT
  START
  SUBST
  TIME
  TITLE
  TREE
  TYPE
  VER
  VERIFY
  VOL
  XCOPY
   
   
12 PING
13 IPCONFIG
14 NETSTAT
15 ROUTE
16 NSLOOKUP
17 ARP
18 TRACERT
19 TELNET
20 NET Commands
   
  .

NAREDBENO SUČELJE (Command Prompt line)

FIND Search This Web Site

Adsense sponzor



 




FIND

Naredba Find (eng. Find = nađi) se koristi kada je potrebno pronaći određeni niz znakova (riječ ili rečenicu) u datoteci ili datotekama. Pri tome će se niz znakova gotovo uvijek tražiti u .txt datotekama koje sadrže znakove iz ASCII tablice znakova.

Standardno, bez navođenja parametra find djeluje tako da na zaslonu ispisuje sve one redove određene datoteke u kojima je pronađena zadana riječ. Uz navođenje parametra omogućava se prikazivanje dopunskih informacija. Treba naglasiti da je naredba find osjetljiva na velika/mala slova koja sistem ne razlikuje ili koristiti parametar /i.

find [/v] [/c] [/n] [/i] "string" [[drive:][path]filename[...]]

Parametar Značenje
/v Prikazuje one redove koji ne sadrže navedenu riječ
/c Prikazuje samo broj redova koji sadrže navedenu riječ
/n Prikazuje i redni broj linije koja sadrži traženu riječ
/i Određuje da pretraživanje ne bude "case sensitive"
"string" Određuje pod navodnicima niz znakova koji se traže
[drive:][path] filename Određuje pogon, path stazu i ime datoteke koja se pretražuje

Primjer 1:Pronađi riječ “windows” u datoteci win.ini te prikaži redni broj linije u kojima se nalazi tražena riječ
C:\>find “windows” c:\winnt\win.ini /c

Primjer 2 : Pronaći sve datoteke na disku koje u svom imenu sadrže niz DISK
dir c:\ /s /b | find "DISK"

 


Searches for a specific string of text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string.

Syntax

find [/v] [/c] [/n] [/i] "string" [[Drive:][Path]FileName[...]]

Parameters

/v

Displays all lines that do not contain the specified string.

/c

Counts the lines that contain the specified string and displays the total.

/n

Precedes each line with the file's line number.

/i

Specifies that the search is not case-sensitive.

"string"

Required. Specifies the group of characters that you want to search for. You must enclose string in quotation marks (that is, "string").

[Drive:][Path] FileName

Specifies the location and name of the file in which to search for the specified string.

/?

Displays help at the command prompt.

Remarks

  • Specifying a string

If you do not use /i, find searches for exactly what you specify for string. For example, the find command treats the characters "a" and "A" differently. If you use /i, however, find is not case-sensitive and treats "a" and "A" as the same character.

If the string you want to search for contains quotation marks, you must use two quotation marks for each quotation mark contained within the string (that is, "StringContaining""QuotationMarks").

  • Using find as a filter

If you omit a file name, find acts as a filter, taking input from the standard input source (usually the keyboard, a pipe, or a redirected file) and then displaying any lines that contain string.

  • Ordering command syntax

You can type parameters and command-line options for the find command in any order.

  • Using wildcards

You cannot use wildcards (that is, * and ?) in file names or extensions that you specify with the find command. To search for a string in a set of files that you specify with wildcards, you can use the find command in a for command.

  • Using /v or /n with /c

If you use /c and /v in the same command line, find displays a count of the lines that do not contain the specified string. If you specify /c and /n in the same command line, find ignores /n.

  • Using find with carriage returns

The find command does not recognize carriage returns. When you use find to search for text in a file that includes carriage returns, you must limit the search string to text that can be found between carriage returns (that is, a string that is not likely to be interrupted by a carriage return). For example, find does not report a match for the string "tax file" wherever a carriage return occurs between the word "tax" and the word "file."

Examples

To display all lines from Pencil.ad that contain the string "Pencil Sharpener", type:

find "Pencil Sharpener" pencil.ad

To find a string that contains text within quotation marks, you must first enclose the entire string in quotation marks. Second, you must use two quotation marks for each quotation mark contained within the string. To find "The scientists labeled their paper "for discussion only." It is not a final report." in Report.doc, type:

find "The scientists labeled their paper ""for discussion only."" It is not a final report." report.doc

If you want to search for a set of files, you can use the find command with the for command. To search the current directory for files that have the extension .bat and that contain the string "PROMPT," type:

for %f in (*.bat) do find "PROMPT" %f

To search your hard disk to find and display the file names on drive C that contain the string "CPU," use the pipe (|) to direct the results of a dir command to find as follows:

dir c:\ /s /b | find "CPU"

Because find searches are case-sensitive and dir produces uppercase output, you must either type the string "CPU" in uppercase letters or use the /i command-line option with find.

Adsense sponzor



 




Copyright 2009-2017 - IvanC - ic.ims.hr