Useful Linux Commands 12/2009

Recursively remove all .svn directories from a working copy:

find . -name .svn -exec rm -rf {} ;

Recursively remove all ._xyz-files (OSX meta file info) from your WebDav-Drive, set via hourly cron:

find /var/data/ -name "._*" -exec rm {} ;

Do not forget to set your path ;).

Check for syntax-errors (lint) in all php-files of current directory and only echo error messages if errors have been detected:

find . -name "*.php" -exec php -l {} ; | grep -v 'No syntax errors'