Linux Commands – Fast Tricks

I’ll update this frequently.

Mass replace recursively.

find ./ -type f -exec sed -i 's/string1/string2/g' {} \;

Change all image sizes that are larger than 800×600 to that size.

find . -type f -exec mogrify -resize 800x600 {} \;

Force copy.

 /bin/cp -Rf mydomain.backup/* mydomain/public_html/
Posted in Other News, Tips & Code

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>