0

I reinstall my OS a lot, and I've learned to start backing up configs in iCloud Drive folder

The command I generally run (after searching google for the nth time):

ln -s "/Users/myName/Library/Mobile Documents/com~apple~CloudDocs" ~/icloud

Currently, this .zshrc has a lot of alias commands eg

alias sublime="/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"

I don't know how to add a global symlink / shortcut / token to this file

How can I persist the fact that ~/icloud or $icloud or ICLOUD should always refer to that path?

1
  • 1
    You could set a variable icloud="/Users/myName/Library/Mobile Documents/com~apple~CloudDocs", then refer to it as $icloud.
    – Mikel
    Dec 7, 2019 at 5:00

1 Answer 1

0

After doing a bit more research, it looks like I'm in luck given that I use zshell

bash directory shortcuts

Apparently you can export any variable eg export icloud="/Users/james/Library/Mobile Documents/com~apple~CloudDocs" and refer to it via ~icloud

1
  • How about accepting your own answer, so this question doesn't remain marked as open? Jun 18, 2020 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.