I bought myself a wireless Netgear PC Card the other day. I’ve barely used the stationary computer since then, except for playing some EVE.
Freedom! I can move my laptop wherever I want! No trailing network cable! At least for 90 minutes or so, then I need to recharge the battery. Not exactly a stellar battery time, but I’m not really intending to use the laptop “on the go” anyway.
I also spotted three other networks in the vicinity, all of them without protection, and one who has enough sense to both use WEP and not announce his network. (Not that this stops me from finding it.)
Right now I’m in bed, and the only wire connected to my laptop is the one from my headphones.
One slight problem, now solved, was how to organize my music on the laptop. When my stationary computer is running, I can play all my music via the shared playlists in iTunes.
Copying my music to the laptop to play when I’m not at home isn’t a problem, but keeping it organized was. So I had a look at rsync.
rsync isn’t new to people who have some Unix experience. It’s an application to copy stuff from location A to location B, where A or B doesn’t necessarily have to be the computer you’re running rsync on.
I’ve used it quite a lot in Linux environments, but now I had to run it in Windows. Cygwin to the rescue!
Cygwin is essentially a Unix environment in Windows, with all the familiar shells and command line applications ported to Windows.
I only need to sync from the file server, running Linux, to my laptop, so there’s no need for an rsync service on the laptop. If you’re interested in that, here’s a good guide.
I have a batch file with the following command in it:
rsync -rtv -e ssh –stats –modify-window=1 –delete –progress echo@192.168.0.3:/mnt/data/Music/Albums/ /cygdrive/d/Albums
This will recursively copy everything in /mnt/data/Music/Albums/ on the file server to D:Albums on the laptop. Cygwin uses a pseudo-directory for different drives in Windows: /cygdrive/d/ equals D:.
The --delete flag removes any file on the destination that doesn’t exist on the source; so if I remove something from the file server, it gets deleted on the laptop as well the next time I run rsync.
Update: I had some problems with rsync checking every single file, despite them matching on the file server and the laptop. After reading the rsync man page, I found that Windows doesn’t store file dates with the same precision as Linux, so rsync saw them as possibly different due to the time difference and had to check them. Adding --modify-window=1 as an option to the rsync command solved this.
The command above has been updated to reflect my new settings.