http://www.linuxplanet.com/linuxplanet/tutorials/6227/1
Synchronizing your Linux Laptop and DesktopTransferring Single ObjectsApril 17, 2006 If your laptop computer is a complement to your desktop machine, you're probably well aware of the need to synchronize data between the two. When you're in the middle of a big project and know you're going to be spending the afternoon in a doctor's waiting room or on an airplane, it's nice to be able to quickly transfer your project files--and maybe your email and contacts--to the laptop, then vice-versa when you return to your desk. This article will show you two ways to accomplish this on GNU/Linux-based machines. If you only have a handful of individual files or directories to transfer, it's probably easiest to send them one at a time via secure shell (OpenSSH). Every GNU/Linux distribution includes OpenSSH, but not all of them run the SSH daemon (which allows you to connect to the computer via SSH) by default. Starting the daemon is as simple as typing Once the secure shell daemon is started, other computers can connect to your machine from a terminal window by using the scp picture.jpg 192.168.1.101:/home/user/pictures/ In the above example, a file called picture.jpg is transferred to the network machine with the address 192.168.1.101 in the /home/user/pictures/ directory. By default, By using your /etc/hosts file, you can create a nickname for the remote machine you're copying files to. Just start a new line in the file, type in the IP address of the machine you want to nickname, then press the tab key once and type in the name you'd like to call it: 192.168.1.101 laptop In the next example, we'll use the laptop nickname instead of the address, specify a different user than the one currently logged into the terminal we're copying from, and copy an entire directory instead of just one file: scp -r /home/user/pictures/ user2@laptop:/home/user2/ The -r switch means recursive, which tells scp /home/user/pictures/* laptop:/home/user/pictures/ |