Skip to content

Instantly share code, notes, and snippets.

@sgoggins
Last active May 6, 2025 20:31
Show Gist options
  • Save sgoggins/5099aa8a9b7297258914064dc77b67fe to your computer and use it in GitHub Desktop.
Save sgoggins/5099aa8a9b7297258914064dc77b67fe to your computer and use it in GitHub Desktop.
Symbolic Linker

Symbolic Linker Tool

./create_symlink.sh /Volumes/super_60/github ~/github

#!/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