Vidyalelo
Computer Science · Q11

UNIX

Engineering and GATE · Computer Science · question 11

Q11

Which of the following commands is used to display the directory attributes rather than its contents?

A.
ls -l -d
Answer
B.
ls -l
C.
ls -x
D.
ls -F
E.
None of the above

Answer: Option A

Solution

Answer: Option A
Solution:
In Unix, the ls command is used to list directory contents. By using the -l option, it displays detailed information about the files and directories. Adding the -d option makes ls display the attributes of the directory itself rather than its contents.
So, ls -l -d is the correct command to display the directory attributes rather than its contents.