Check whether current is a symbolic link and display it as current -> releases/v3.
Which command is appropriate?
ls -l identifies a symbolic link with a leading l and displays the stored target after ->.
Detailed explanation
ls currentIncorrect. Plain ls may show only the link name.
ls -i currentIncorrect. -i shows an inode number but not the target path.
ls -s currentIncorrect. -s displays allocated blocks.
ls -l currentCorrect. ls -l current displays the link target.
Try it yourself
An example you can run in a temporary verification environment.
tmp=$(mktemp -d); mkdir -p "$tmp/releases/v3"; ln -s releases/v3 "$tmp/current"; ls -l "$tmp/current"; rm -rf "$tmp"Expected result
current -> releases/v3を含む長形式表示Key points
- Leading l means symbolic link
- The target follows ->
- -l is long format
Notes
- Environment: Linux / GNU coreutils 9.x / 一時ディレクトリ
- Use disposable files and directories for link experiments.
- Link behavior can differ for special filesystem objects and cross-filesystem operations.
Foundation review
Place the operation
Long format is useful when type and target must be inspected together; readlink is narrower.
Check the side effect
Inspect a link created in a temporary directory without modifying the target.