In article <1160687866.234253.316810@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"amit" <amit.kohan@xxxxxxxxx> wrote:
> Hello Group,
> How can I make rsync in this command?
> rsync -z -perms --progress --stats -b --backup-dir=/Thursday -a -r
> where [0-9] stands for directories with numeric names.
I'm assuming that the numeric names can be more than one character. I
haven't used --backup-dir, and upon first reading of the man page, it
confuses the heck out of me, and when I tried to figure it out
experimentally--it didn't seem to do anything. So, keeping in mind that
what follows may be totally off because I don't know what your command
is actually trying to do, here's a general outline.
(cd /usr/local/ldb/db; ls) | grep '^[0-9][0-9]*$' | while read name
if [ -d /usr/local/ldb/db/$name ]
rsync [your options] $SRC $DST