Use Gmail as a Linux Filesystem

Repurpose your gig of Gmail as a networked filesystem.

What I wouldn’t give for a spare gig of networked filesystem on which to stash a backup of my work in progress or as an intermediary between two firewalled systems (thus not directly reachable from one to the other).

GmailFS (http://richard.jones.name/google-hacks/gmail-filesystem/gmail-filesystem.html) puts your gigabyte of Gmail storage to work for just such a purpose. It provides a mountable Linux filesystem repurposing your Gmail account as its storage medium.

GmailFS is a Python application that uses the FUSE (http://sourceforge.net/projects/avf) userland filesystem infrastructure to help provide a filesystem and the libgmail (http://libgmail.sourceforge.net) Hack #80 library to communicate with Gmail.

GmailFS supports most file operations, such as read, write, open, close, stat, symlink, link, unlink, truncate, and rename. This means that you can use the lion’s share of your favorite Unix command-line tools (cp, ls, mv, rm, ln, grep, et al) to operate on files stored on Google’s Gmail servers.

So, what might you store on and do with the Gmail filesystem? About anything that you would with any other (possibly unreliable) networked filesystem built on a cool hack or three. Figure 6-28 shows the Firefox web browser launched from an executable stored as a message in my Gmail account.

Reading my Gmail via the Firefox web browser launched from an executable stored on the selfsame Gmail account

Figure 6-28. Reading ...

Get Google Hacks, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.