#!/usr/bin/env bash from=$1 to=$2 mkdir -p "$to" # użycie find z -print0, żeby prawidłowo obsłużyć spacje i dziwne znaki find "$from" -type f -print0 | while IFS= read -r -d '' i; do ln -s "$i" "$to/$(basename "$i")" done