Last active
August 5, 2020 08:51
-
-
Save Integralist/321700af51f3735766efe05756a88bec to your computer and use it in GitHub Desktop.
[Symlinking] #terminal #command #symlink
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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