Monday, October 20, 2008

Finding all files containing a specific string in unix

find [directory_name] -exec grep -li "[search_string]" {} \;

e.g. find . -exec grep -li "xxxx" {} \;

which searches for files containing the string "xxxx" within the current directory.

Resizing animated gifs using Imagemagick

convert [filename] -coalesce temp
convert temp -resize %25 resized_image.gif