0
0
Linux CLIscripting~20 mins

Why finding files saves time in Linux CLI - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
File Finder Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
What is the output of this find command?
You run the command find /tmp -type f -name '*.log'. What does this command output?
Linux CLI
find /tmp -type f -name '*.log'
ALists all files ending with .log in /tmp and its subdirectories
BLists all directories named .log in /tmp
CShows an error because of wrong syntax
DLists all files in /tmp without filtering by extension
Attempts:
2 left
💡 Hint
Look at the options -type and -name in the find command.
🧠 Conceptual
intermediate
1:00remaining
Why is using 'find' faster than manual search?
Why does using the find command save time compared to manually looking for files?
ABecause find only works on small folders
BBecause find deletes files automatically
CBecause find automates searching through directories quickly and precisely
DBecause find changes file names to make them easier to find
Attempts:
2 left
💡 Hint
Think about what manual searching involves versus what find does.
🔧 Debug
advanced
1:30remaining
What error does this find command produce?
What error will this command produce? find /var -name '*.txt' -type
Linux CLI
find /var -name '*.txt' -type
Afind: unknown predicate '-name'
BNo error, lists all .txt files
CPermission denied error
Dfind: missing argument to '-type'
Attempts:
2 left
💡 Hint
Check if all options have required arguments.
🚀 Application
advanced
1:30remaining
Which command finds files modified in last 7 days?
You want to find all files in /home that were modified in the last 7 days. Which command does this?
Afind /home -type f -mtime 7
Bfind /home -type f -mtime -7
Cfind /home -type f -atime 7
Dfind /home -type d -mtime -7
Attempts:
2 left
💡 Hint
Look at the meaning of -mtime and the sign before the number.
🧠 Conceptual
expert
2:00remaining
How does using 'find' improve scripting automation?
In scripting automation, why is using the 'find' command important for efficiency?
AIt allows scripts to locate files dynamically without hardcoding paths
BIt automatically fixes file permission issues
CIt replaces the need for loops in scripts
DIt compresses files to save disk space
Attempts:
2 left
💡 Hint
Think about how scripts can adapt to different file locations.