Shell command to search a string in many files with same name located in different folders

StackOverflow https://stackoverflow.com/questions/23488522

  •  16-07-2023
  •  | 
  •  

문제

I am using Ubuntu 12.04 LTS. I have many files named "urls.py" in many folders. I want to search a particular string named "unit/" in these files. Can anybody tell me the command to search the same?

도움이 되었습니까?

해결책

grep -in 'unit' $(find -name "urls.py") Works.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top