DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Recursively Find All Files And Convert To Unix Format (excluding Those In Svn Dirs)

  • submit to reddit
find . -type f \! -path "*svn*" -exec dos2unix {} \;

My local dev box is Windows but my prod server is BSD. To make sure all files are in the correct format (LF rather than CRLF), I run this after doing my svn update on the server.

Hat tip: Ryan @ Textdrive.