Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to list all files in the current directory.
Linux CLI
ls [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using options that do not list hidden files
Typing options without dash
✗ Incorrect
The -a option shows all files, including hidden ones.
2fill in blank
mediumComplete the code to print the current working directory.
Linux CLI
[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ls' which lists files
Using 'cd' which changes directory
✗ Incorrect
The pwd command prints the current directory path.
3fill in blank
hardFix the error in the command to create a new directory named 'projects'.
Linux CLI
mkdir [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular form 'project'
Using option flags instead of directory name
✗ Incorrect
The directory name should be exactly 'projects' to match the requirement.
4fill in blank
hardFill both blanks to create a file named 'notes.txt' and write 'Hello World' into it.
Linux CLI
[1] [2] 'Hello World'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cat' which reads files
Using '>>' which appends instead of overwriting
✗ Incorrect
echo outputs text, and > redirects it to create or overwrite a file.
5fill in blank
hardFill all three blanks to list all files, including hidden ones, in long format sorted by modification time.
Linux CLI
ls [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-r' which reverses order
Missing the option to show hidden files
✗ Incorrect
-a shows hidden files, -l shows details, and -t sorts by modification time.