How to use grep command to find a file in Linux | Linux in a Minute

preview_player
Показать описание
In this Linux in a Minute video you will learn how to use the grep command to search the contents of multiple files for a particular string. This is particularly useful in locating files when the contents are known, but the filename is not. The method used in this video applies to most major Linux distributions including Debian, Ubuntu, Linux Mint, Red Hat, CentOS, and Fedora.

Commands used in this video include:
grep -RI [string]

Connect with Don Pezet:

#FindFileLinux #GrepCommand #GrepCommandLinux
Рекомендации по теме
Комментарии
Автор

When finding files find comes in handy since it allows you to do some re. Combined with grep is really powerful.
(Never tried it but woukd tht work: find -type f -name '*.log' | cat | grep "some string", its purpose is to find all the files tht foloow a certain re and echo the contents from the files tht contain a certain string. )

HTWwpzIuqaObMt
Автор

Would this only work on .txt files? I tried testing this with a PDF file and it never found the text3 string.

silentnight
join shbcf.ru