findstr.md 1.1 KB

findstr

ํ•˜๋‚˜ ์ด์ƒ์˜ ํŒŒ์ผ์—์„œ ์ง€์ •๋œ ํ…์ŠคํŠธ๋ฅผ ์ฐพ๊ธฐ. ๋” ๋งŽ์€ ์ •๋ณด: https://learn.microsoft.com/windows-server/administration/windows-commands/findstr.

  • ๋ชจ๋“  ํŒŒ์ผ์—์„œ ํ•˜๋‚˜ ์ด์ƒ์˜ ๋ฌธ์ž์—ด ์ฐพ๊ธฐ:

findstr "{{๋ฌธ์ž์—ด1 ๋ฌธ์ž์—ด2 ...}}" *

  • ํŒŒ์ดํ”„๋œ ๋ช…๋ น์˜ ์ถœ๋ ฅ์—์„œ ํ•˜๋‚˜ ์ด์ƒ์˜ ๋ฌธ์ž์—ด ์ฐพ๊ธฐ:

{{dir}} | findstr "{{๋ฌธ์ž์—ด1 ๋ฌธ์ž์—ด2 ...}}"

  • ๋ชจ๋“  ํŒŒ์ผ์„ [s]์žฌ๊ท€์ ์œผ๋กœ ๊ฒ€์ƒ‰ํ•˜์—ฌ ํ•˜๋‚˜ ์ด์ƒ์˜ ๋ฌธ์ž์—ด ์ฐพ๊ธฐ:

findstr /s "{{๋ฌธ์ž์—ด1 ๋ฌธ์ž์—ด2 ...}}" *

  • ๋Œ€์†Œ๋ฌธ์ž๋ฅผ ๊ตฌ๋ถ„ํ•˜์ง€ ์•Š๊ณ  ๋ฌธ์ž์—ด ์ฐพ๊ธฐ:

findstr /i "{{๋ฌธ์ž์—ด1 ๋ฌธ์ž์—ด2 ...}}" *

  • ์ •๊ทœ ํ‘œํ˜„์‹์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ชจ๋“  ํŒŒ์ผ์—์„œ ๋ฌธ์ž์—ด ์ฐพ๊ธฐ:

findstr /r "{{ํ‘œํ˜„์‹}}" *

  • ๋ชจ๋“  ํ…์ŠคํŠธ ํŒŒ์ผ์—์„œ ๊ณต๋ฐฑ์ด ํฌํ•จ๋œ ๋ฌธ์ž์—ด์„ ๊ทธ๋Œ€๋กœ ์ฐพ๊ธฐ:

findstr /c:"{{๋ฌธ์ž์—ด1 ๋ฌธ์ž์—ด2 ...}}" *.txt

  • ์ผ์น˜ํ•˜๋Š” ๊ฐ ์ค„ ์•ž์— ์ค„ ๋ฒˆํ˜ธ ํ‘œ์‹œ:

findstr /n "{{๋ฌธ์ž์—ด1 ๋ฌธ์ž์—ด2 ...}}" *

  • ์ผ์น˜ํ•˜๋Š” ๋‚ด์šฉ์„ ํฌํ•จํ•˜๋Š” ํŒŒ์ผ ์ด๋ฆ„๋งŒ ํ‘œ์‹œ:

findstr /m "{{๋ฌธ์ž์—ด1 ๋ฌธ์ž์—ด2 ...}}" *