Distinguish scripts, run.sh, and latest with short output.
Add type indicators such as @ to symbolic-link names.
Which GNU ls option is appropriate?
ls -F or --classify appends indicators for item types; symbolic links receive @.
Detailed explanation
ls -FCorrect. ls -F appends type indicators to names.
Correct. ls -F appends type indicators to names.
ls -iIncorrect. -i displays inode numbers.
Incorrect. -i displays inode numbers.
ls -sIncorrect. -s displays allocated blocks.
Incorrect. -s displays allocated blocks.
ls -lIncorrect. -l provides long metadata rather than suffix indicators.
Incorrect. -l provides long metadata rather than suffix indicators.
Try it yourself
An example you can run in a temporary verification environment.
tmp=$(mktemp -d); touch "$tmp/file"; ln -s file "$tmp/latest"; (cd "$tmp" && ls -F latest); rm -rf "$tmp"Expected result
latest@Key points
- -F means classify
- @ marks a symbolic link
- / marks a directory
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.