简体   繁体   中英

Regarding searching a keyword in all files in particular directory in linux

I want to search a word suppose "abcd" in all the files(Including hidden and all possible files) in dir suppose /home/john/? This is what I tried, I am running the below command and its getting stuck for more than 24 hours. command --> find /home/john -type f -exec grep -iH 'abcd' {} \\;

Result something which will show all the files which have this particular word or any file which is have the name as our search word.

Thanks

使用grep递归选项呢?

grep -r abcd /home/john

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM