Answer the question
In order to leave comments, you need to log in
How to copy hidden files (RSYNC)?
Hello
everyone I'm transferring letters to another server.
Hidden files and folders are not copied.
How to copy hidden files too
? user/.maildir/..
ls -1 /var/www/mailadmin/data/email/site.ru/ | while read u; do
rsync -avz -D -e ssh /var/www/mailadmin/data/email/site.ru/$u/.maildir/* [email protected]:/var/vmail/site.ru/$u/
done
Answer the question
In order to leave comments, you need to log in
ls -1A lists "hidden" folders/files as well
man ls
-a, --all:
do not ignore entries starting with .
-A, --almost-all:
do not ignore entries starting with ., but not list implied . and ..
But in your case, you just need to copy without specifying *
rsync -avz -D -e ssh /var/www/mailadmin/data/email/site.ru/$u/.maildir [email protected]:/var /vmail/site.ru/$u
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question