LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Rsync: exclude and include filters? (http://www.linuxquestions.org/questions/linux-software-2/rsync-exclude-and-include-filters-859342/)

JosephS 01-28-2011 10:21 PM

Rsync: exclude and include filters?
 
Is there a way to rsync only some of the .(hidden files)?
I tried, but couldn't figure it out, and was wondering if this was possible. I want to back up some of my /home/joe/ directories as well as a few of the . files and directories, but not all.

Thanks

lucmove 02-03-2011 10:43 PM

Read the man file for rsync,

Code:

% man rsync
And look specifically for these two options:

--existing
skip creating new files on receiver

Copy the files you want manually, then on the next runs rsync will copy those files only.


--files-from=FILE
read list of source-file names from FILE

Using this option allows you to specify the exact list of files to transfer (as read from the specified FILE or - for standard input). It also tweaks the default behavior of rsync to make transferring just the specified files and directories easier:

etc. etc.

Read the man page.


All times are GMT -5. The time now is 07:24 PM.