I have data in multiple files. I want to find some text that matches in all files. Can I use the grep command for that? If yes then how?
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
If you do not know where exactly the files are located, but know their names, you can use
Assuming that the files are in this directory somewhere. |
|||||||
|
The star
|
||||
|
|
|
Just add all files on the command line. You can use * or ? or whatever your shell allows as placeholder. From manpage:
means: as many files as you wish.. or none if you want to grep stdin/pipe. |
|||
|
|
