Copying a list of files - Tools

This is a discussion on Copying a list of files - Tools ; Hello. I'm trying to achieve the following. Copy system configuration files to a directory on my (/home/user/configuration) home drive. I've made a text file with the files I want to copy, one file on each row. The command: rsync -tv ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Copying a list of files

  1. Copying a list of files

    Hello.

    I'm trying to achieve the following.

    Copy system configuration files to a directory on my
    (/home/user/configuration) home drive.

    I've made a text file with the files I want to copy, one file on each row.

    The command:

    rsync -tv --files-from="my list of files" /home/user/configuration/

    does not work and I'm not getting any wiser from reading the man page.

    Will someone help me get this right?

    Thank you :-)
    /Les
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  2. Re: Copying a list of files

    On Sun, 2008-08-24 at 17:54 +0200, Leslie Jensen wrote:
    > Copy system configuration files to a directory on my
    > (/home/user/configuration) home drive.
    >
    > I've made a text file with the files I want to copy, one file on each row..
    >
    > The command:
    >
    > rsync -tv --files-from="my list of files" /home/user/configuration/
    >
    > does not work and I'm not getting any wiser from reading the man page.


    --files-from is used in addition to a source dir, not in place of one.
    If the paths in your --files-from file are absolute, you can just pass /
    as the source dir:

    rsync -tv --files-from="my list of files" / /home/user/configuration/

    The examples in the man page description of --files-from do show the
    source dir, but the description could certainly be more explicit that
    one is required.

    Matt

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkix0hUACgkQC+xSYN/Rlfui0wCeKDcWHCCCm+rsETtRmeZPuXSd
    ewIAn382L+2e5VAj4plOMZiusnzvrz61
    =6YFA
    -----END PGP SIGNATURE-----


  3. Re: Copying a list of files

    On Sun, Aug 24, 2008 at 05:54:12PM +0200, Leslie Jensen wrote:
    > rsync -tv --files-from="my list of files" /home/user/configuration/


    You're missing a path in that command, presumably the source path.
    All names in a files-from file are relative to the source path, but
    you can use "/" if you want the names to be effectively absolute.

    rsync -tv --files-from="my list" / /home/user/configuration/

    ...wayne..
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  4. Re: Copying a list of files


    >
    > rsync -tv --files-from="my list of files" / /home/user/configuration/
    >
    > The examples in the man page description of --files-from do show the
    > source dir, but the description could certainly be more explicit that
    > one is required.
    >
    > Matt


    Thank you all.
    It's amazing what a slash can do :-)
    /Les
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


+ Reply to Thread