How to find a string inside file in the whole disk
Hello everyone,
i have to search a particular string inside my disk. is there any command to search a string inside all the files of the disk? can anyone suggest me a command to do so. thanks beforehand. penguinux |
Code:
find / -type f -print0 | xargs -0 grep -i pattern Just two notes: 1) the command can take a long time, depending on the size of the filesystem, 2) most likely you have to run this command as root, to avoid some permission denied error. See man find, man xargs, man grep for future reference. |
found solution
thanks alot..
it solved my problem... |
All times are GMT -5. The time now is 07:05 AM. |