Last active
April 11, 2016 15:53
-
-
Save marlabrizel/16aa9ad4f2ce9ccb82fe6c868d5858d9 to your computer and use it in GitHub Desktop.
Bash script to symlink directories
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
SOURCE="path/to/files/you/want/to/symlink" | |
DEST="/path/to/location/where/symlinks/should/live" | |
cd $SOURCE | |
for name in $(find $SOURCE -maxdepth 1); do | |
newpath=`echo $name | cut -f 6 -d "/" ` | |
ln -s $name $newpath | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment