./create_symlink.sh /Volumes/super_60/github ~/github
Last active
May 6, 2025 20:31
-
-
Save sgoggins/5099aa8a9b7297258914064dc77b67fe to your computer and use it in GitHub Desktop.
Symbolic Linker
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
#!/bin/bash | |
# Usage: ./create_symlink.sh /path/to/target /path/to/link_name | |
TARGET="$1" | |
LINK_NAME="$2" | |
# Check for required arguments | |
if [ -z "$TARGET" ] || [ -z "$LINK_NAME" ]; then | |
echo "Usage: $0 /path/to/target /path/to/link_name" | |
exit 1 | |
fi | |
# Create the symbolic link | |
ln -s "$TARGET" "$LINK_NAME" | |
echo "Symlink created: $LINK_NAME → $TARGET" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment