Yahoo
Skip to main content
Advertisement
Advertisement
Advertisement
Advertisement

I stopped using the official Google Drive app and switched to this simple terminal tool

A terminal showing the rclone sync command in action on a colorful, wavy background.

Google Drive's free online storage is a popular, convenient way to share files across devices and keep copies in the cloud. As the backend store for Google Docs, Gmail, and Google Photos, it's a service that many of us use, whether we like it or not—whether we even give it a moment's consideration.

But the app is far from perfect: at 350MB, it's taking up quite a lot of space just to keep some files in sync. It also replicates the web app's UI, which means Google's Material Design language, and a decidedly non-native feel. Worse yet, the app isn't available for Linux. Maybe there's a better way?

Rclone, a command-line cloud storage manager

It works great for Google Drive, but supports a host of additional providers

Unless you have strong privacy concerns, Google Drive is an ideal location for your documents, project files, scripts—pretty much any file, especially those that you might want to access from more than one machine.

Advertisement
Advertisement

Rclone will help you sync or access those files from your desktop, much like rsync helps you copy files locally or over a network . You can download it for macOS, Windows, or a variety of Linux distributions. While you can install it using a package manager, there's little need to because the download is just a single executable.

Once installed, you can run the rclone command. The tool has many separate subcommands; check out the full list by running rclonewith no arguments:

Rclone's usage lists many individual commands including about, archive, checksum, and copy.

Initially, you'll want to run rclone config, which will kick off an interactive process to get you set up. This is quite lengthy and produces a lot of output, but the defaults are mostly OK to go with. Look out for the initial storage option and make sure to pick "drive"—otherwise, you can leave most settings blank or at their defaults.

When asked for a name for your remote (Google Drive), try picking something short and easy. You'll be typing this value with almost every rclone command, so something like "gd" is probably a better pick than "googledrive."

The interactive rclone config process, requesting a type of storage to configure.

Listing, copying, and syncing files

It's easy to transfer files between Google Drive and another machine

Once you've got rclone up and running, you can test its basic operation with a command to list the top-level directories in your Google Drive:

Make sure to use the remote name that you configured earlier, followed by a colon.

The rclone lsd command showing a list of 5 folders alongside their modification dates.

You're very likely to encounter an error that reads "This remote uses rclone's shared Google Drive client_id, which is being retired and will stop working during 2026." There's a guide explaining how to make your own client ID, which I highly recommend following; this approach is much more responsive.

Advertisement
Advertisement

Rclone has a whole host of listing commands with slightly different uses. Many of these are similar to the different modes of ls, for listing local files .

The rclone ls command showing a complete list of files underneath the given directory.

The lsjsoncommand demonstrates a particular advantage of this entire approach, providing structured data in JSON format that you can use to automate all sorts of tasks relating to your shared files.

Once you've identified a file or directory you want to download, you can do so with the copy command. Use it like this to download the contents of a directory named docs to your current directory:

You'll need to quote the argument if it contains spaces, e.g. rclone copy 'remote:My Docs'.

Advertisement
Advertisement

You can also copy individual files. After working on one, or creating a new file you wish to store remotely, you can copy it up to the remote like this:

Alternatively, you can choose to sync files. This is very similar to copy, with one very important difference: it can delete files on the destination. In other words, rclone sync source remote:destinationwill make the required changes to the destination, ensuring that it is identical to the source.

Since it's so dangerous, it's wise to go slowly with this command. Use the --interactiveoption to see a list of options each time a file is copied or deleted. With a key press, you can approve a file copy, skip it, or quit the process altogether.

The --progressoption gives you details of transfer speed and bytes sent for each file during the sync process. It's a great way of keeping an eye on longer transfers involving large sets of files.

The rclone program with the --progress option showing transfer speed and size for a file.

Despite strong first impressions, Rclone does have its quirks

At the beginning, I described the Google Drive app as far from perfect, and I still maintain that. But rclone is also not without its faults. It does involve a bit of setup, and the command-line program doesn't particularly stick to conventions.

Advertisement
Advertisement

However, as a quick and easy method of syncing files, it's a must-have. Anything that lets me cut down on heavyweight apps, with plenty of potential for scripting and extending to other services in the future, is a win in my book.

Advertisement
Advertisement
Mobilize your Website
View Site in Mobile | Classic
Share by: