Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder say /media/Movies/English/ numbers of folders, there is say 500 folder

Now I want to copy only 50 folders, not in alphabetical order but in random ...

How to do perform this task using rsync?

I tried the following rsync command

this is want happened rsync -arv --include-from=/media/Movies_NTFS/Movies/English/rsync-test /home/joe/Videos/

rsync-test file contains per line folders present in /media/Movies_NTFS/Movies/English/ folder but nothing is copied, when I ran the command. why?

share|improve this question
You need something like rsync -arv --include-from=rsync-test /media/Movies/English /home/joe/Videos, i.e. you are missing the source argument. – taneli Mar 19 '12 at 19:22
Solved it by using --files-from instead --inlcude-from ... – joe1983 Mar 20 '12 at 3:46
Good for you! I hope you're aware of the awesome tool called unsort for shuffling the folders (and use the -r option to make it even more random). – taneli Mar 20 '12 at 10:21

OP solved question using the --files-from switch in rsync instead of --include-from.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.