Created
November 3, 2022 14:45
-
-
Save lazar-mitrovic/b2dc570f22c91d138f6f8163558f695a to your computer and use it in GitHub Desktop.
Symlink first level of a 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
function symcp { | |
SRC=$1 | |
DST=$2 | |
mkdir -p "$DST" | |
for f in $(ls "$SRC"); do | |
echo "Symlinking $SRC/$f -> $DST/$f ..."; | |
ln -sfn "$SRC/$f" "$DST/$f" | |
done; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment