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
@ariofrio
Copy link

Please, please, sync symlinks as symlinks!

@jDeppen
Copy link

jDeppen commented Feb 22, 2013

I wanted to sync my desktop without putting everything in a folder (and thus out of sight).

I created a folder named "Desktop" in my Google Drive folder, moved files from my system Desktop into the new folder, deleted the (now empty) system Desktop folder (sudo terminal command below) and then created a symlink (ln -s below) which showed all my files on my desktop. So far so good.

sudo rm -rf ~/Desktop
ln -s ~/Google\ Drive/Desktop ~/

@oojacoboo
Copy link

3 years later, same issue. I don't think this is going to get "fixed".

@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