Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-03-2005, 02:32 AM   #1
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
File Sync between laptop and desktop

I have a laptop running OS X 10.3, and a desktop running Debian Sarge. I need to synchronize files between the two, so that both the laptop and the desktop has the same copy of the files.

I guess I need to use rsync, but that copies new files but doesn't delete files on the other computer. For example, say I delete the file foo.txt on my laptop but not on my desktop. If I then rsync the laptop with the desktop, the file is copyed back to the laptop.

What I would like to do is have a shell script that I can run from the laptop, so that when I run it, I get the same copy of files on both the laptop and the desktop, regardless of which computer has the newest files.

Thanks in advance for any help
Old 11-03-2005, 04:24 AM   #2
Senior Member
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You need to add the switch --delete-after to the line so that old files are deleted like;

rsync -ave ssh --delete-after /directory/ <laptop_ip-address or name>:/directory/

You can make a bash script with this and then to make it executable do chmod 700 ./<script_name>. It will still require you to interface to enter the password.
I use kde and run KBear to manage an Internet server and KBear has a facility to sync directories.

Last edited by TigerOC; 11-03-2005 at 04:31 AM.
Old 11-03-2005, 07:06 AM   #3
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Original Poster
Rep: Reputation: 62
Thanks for your help TigerOC.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
to sync files from network to linux laptop Henry_1 Linux - General 2 06-12-2006 07:46 PM
File Sync? justinmc Linux - Networking 4 10-01-2005 02:40 PM
laptop screen, XF86Config problem, unknown vert/horz sync rates rphook Linux - Newbie 3 10-08-2004 01:47 AM
Laptop, graphics, and refresh/sync rates jrdioko Linux - Software 2 07-07-2004 08:17 PM
sync laptop with desktop snipersock Linux - Laptop and Netbook 2 06-11-2004 04:16 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration