LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Sync 2 directories on machine

[ILUG] Sync 2 directories on machine

Niall O Broin niall at linux.ie
Tue Aug 16 09:04:56 IST 2005


On 16 Aug 2005, at 08:33, Colm Buckley wrote:

> On 16 Aug 2005, at 08:31, Colin O'Keeffe wrote:
>
>> How can I sync two directorys,
>>
>> /home/stuff
>>
>> to
>>
>> /storage/backups/stuff
>>
>> there both on the same machine..
>
> rsync -av /home/stuff /storage/backups

That MAY not be quite what Colin wanted. It will update 
/storage/backups/stuff, putting in there any new files from /home/stuff 
and updating any changed files, but it won't do anything about files 
which have been deleted from /home/stuff - for those, you need to add 
the --delete option.

And although the likelihood is that Colin wants the sync to be in that 
one direction, given the names of the directories, he should be aware 
that rsync does a uni-directional sync and that new or changed files in 
/storage/backups/stuff will be deleted using rsync -av --delete.



Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell