0
0
Linux CLIscripting~10 mins

find by name, type, and size 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 find files named 'report.txt' in the current directory.

Linux CLI
find . -name [1]
Drag options to blanks, or click blank then click option'
A"report.txt"
Breport.txt
C'report.txt'
Dreport
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes causes the shell to interpret the pattern incorrectly.
Using no quotes may fail if the filename contains special characters.
2fill in blank
medium

Complete the code to find directories named 'backup' anywhere under /home.

Linux CLI
find /home -type [1] -name 'backup'
Drag options to blanks, or click blank then click option'
Ad
Bf
Cl
Dx
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-type f' finds files, not directories.
Using an invalid type causes no results.
3fill in blank
hard

Fix the error in the code to find files larger than 10MB named 'data.log'.

Linux CLI
find /var/log -name 'data.log' -size [1]
Drag options to blanks, or click blank then click option'
A10
B10M
C-10M
D+10M
Attempts:
3 left
💡 Hint
Common Mistakes
Using '10M' finds files exactly 10MB, not larger.
Using '-10M' finds files smaller than 10MB.
4fill in blank
hard

Fill both blanks to find symbolic links named 'config' smaller than 1KB.

Linux CLI
find /etc -type [1] -name [2] -size -1k
Drag options to blanks, or click blank then click option'
Al
B'config'
C"config"
Df
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-type f' finds files, not links.
Not quoting the name can cause errors.
5fill in blank
hard

Fill all three blanks to find regular files named 'log.txt' larger than 5MB in /var.

Linux CLI
find /var -type [1] -name [2] -size [3]
Drag options to blanks, or click blank then click option'
Af
B'log.txt'
C+5M
Dd
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-type d' finds directories, not files.
Not quoting the filename causes errors.
Using '5M' finds files exactly 5MB, not larger.