0
0
Linux CLIscripting~10 mins

find by modification time 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 modified exactly 3 days ago.

Linux CLI
find . -type f -mtime [1]
Drag options to blanks, or click blank then click option'
A0
B-3
C+3
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Using negative or plus signs which mean less or more than the days.
Confusing -mtime with other options.
2fill in blank
medium

Complete the code to find files modified less than 5 days ago.

Linux CLI
find /var/log -type f -mtime [1]
Drag options to blanks, or click blank then click option'
A5
B-5
C+5
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using positive number which means exactly that many days ago.
Using plus sign which means more than that many days.
3fill in blank
hard

Fix the error in the code to find files modified more than 10 days ago.

Linux CLI
find /home/user -type f -mtime [1]
Drag options to blanks, or click blank then click option'
A+10
B10
C-10
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using negative sign which means less than the days.
Using positive number without plus sign which means exactly that many days.
4fill in blank
hard

Fill both blanks to find files modified between 2 and 5 days ago.

Linux CLI
find . -type f -mtime [1] -a -mtime [2]
Drag options to blanks, or click blank then click option'
A+1
B-6
C-5
D+2
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong signs for the range limits.
Not combining conditions properly.
5fill in blank
hard

Fill all three blanks to find files modified exactly 7 days ago and print their names with details.

Linux CLI
find /tmp -type f -mtime [1] -exec ls [2] [3] {} \;
Drag options to blanks, or click blank then click option'
A7
B-l
C-a
D-h
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong -mtime value.
Missing or wrong ls options.