I know the rsync tool and I have studied this post, but I cannot do this:

I have ~/Documents/src/ directory which has many sub-directories and files. I need to create ~/Documents/des/ directory which is a mirror of the ~/Documents/src/ with only a list of files in ~/Documents/files.list which contains thousands of lines like:


I have tried to run this from within / root:

me@linux:/> rsync --files-from=/home/me/Documents/files.list -avPRdr  /home/me/Documents/src/ /home/me/Documents/des/

But it gives lots of this error:

failed: No such file or directory

I'm struggling with rsync to achieve my goal. Can anybody help?


I change my command to this, and the No such file error is resolved now:

me@linux:/> rsync --files-from=/home/me/Documents/files.list -avPRdr  / /home/me/Documents/des/

But now the problem is all the files inside /home/me/Documents/src/ are copied over. I just need to copy over the files in files.list, how can I do that?


I used only the -a option and now rsync works as expected, i.e. copying over only files inside the files.list:

me@linux:/> rsync --files-from=/home/me/Documents/files.list -a  / /home/me/Documents/des/
  • Destination directory needs to exists for rsync to do its job. So be sure to create /home/me/Documents/des first – shodanshok Dec 15 '18 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.