Path to user directory when username is unknown

by Josh   Last Updated September 11, 2019 16:12 PM - source

Some colleagues and I have our cloud storage (e.g. Dropbox) syncing to our macs.

The local path to a particular folder in our synchronised cloud storage looks like /Users/{$USERNAME}/CloudSync/Projects/Hello World/

When we share links with each other we currently share the links provided by our cloud service which opens the app or website to view them. It would be great if we could just share a path to our local copies with each other, but obviously I don't want to have to manually type their usernames into the path each time. Is there some sort of alias for username that can be used instead?



Answers 1


The standard path to /Users/[current user] is tilde ~

So the path to /Users/{$USERNAME}/CloudSync/Projects/Hello World/ for any user is

~/CloudSync/Projects/Hello World/

Tetsujin
Tetsujin
September 11, 2019 15:47 PM

Related Questions




Missing "Move to Dropbox" contextual menu option

Updated August 11, 2016 08:05 AM


Remove "move to dropbox" menu in Finder

Updated August 22, 2018 21:12 PM