LFCS · Question #721
Which of the following file permissions belong to a symbolic link?
The correct answer is C. lrwxrwxrwx. Symbolic links are identifiable by the leading character 'l' in the file's permission string when listed with ls -l.
Question
Options
- A-rwxrwxrwx
- B+rwxrwxrwx
- Clrwxrwxrwx
- Dsrwxrwxrwx
How the community answered
(53 responses)- A2% (1)
- B4% (2)
- C92% (49)
- D2% (1)
Why each option
Symbolic links are identifiable by the leading character 'l' in the file's permission string when listed with `ls -l`.
The `-` (dash) as the first character indicates a regular file, not a symbolic link.
The `+` (plus) sign is not a valid first character for a file type indicator; it typically appears at the end of permissions to denote extended ACLs.
In the standard Unix/Linux long listing format, the first character of the permission string indicates the file type. A lowercase 'l' (as in `lrwxrwxrwx`) specifically denotes that the entry is a symbolic link.
The `s` (lowercase s) as the first character indicates a socket file, not a symbolic link.
Concept tested: Symbolic link file type indicator
Source: https://man7.org/linux/man-pages/man1/ls.1.html
Topics
Community Discussion
No community discussion yet for this question.