Skip to content

Recursive Find and Replace in Linux

October 5, 2011

Hello people!
I’ve once again needed to do a recursive find and replace to replace all memcpy in ffmpeg source for memmove since there’s a bug about the optimizations done with memcpy in x86_64 archs.
I thought this tip could be helpfull to others to in future. So here it is, how you can do it too:

find ./ -type f | xargs sed -i 's/string1/string2/g'

And that’s all folks! 😉

From → fedora, linux

  1. Wobble
    Appreciating the time and energy you put into your blog and in depth information you offer. It’s nice to come across a website once in a while that isn’t the same out of date rehashed information. Fantastic read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: