12

I have a folder where i save my scripts, netbeans projects i write etc. Im tired of uploading it after every new project or every edits i make. I saw some clients but i dont want to use them.

Is there a simple command line tool where i just can pick a folder and syncs it?

lacexd
  • 601

3 Answers3

11

Try rclone

sudo apt install rclone

to configure:

rclone config

Rclone is a command line program to sync files and directories to and from many platforms including Google Drive. See the official site for a full list.

Features

  • MD5/SHA1 hashes checked at all times for file integrity
  • Timestamps preserved on files
  • Partial syncs supported on a whole file basis
  • Copy mode to just copy new/changed files
  • Sync (one way) mode to make a directory identical
  • Check mode to check for file hash equality
  • Can sync to and from network, eg two different cloud accounts
  • Optional encryption (Crypt)
  • Optional cache (Cache)
  • Optional FUSE mount (rclone mount)
wjandrea
  • 14,504
KIRAN B
  • 119
4

Grive

Grive can be considered still beta quality. It simply downloads all the files in your Google Drive into the current directory. After you make some changes to the local files, run grive again and it will upload your changes back to your Google Drive. New files created locally or in Google Drive will be uploaded or downloaded respectively. Deleted files will also be "removed". Currently Grive will NOT destroy any of your files: it will only move the files to a directory named .trash or put them in the Google Drive trash. You can always recover them.

Gdrive

gdrive is a command line utility for uploading and downloading single files to your Google Drive. This tool on its own does not do synchronization of any kind, if you want that you can use googles own tool. It is meant for one-off uploads or downloads and integration with other unix tools. One use-case could be daily uploads of a backup archive for off-site storage.

NGRhodes
  • 9,680
0

I personally like drive.

  • Easy installation, because of stand-alone binary (available from the GitHub release page, which makes the installation actually easier than what the readme describes)
  • Setup works via e.g. drive init ~/gdrive, open that URL to perform the OAuth2 web authentication, and copy credentials into prompt. The credentials are stored in that folder, so that it is a one time setup step.
  • Syncing is semi automatic: Triggered by drive pull or drive push, and it asks before making local/remote changes, which makes all I/O fully transparent (good UX).

A few more solutions are mentioned in this reddit thread.

bluenote10
  • 1,933