Everything I read says that to exclude .svn and .htaccess and other hidden files when creating a tar archive, use the --exclude=".*" pattern.
When I try, I get an empty archive. When I leave out the --exclude long option everything gets archived.
Here's the full command I'm using:
tar -czvf ../_migrate/archive_2012-05-07.tgz --exclude=".*" ./*
I've also tried this variant, with no difference in results:
tar -czvf ../_migrate/archive_2012-05-07.tgz --exclude=".?*" ./*
.and everything reachable through it... – vonbrand Jan 23 at 16:29