Question : how to make rsync read filenames from a file

I need to rsync some files based on date. I am trying to run rsync with the following options, but it always returns an error message.

rsync error: syntax or usage error (code 1) at options.c(1452) [client=2.6.8]

I have tried various options with the same results. Any hints on what I am doing wrong.
Code Snippet:
1:
rsync -av --files-from=stuff.txt root@some-machine:/u02/klarf-copy
Open in New Window Select All

Answer : how to make rsync read filenames from a file

Hi,

technically, your command should work as expected!

The -name parameter as you used it is redundant and can be omitted.

Perhaps you should try other parameters like -atime or -ctime, and look what they bring about.

There is also an -newer parameter:

You could touch a file and use it as a reference -

touch -t 200811010000.00 /tmp/reference.file

and then do

find . -newer /tmp/reference.file > stuff.txt

(or use find . -newer /tmp/reference.file -ls to check beforehand)

This way you can build an exact starting point for your find.

Remember, if you want to process files only, not directories, use -type f , and if you don't want to process subdirectories, use -maxdepth 1 (if your find supports it).

Good luck!

wmp

Random Solutions  
 
programming4us programming4us