Thursday, April 25, 2024
25
rated 0 times [  25] [ 0]  / answers: 1 / hits: 24268  / 2 Years ago, fri, january 21, 2022, 2:34:11

I'm looking some text in files , but three are a lot of files and searched text appears several times in one file, how can I receive a list of files that contains searched text with every file listed only once?


More From » command-line

 Answers
4
grep -l xyz file*


where xyz is the search pattern , and file* is the list of files to be searched in


[#32080] Saturday, January 22, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
afyess

Total Points: 437
Total Questions: 120
Total Answers: 107

Location: San Marino
Member since Fri, Jul 3, 2020
4 Years ago
;