Рассмотрим папку
Код: Выделить всё
barКод: Выделить всё
mkdir bar
Код: Выделить всё
ln -s bar foo
# It will be now: foo -> bar
Код: Выделить всё
lnКод: Выделить всё
ln -s bar foo
# Instead of showing error of existing link
# the command creates a faulty link 'bar/bar'
Код: Выделить всё
if [[ ! -d foo ]]; then
ln -s bar foo
fi
Код: Выделить всё
lnКод: Выделить всё
lnИсточник: https://stackoverflow.com/questions/781 ... ifferently
Мобильная версия