Linux · Finding & Searching Files

In find, how do -mtime -5, -mtime +5, and -mtime 5 differ, and when would you switch to -ctime instead?

Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.

Get it on App StoreGet it on Google Play

This is one card from the KnowCard library — thousands more across SAP, Linux, Python and more. In the app you get the answer, AI explanations, and cards that come back right before you would forget them. Free to start on iOS, Android or the web.

More in Finding & Searching Files

You need to locate a program's binary plus its man page and config files, not just the executable that PATH would run. Why does which fall short here, and what covers the wider set?
A colleague says locate is fast because it has an optimized filesystem-walk. What is actually the source of its speed, and what is the cost of that design?
On a modern system locate is provided by the plocate package rather than the classic tool. Where does plocate keep its database, and how do you control which directories get indexed?
When would you reach for find over locate even though find is much slower, and what does find return if you give it no search criteria?
You want find to return only directories under /etc, and separately to list files owned by the users group that changed in the last five days. How do you express each, and what does -type d exclude?
With grep, a teammate assumes -c prints the total number of times the pattern appears in a file. What does -c actually count, and what does -v do?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play