To recursively search with grep
To put grep search a certain pattern (say chroot) on the entire partition / I use (as root) the following command
Code:
# grep -r chroot / Code:
Binary file /bin/su matches Thanks! |
find and xargs are your friend, like:
Code:
find / -type f | xargs grep chroot |
Quote:
Code:
find / -type f -print0 | xargs -0 grep chroot |
Thanks a lot uselpa and Slim Backwater for your help!
|
You could also use grep's -I option which will skip binary files. Like: grep -I -r /
|
On all pc's i have access to I add the following bash script I whipped up. Short, simple and REAL handy.
Code:
#!/bin/bash Regards Mick Pollard aka lunix-aus http://www.lunix.com.au |
All times are GMT -5. The time now is 07:34 PM. |