Created
October 23, 2015 18:58
-
-
Save vimota/6df3fafd4f4de9ee0ca7 to your computer and use it in GitHub Desktop.
Replaces all files in current directory with symlink to the same file in another directory
This file contains hidden or 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
for n in *; do | |
fi="$(find ../../../../../../../ -name "$n" | grep -v 'this_directory/')"; | |
echo $fi; | |
if [[ ! -z "$fi" ]] rm "$(basename $fi)"; | |
ln -s $fi . ; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment