Fix a broken symlink
- имя
symlink- образ
python:3.12-slim- таймаут
- 30с
проверка…
Задание
Fix a broken symlink
A deployment left a symbolic link at /app/shortcut that points at a
non-existing path. Fix the link so it points at /app/target.txt.
Current state
$ ls -l /app/shortcut
lrwxrwxrwx 1 root root 12 /app/shortcut -> /nonexistent
$ readlink /app/shortcut
/nonexistent
Required state
/app/shortcut must be a symbolic link whose target is exactly /app/target.txt
(an existing file).
Why
Practices reading and recreating symlinks — a daily operation when fixing
deployments where paths have moved.
Подсказки
Hints: fix a broken symlink
- Inspect the link with
readlink /app/shortcutorls -l /app/shortcut. - Recreate it:
ln -sf /app/target.txt /app/shortcut
(-s= symbolic,-f= force overwrite existing). - A working link resolves to a real file:
test -e /app/shortcut && echo ok.
Терминал
Закрывается при остановке сессии.
Последние попытки
- Загрузка…
Разовый запуск (smoke-тест)
Атомарный цикл up → check → down. Полезно для CI; без предварительной подготовки состояния проверка завершится с ошибкой.