Operating Systems

Which Linux command lists the files and directories in the current directory?

Show the answer

Correct answerB. ls

AWhy not this: Searches text for a pattern; it does not list directory contents.

BWhy this is right: Lists the files and directories in a directory, the current one by default.

CWhy not this: Prints the current working directory path, not the files inside it.

DWhy not this: Changes file permissions; it does not display anything about directory contents.

ls lists the contents of a directory. pwd only prints the path of the current directory and does not show what it contains.