0
0
Linux CLIscripting~10 mins

ls (list files and directories) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to list all files and directories in the current folder.

Linux CLI
ls [1]
Drag options to blanks, or click blank then click option'
A-a
B-l
C-h
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -l shows details but not hidden files.
Using -h is for human-readable sizes, not listing all files.
2fill in blank
medium

Complete the command to list files with detailed information.

Linux CLI
ls [1]
Drag options to blanks, or click blank then click option'
A-a
B-l
C-r
D-t
Attempts:
3 left
💡 Hint
Common Mistakes
Using -a shows hidden files but not detailed info.
Using -r reverses order but doesn't show details.
3fill in blank
hard

Fix the error in the command to list files sorted by modification time.

Linux CLI
ls [1]
Drag options to blanks, or click blank then click option'
A-l
B-a
C-r
D-t
Attempts:
3 left
💡 Hint
Common Mistakes
Using -l shows details but does not sort by time.
Using -r reverses order but does not sort by time.
4fill in blank
hard

Fill both blanks to list files with detailed info, sorted by time.

Linux CLI
ls [1] [2]
Drag options to blanks, or click blank then click option'
A-l
B-a
C-t
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -a instead of -l misses detailed info.
Using -r reverses order but doesn't sort by time.
5fill in blank
hard

Fill all three blanks to list all files, detailed, in reversed order.

Linux CLI
ls [1] [2] [3]
Drag options to blanks, or click blank then click option'
A-a
B-l
C-t
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting -a hides hidden files.
Using -t instead of -r does not reverse order.