LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

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

Rep: Reputation: 61
File Sync between laptop and desktop


Hi,
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
--Ian
 
Old 11-03-2005, 03:24 AM   #2
TigerOC
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 03:31 AM.
 
Old 11-03-2005, 06:06 AM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

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

--Ian
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 06:46 PM
File Sync? justinmc Linux - Networking 4 10-01-2005 01:40 PM
laptop screen, XF86Config problem, unknown vert/horz sync rates rphook Linux - Newbie 3 10-08-2004 12:47 AM
Laptop, graphics, and refresh/sync rates jrdioko Linux - Software 2 07-07-2004 07:17 PM
sync laptop with desktop snipersock Linux - Laptop and Netbook 2 06-11-2004 03:16 AM


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

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