Recall & Review
beginner
What does the
-l option do in the ls command?The
-l option shows a detailed list of files and directories. It includes permissions, number of links, owner, group, size, and modification date.Click to reveal answer
beginner
What is the purpose of the
-a option in ls?The
-a option shows all files, including hidden files that start with a dot (.), which are normally not shown.Click to reveal answer
beginner
Explain what the
-h option does when used with ls -l.The
-h option makes file sizes easier to read by showing them in human-friendly units like KB, MB, or GB instead of bytes.Click to reveal answer
intermediate
What does the
-R option do in the ls command?The
-R option lists directories and their contents recursively, showing all files and folders inside subdirectories.Click to reveal answer
intermediate
How would you combine
ls options to see all files with detailed info and human-readable sizes?Use
ls -lah. This shows all files including hidden ones (-a), detailed info (-l), and human-readable sizes (-h).Click to reveal answer
Which
ls option shows hidden files?✗ Incorrect
The
-a option shows all files, including hidden ones starting with a dot.What does
ls -lh display?✗ Incorrect
-l shows detailed info and -h makes sizes human-readable.Which option lists directory contents recursively?
✗ Incorrect
The
-R option lists all directories and subdirectories recursively.What information does
ls -l NOT show?✗ Incorrect
ls -l shows metadata but not the actual content of files.How do you show all files including hidden ones with detailed info?
✗ Incorrect
ls -la combines -l for details and -a for hidden files.Describe what each of these
ls options does: -l, -a, -h, and -R.Think about what you want to see: details, hidden files, easy sizes, or all folders inside folders.
You got /4 concepts.
How would you use
ls options to list all files including hidden ones, with sizes easy to read, and detailed info?Combine the options that show details, hidden files, and human-friendly sizes.
You got /4 concepts.