1

I have a text file which contains the list of files and directories that I want to copy (one on a line). Now I want rsync to take this input from my text file and sync it to the destination that I provide.

I've tried playing around with "--include-from=FILE" and "--file-from=FILE" options of rsync but is is just not working

I also tried pre-fixing "+" on each line in my file but still it is not working.

I have tried coming with various filter PATTERNs as outlined in the rsync man page but it is not working.

Could someone provide me correct syntax for this use case. I've tried above things on Fedora 15, RHEL 6.2 and Ubuntu 10.04 and none worked. So i am definitely missing something.

Many thanks.

4
  • What does rsync do when it "doesn't work"? It will probably help to give an extract from your list of files. The rest of the command you used may help too.
    – Ladadadada
    Mar 19, 2012 at 8:53
  • 1
    The option is --files-from, not --file-from. Is that a typo in your question or in the command you tried to run?
    – Ladadadada
    Mar 19, 2012 at 8:58
  • The problem may be within your file; quote a path of it.
    – brownian
    Mar 19, 2012 at 9:22
  • I am having a hard time posting the information that I want in the "comments" section. i will get back to you shortly. I will post the file where i ma fetching the input and the command output. Mar 19, 2012 at 10:15

1 Answer 1

0

Can use following with rsync -a option

"--include-from=FILE" and "--from-file=FILE"
2
  • I am having a hard time posting the information that I want in the "comments" section. i will get back to you shortly. Mar 19, 2012 at 10:14
  • @slayedbylucifer edit your own post to add info.
    – Skaperen
    Mar 31, 2022 at 5:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .