0
0
Linux CLIscripting~10 mins

Command structure (command, options, arguments) 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 code to list files in long format.

Linux CLI
ls [1]
Drag options to blanks, or click blank then click option'
A-l
B-a
C-h
D-r
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.
2fill in blank
medium

Complete the command to show all files including hidden ones.

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 not hidden files.
Using -r reverses order but does not show hidden files.
3fill in blank
hard

Fix 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'
A-a
B-r
Cfile1
Dfile3
Attempts:
3 left
💡 Hint
Common Mistakes
Using options like -r when copying a single file causes errors.
Specifying wrong source filename.
4fill in blank
hard

Fill 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'
A-type f
B-name
C-iname
D-type d
Attempts:
3 left
💡 Hint
Common Mistakes
Using -type d finds directories, not files.
Using -iname matches case-insensitive but is not required here.
5fill in blank
hard

Fill 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'
A-v
B*.log
Clogs/
D-i
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the destination directory.
Using options in wrong order.