Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to list files in long format.
Linux CLI
ls [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -a shows hidden files but not detailed info.
Using -h shows sizes in human-readable form but needs -l for details.
✗ Incorrect
The -l option shows files in long listing format.
2fill in blank
mediumComplete the command to show all files including hidden ones.
Linux CLI
ls [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -l shows details but not hidden files.
Using -r reverses order but does not show hidden files.
✗ Incorrect
The -a option lists all files, including hidden files starting with a dot.
3fill in blank
hardFix the error in the command to copy file1 to file2.
Linux CLI
cp [1] file2 Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using options like -r when copying a single file causes errors.
Specifying wrong source filename.
✗ Incorrect
The command copies file1 to file2. The source file must be specified without options.
4fill in blank
hardFill both blanks to find all .txt files in the current directory.
Linux CLI
find . [1] [2] '*.txt'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
-type d finds directories, not files.Using
-iname matches case-insensitive but is not required here.✗ Incorrect
-type f limits results to files, and -name '*.txt' matches files ending with .txt.
5fill in blank
hardFill all three blanks to move all .log files to the logs directory.
Linux CLI
mv [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the destination directory.
Using options in wrong order.
✗ Incorrect
The -v option shows what is moved, *.log selects all log files, and logs/ is the destination directory.