Re: rsync

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Michael
Date:  
To: PLUG, Tom Roche
Subject: Re: rsync
thank you so much for the help guys!

On Sun, Feb 7, 2016 at 2:54 PM, Tom Roche <> wrote:

>
> Michael @
> http://lists.phxlinux.org/lurker/message/20160207.022735.736d654f.en.html
> > I ran this command:
>
> > rsync -aWuq --delete-before /home/bmike1/Pictures /home/bmike1/Music
> /media/bmike1/Lexar32G
>
> > and I do not know if it worked.
>
> For a good first approximation, compare the source and target
> directories/folders with, e.g., `du -s` and `find | wc -l`. That's also why
> I would not copy multiple source dirs into one target dir: it complicates
> that sort of check. Instead drive `rsync` with something like (in bash)
>
> RSYNC_OPTS='-aWuq --delete-before' # forces me to think about it
> TARGET_ROOT='/media/bmike1/Lexar32G'
> for SOURCE_DIR in \
>   '/home/bmike1/Music' \
>   '/home/bmike1/Pictures' \
> ; do
>   TARGET_DIR="${TARGET_ROOT}/$(basename ${SOURCE_DIR})"
>   for CMD in \
>     'date' \
>     "du -s ${SOURCE_DIR}" \
>     "find ${SOURCE_DIR} | wcl" \
>     "mkdir -p ${TARGET_DIR}" \
>     "rsync ${RSYNC_OPTS} ${SOURCE_DIR}/ ${TARGET_DIR}/" \
>     "du -s ${TARGET_DIR}" \
>     "find ${TARGET_DIR} | wcl" \
>     'date' \
>   ; do
>     echo -e "${CMD}"
> #    eval "${CMD}"
>   done
>   echo # newline
> done

>
> Run that with the `eval` commented out first, just to show you what the
> commandlines are gonna be: if they look OK, uncomment the `eval` to
> actually do something.
>
> HTH, Tom Roche <>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>




--
:-)~MIKE~(-:
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss