Getting the 'hidden' .htaccess file.
paul+rsync at wurtel.net
Fri Sep 3 09:37:31 MDT 2010
On Fri 03 Sep 2010, Ian Skinner wrote:
> When I run the following command, it will get the other 19258 files, but it will ignore the three .htaccess files in our site. I have searched the internet and can see that it is apparently somewhat tricky to get rsync to capture dot hidden files. I have tried every solution I have found that I understood. Can somebody help out this rsync newbie?
> /usr/local/bin/rsync --verbose --progress --stats --compress --recursive --times --perms --links --include=".htaccess" --delete . appprod::test
Rsync will cheerfully include any and all files in its actions;
it doesn't care whether they start with a dot or not. No need to
--include it. They are in no way "hidden", except for the fact that they
are not shown with ls by default or included in * (i.e. it's a userspace
issue, it's not done by the kernel).
What does it say if you explicitly rsync just the .htaccess file?
Use multiple -v options and -i .
rsync -a -vvvvv -i path/to/.htaccess appprod::test/path/to/.htaccess
More information about the rsync