Got this answer from a friend:
to show all the files that contain /etc/passwd
find / -type f | xargs grep -l /etc/passwd
Important:
"/etc/passwd" has 11 characters,
so any replacement with 11 or less characters will make
it easy. Let's say you wanted to replace "/etc/passwd" with
"/vol/passwd". You could run:
find / -type f | xargs perl -i -pe 's~/etc/passwd~/vol/passwd~g'
to change the passwd file to "/x/y". You'd have to add 7 nulls. So:
find / -type f | xargs perl -i -pe 's~/etc/passwd~/x/y\x00\x00\x00\x00\x00\x00\x00~g'
--John
|