Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've a question about rsync command in unix.

Does it save some configuration invisible files into the directories ? How does it know which files need to be added or not ?

Or is just checking file by file ?

I'm asking this because I'm planning to copy all files (but not the root directory) to another folder (svn working copy).

thanks

share|improve this question

2 Answers 2

up vote 4 down vote accepted

rsync does not use any invisible files to remember what it has/has not copied across. Each time you run an rsync command it checks source against target (according to the options you specify on your rsync commandline) and copies files accordingly.

If you want to explicity ignore/not copy files/folders you can use the --exclude (and related) option to do that. Check the rsync manpage for rull details of what is available.

share|improve this answer

In addition to @Richm's answer Rsync uses timestamps, and size (like git does) by default to tell if a file has changed, and that rsync should update it. you can use the --checksum option to check based on a checksum instead of a timestamp.

-c, --checksum              skip based on checksum, not mod-time & size
share|improve this answer

Your Answer

 
discard

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.