728x90

리눅스 파일안에 원하는 내용이 있는지 검색하는 방법이다.

현재 폴더에서 원하는 내용(window.top)이 들어있는 걸 찾는다.

grep -nir "window.top" *.*

 

현재 폴더 및 하위 폴더까지 모두 검색한다.

grep -nir "window.top" ./*

 

find ./ -name "*.php" | xargs grep -l "window.top"

 

 

find ./ -name "*.php" | xargs grep -nir "window.top"

 

window10 에 PowerShell 을 설치하고 아래와 같이 검색한다.

select-string *, */* -pattern "window.top"

 

 

https://github.com/PowerShell/PowerShell/ 에서 PowerShell 파일을 받을 수 있다.

 

 

'리눅스' 카테고리의 다른 글

VirtualBox CentOS 7 NAT  (0) 2021.11.05
CentOS 7 에서 MySQL 5.7 yum 설치 스크립트  (0) 2021.10.23
CentOS 7 Apache Permission  (0) 2021.07.31
CentOS 7 openssl 최신버전으로 업그레이드  (1) 2021.07.24
CentOS 7 sftp chroot  (0) 2021.07.22
블로그 이미지

Link2Me

,