Bird
0
0

What will be the output of the command ls -l in a directory containing two files named file1.txt and file2.txt?

medium📝 Command Output Q13 of 15
Linux CLI - File and Directory Operations
What will be the output of the command ls -l in a directory containing two files named file1.txt and file2.txt?
AShows only the names of files without details
BDeletes file1.txt and file2.txt
CCreates file1.txt and file2.txt
DLists detailed information about file1.txt and file2.txt
Step-by-Step Solution
Solution:
  1. Step 1: Understand the ls -l command

    The ls -l command lists files with detailed info like permissions, size, and date.
  2. Step 2: Apply to the given files

    It will show detailed info for both file1.txt and file2.txt.
  3. Final Answer:

    Lists detailed information about file1.txt and file2.txt -> Option D
  4. Quick Check:

    ls -l = detailed list [OK]
Quick Trick: ls -l means list with details [OK]
Common Mistakes:
  • Thinking ls -l deletes files
  • Confusing ls -l with file creation
  • Assuming it shows only file names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes