Skip to content

Instantly share code, notes, and snippets.

@rtorr
Created April 25, 2012 20:54
Show Gist options
  • Save rtorr/2493270 to your computer and use it in GitHub Desktop.
Save rtorr/2493270 to your computer and use it in GitHub Desktop.
Temporary fix for using symlinks with google drive (gdrive) on mac
Because gdrive will not actually sync symlinks from your computer to gdrive, you should temporarily do the opposite.
For example, I wanted to have a symlink from my ~/Sites directory to automatically sync with gdrive, so i did the simple command:
ln -s ~/Sites/drive ~/Google\ Drive/mSites/
That will not sync at the moment.
So instead I made a directory in gdrive and did a symlink back in my ~/Sites directory
ln -s ~/Google\ Drive/mSites/ ~/Sites/drive
@ultra
Copy link

ultra commented Dec 2, 2015

Another workaround is mounting your directory to the Google Drive folder. You can use the bind option in /etc/fstab

/your/directory /home/user/Google\040Drive/directory none bind 0 0

(\040 is the space character in fstab)

@haraldox
Copy link

@ultra haven't tried it but kudos for that creative idea!! :)

this handy little app by whiz kid Sebastian somehow miraculously works too like a charm, although it reverses the general concept of symlinks (creates alias from target to source, instead of the other way around): http://www.zibity.com/macdropany.html

see also CLI apps hln selkhateeb/hardlink as well as qwzybug/hln, the latter cribbed from

http://stackoverflow.com/questions/1432540/creating-directory-hard-links-in-macos-x

if the several "Mount as disk" apps out there (comprehensive open source and commercial app list to follow) would actually show the real space quota (looking at you Expansys, WebDrive) or would offer an actual decent trial (SyncMate) then that would be awesome, because files are synced directly to the cloud without being cached on disk! OSS solutions include WingFS, OSXFuse (via cloud provider plugins), ... I'm sure there's others as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment