Multiple choice technology programming languages

What does the command ls do?

  1. Opening a file

  2. Shows a calendar

  3. Display of the contents of a file

  4. Display of files and folders, present in the folder where you are

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The 'ls' command lists files and directories in the current location. It doesn't open files (A), show calendars (B), or display file contents (C). Option D correctly describes ls functionality.

AI explanation

The Unix/Linux 'ls' command lists the contents of the current (or specified) directory — showing the names of files and subfolders present there. It does not open a file, show a calendar, or print a file's contents; those are the jobs of commands like 'cat'/'less' (view contents), 'cal' (calendar), or an editor/opener. So 'Display of files and folders, present in the folder where you are' is the accurate description of what 'ls' does.