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.
Incorrect. Plain ls may show only the link name.
ls -i currentIncorrect. -i shows an inode number but not the target path.
Incorrect. -i shows an inode number but not the target path.
ls -s currentIncorrect. -s displays allocated blocks.
Incorrect. -s displays allocated blocks.
ls -l currentCorrect. ls -l current displays the link target.
Correct. 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 / 一時ディレクトリ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.