Which command is used to list all the files with extension .lst? A. ls -l *.lst B. ls lst* C. ls *.* D. ls *[lst] E. None of the above

”ls
”ls
”ls
”ls
E. None of the above” correct=”option1″]

The correct answer is: A. ls -l *.lst

The ls command lists the contents of a directory. The -l option tells ls to list the files in long format, which includes the file name, permissions, owner, group, size, and modification time. The *.lst pattern matches all files with the extension .lst.

The other options are incorrect for the following reasons:

  • Option B, ls lst*, would list all files whose name starts with lst.
  • Option C, ls *.*, would list all files in the current directory, including hidden files.
  • Option D, ls *[lst], would list all files whose name contains the character l followed by the character s.

I hope this explanation is helpful! Let me know if you have any other questions.