Skip to content

Instantly share code, notes, and snippets.

@Integralist
Last active August 5, 2020 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Integralist/321700af51f3735766efe05756a88bec to your computer and use it in GitHub Desktop.
Save Integralist/321700af51f3735766efe05756a88bec to your computer and use it in GitHub Desktop.
[Symlinking] #terminal #command #symlink
# ln -s <real_path> <fake_path>
# for example, if we want ./lib to point to the real directory in ../../lib/go
ln -s ../../lib/go ./lib
# IMPORTANT!
#
# Don't add trailing / to the fake_path
# otherwise the shell will tell you fake_path doesn't exist.
# REAL EXAMPLE
#
# I have the directory ~/Code/Go in which I've created a directory called "go-flags"
# Any time someone goes to lookup ~/go/src/github.com/integralist/go-flags (such as when go code imports a package!)
# Then I want them to be directed to ~/Code/Go/go-flags
cd ~/go/src/github.com/integralist
ln -s ~/Code/Go/go-flags ./go-flags
ls -laGpFHh
# go-flags@ -> /Users/markmcdonnell/Code/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment