Log in

Using rsync on OS X

OS X includes rsync (v. 2) by default. Rsync is terribly useful for copying files, either between local drives or across networks. Across networks, by default it uses ssh to secure data transmission, and it uses checksums to verify that data wasn't corrupted in transmission (which is why I prefer it to, say, sftp or scp).

Rsync also automagically recurses through directories and sub-directories. But, this can be a problem on OS X, because the OS X file manager litters dot-files all over the place, e.g., “.DS_Store” will show up in every drive you mount. Since rsync isn't built for OSX, it considers these things regular files, and replicates them along with everything else. Which is not a problem, per se, but it is pointless and I find it annoying. But, you can use the exclude option in rysnc to ignore those files, e.g., “--exclude=\".??*\"”.

Another problem with using rsync on OS X is that it doesn't automatically prevent the system from going into sleep mode when there's an rsync transfer on-going. This you can overcome using the built-in utility caffeinate.

So, based on all that, here is what I've currently got in my OS X .profile file:

alias Rsync=$'caffeinate -is rsync -aPWIh --size-only --exclude=\".??*\"'

The “-is” options for caffeinate tell it what sorts of sleep to prevent—and, admittedly, I'm not sure if I really need both of those, but it works. I briefly cover the rsync options at the bottom of this post.

What rsync expects after all the options is “[source host/folders] [destination host/folders]”. Exactly how you specify those can be complicated, so check the documentation for rsync.

You can also stick additional rsync options in front of the [source files]. Typically, I always first do a “dry run” by specifying “-n”. The dry-run displays everything that rsync thinks you want it to do, without actually doing any of it (which can be particularly important if you use any of the “delete” options that rsync has). It also is a way to make sure you've correctly specified any remote hosts.

I use rsync to move files from my shiny Macbook to external drives, to USB flash drives, to NAS devices, to iOS devices, to local servers, to servers out on the intarwebs, etcetcetc. To say that rsync is widely supported doesn't entirely explain just how widely supported it is. Suffice it to say, if something uses the linux kernel, chances are that it either already has rsync installed (though, you may need to turn it on), or someone has already ported rsync to it and all you have to do is install it.

Summary of the rsync options

The rsync options are “archive”, “display progress”, “whole file only” (instead of determining and transferring only the parts of each file that are different between source and destination—see the rsync documentation for details), “ignore time-stamps” (which is usually how rsync identifies files that have changed), and “human-readable units” (i.e., use “MB” instead of “blocks”). The “--size-only” flag goes with the “-I” flag. It tells rsync to check the size of a file that is both on the source and the destination to determine if it has changed.

I disable the use of time-stamps for identifying changed files because I don't want to futz with getting the clocks synchronized on all my various computerators and devices. I disable the fancy algorithm for only sending the parts of files that have changed because the NAS devices I have are limited more by their CPU than by network speeds.

Note: I've made this world-viewable, so I've turned on comment screening. (I can guarantee at least one spammer will post a reply. Probably in Русский.)


networksetup -printcommands

One thing I find very annoying about using a MacBook is that when I do a web search to troubleshoot a problem, or find out how to adjust things, I inevitably get a huge number of links to pages that describe what GUI widget to fiddle with, and how to fiddle it. Which are mostly useless, because I can find the widgets on my own (most of the time), and they almost never offer the level of control I want.

I need to figure out the magic keywords that will get me links to pages that have information on command-line and configuration-file ways of doing things on OSX.

Until that time, here's some command-line info I'm dumping into a webpage to make it easier to search through:Read more...Collapse )

(Note: I've made this post viewable by anyone; I've therefore turned on comment screening.)

RockBox oddity

I hadn't attached my Sansa Clip+ running RockBox to a Windows comnputer until this morning. It didn't go well. Not only did Windows not recognize the device, but the player itself froze.


Turns out you can unfreeze it by holding down the on/off button for 20 seconds. That's the easy part. The problem with connecting to Windows, apparently, is that RockBock only supports MSC mode for USB connections, but annoyingly enough, you can't set that in the RockBox firmware. You have to reboot the device into the Sansa firmware to set the USB mode. (You boot into the OEM firmware by holding down the left navigation button while turning it on.)

I can't recall it had to set the Clip+ to MSC mode to install RockBox. Since I did it through Fedora, it may have auto-switched to MSC, and that's why I had to force it into MSC now. I read somewhere that installing RockBox wipes the OEM firmware settings, so even if I had set the thing to MSC in order to install RockBox, I still would have had to boot back into the OEM firmware and force MSC mode.

I don't recall that being in the installation instructions for RockBox. If it isn't, it should be.
  1. Force MSC
  2. Install RockBox
  3. Boot into Sansa firmware
  4. Force MSC
  5. Boot into RockBox

RockBox really is better

I've got a little Sansa Clip+ that I've been using to listen to audiobooks while commuting to class. One feature it doesn't have that I want is a setting for the audio balance. So, today I installed RockBox firmware on the thing.

I really like RockBox. If you've any Sansa audio devices that support it, I highly recommend that you install it. There's all kinds of eye-candy features to RockBox, and a certain amount of "because we could" silliness—thus you can play the first level of Doom! on some devices, such as my Sansa E200.

The features I like most that RockBox has that the stock firmware lacks:

Audio balance setting — I like to have a canalphone in only one ear, so I can still hear what's going on around me; it's not only useful for announcements and sirens, but also for people talking at you.
Bookmarking — Being able to mark your spot in the middle of a track is invaluable with the long tracks of audiobooks and podcasts.
Time-skipping — You can change track-skipping to time-skipping; again, given the long tracks of audiobooks and podcasts, being able to skip 3 minutes at a time is a lot more useful than skipping entire tracks.
Rewind on resume — Often, I stop listening while I fiddle around trying to pause the player. With this feature, when I start it playing again, it goes back in the track a little ways, to pick up where I stopped listening, not where it stopped playing.
Custom fonts — My up-close vision is wonky (long story), so being able to use a larger font is great.
Custom "while playing screen" — Not only can you use a larger font, you can also customize what information to display while a track is playing. I find minimalist displays easier to read.
More louder — Apparently there's some EU regulation that forced Sansa to cap the output power on the Clip+, to prevent hearing loss or summat. The latest official firmware lets you set the location to "North America" and disable that ceiling, but apparently there's another ceiling, because RockBox will put out even more power than the latest firmware. And, yes, I need the extra power sometimes to overcome the ambient noise of Chicago, especially given the mediocre recording quality of some of the things I listen to. And the mediocre efficiency of some of earbuds I use with the Clip+.

Sansa makes a pretty good media player. But, so far, I've found that they're greatly improved by running RockBox firmware. IF you care, apparently RockBox currently supports the Sansa: c200, e200, e200v2, e200R, Clip, Clip+, Fuze.

Posted via LiveJournal app for iPad.

Google wants to manage your music. Fine; go for it guys.

But here's the thing: there is an app in the Chrome WebStore for the Google music player thingy. And that installs fine. But you have to upload music into your library, right? Well, to do that, you gotta use their "music manager" application.

Which, of course, you can't install on a Chromebook. And while that's annoying, I do accept that Chromebooks are not laptops, and therefore can't do everything with one. I understand why I can't install this "music manager" application that's required to upload music into one's library on Google Play.

But what really freakin' hacks me off is that there isn't anything on the Google Play website that just tells me that. I click on "upload music" and it wants me to download this app. I go to do that and it gives me options to download Ubuntu .deb files or Fedora .rpm files. Neither of which will do a damn thing on a Chromebook.

Really? Google can't freaking figure out that I'm hitting this site from a Chromebook, and therefore tell me, "Sorry, no can do, boss!" Are the folks at Google Play aware that Google is selling these gorram Chromebooks? It's not the lack of function that's a problem, it's the lack of support/respect. Just tell me that it won't work! Don't make me figure it out on my own, fer chrissake!

Is Hell in Michigan, or Belgium?

I highly recommend the movie "In Bruges" from back in 2008. I never got around to seeing it until now.

The plot is familiar in form, if not the details. It's a gratuitously twisty tale of hired killers.

Brendan Gleeson does a really good job as one of the lead characters, and has a few really, really amazing scenes near the end of the film.

Colin Farrell plays the other lead. And while I tend to like him in movies, truth be told, he couldn't act his way out of a wet paper bag. Happily, in this movie he's playing a lovable but stupid Irishman. Meaning: the role doesn't really require him to act.

What "In Bruges" lacks in subtly, it makes up for in tidiness. Check it out.

(Random thought for the day: I'd like to see a buddy comedy with Brad Pitt and Colin Farrell. With lots of physical comedy, though not of the slapstick sort. There's an early scene in this flick where Farrell's character has a run-in with some American tourists that's an example the kind of physical comedy I'm talking about.)

"surveillance backdoors"

... Furthermore it recognised that a China-only version of its service involved certain chats being stored and uploaded to the local authorities in compliance with the country's laws.

Surveillance efforts

Beyond China, several governments have signalled they want to have access to Skype data.

The UK's draft Communications Data Bill suggests internet service providers retain information about their subscribers' use of Skype and other internet communications tools.

The Cnet news site reported last year that the FBI had drafted an amendment to US law which would require Microsoft and other net chat tool providers to create surveillance backdoors in their products.

More recently the netzpolitik.org blog published what it said was a leaked document from Germany's government stating that its Federal Criminal Police Office was working on surveillance software to allow it to track Skype and other data communications. It said the agency hoped to have it ready by 2014.

An expenditure report by the country's Ministry of Home Affairs suggests the local authorities have already spent money to try to monitor Skype using third-party software. BBC News

Will people in the future look back on the early days of the intarwebs and wonder at how we squandered the freedom and anonymity on pr0n and mp3s?


Just in time for those holiday parties

Easy Chocolate Cheesecake

1.5cupscrushed chocolate graham crackers
6tbspbutter, melted

Heat oven to 325°F

Mix cracker crumbs and sugar
Mix in butter
Press onto bottom of 9-inch springform pan
Bake 10 minutes
(Put another pan on the rack below the springform pan—sometimes the butter leaks out)

3pkgcream cheese, softened (8-ounce packages)
1.5cupssemi-sweet chocolate chips, melted, cooled

With electric mixer, beat cream cheese, sugar and vanilla until well blended
Add chocolate and mix well
Add eggs, 1 at a time, mixing on low speed just until blended
Pour over crust

Bake 45 to 55 minutes or until center is almost set
(I have no idea what “almost set” is)

Run knife around rim of pan to loosen cake
Cool completely before removing rim
Refrigerate at least 4 hours

I went and saw Argo yesterday. It's nothing spectacular, but it's a good movie. If you want to just get out and go see a movie, you won't regret choosing it.

This may be coming off as "damning with faint praise", but that's not my intent. It's just that the TV commercials I've been seeing for it include these quotes from reviews that are just over-the-top. I think they led me to expect more than it delivered. Which is unfortunate, but there it is.

Ben Affleck seems to be getting better at picking movies to work on. Or maybe he's just getting more control of them. He directed Argo, in addition to playing the lead (a guy who is Hispanic, but, hey, Charlton Heston once played a Mexican so why not?). Affleck also directed and starred in (and co-wrote) The Town, a movie that's worth going out of your way to see.

He didn't star in the first full-length feature he directed, Gone Baby, Gone, a movie that's too ambiguous for most people. Or, at least it should be, but let's not go into that right now, 'k?

Posted via LiveJournal app for iPad.