Challenge - 5 Problems
Command Structure Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of this command?
Consider the command:
ls -l /tmp. What does the -l option do?Linux CLI
ls -l /tmp
Attempts:
2 left
💡 Hint
The
-l option in ls stands for 'long listing format'.✗ Incorrect
The -l option in the ls command shows detailed information about each file, including permissions, number of links, owner, group, size, and last modification date.
💻 Command Output
intermediate1:30remaining
What is the output of this command with arguments?
What will the command
grep -i 'hello' file.txt do?Linux CLI
grep -i 'hello' file.txtAttempts:
2 left
💡 Hint
The
-i option makes the search case-insensitive.✗ Incorrect
The grep command searches for patterns in files. The -i option ignores case, so it matches 'hello', 'Hello', 'HELLO', etc.
📝 Syntax
advanced1:30remaining
Identify the syntax error in this command
Which option shows a command with a syntax error?
Attempts:
2 left
💡 Hint
The
rm -f command requires at least one file or directory argument.✗ Incorrect
The rm -f command without specifying a file or directory will cause an error because it doesn't know what to remove.
🚀 Application
advanced2:00remaining
Which command correctly copies all .txt files from one directory to another?
You want to copy all files ending with
.txt from /source to /backup. Which command does this correctly?Attempts:
2 left
💡 Hint
The wildcard
*.txt selects all text files in the source directory.✗ Incorrect
Option C correctly copies all files ending with .txt from /source to /backup. Option C is invalid because the destination is malformed. Option C uses -r which is unnecessary for files. Option C misses the destination.
🧠 Conceptual
expert1:30remaining
What is the role of options in command structure?
In the command structure
command [options] [arguments], what is the main purpose of options?Attempts:
2 left
💡 Hint
Options usually start with a dash (-) and change how the command works.
✗ Incorrect
Options change how a command behaves, like showing more details or ignoring case. Arguments specify what the command acts on.