How can I find all the files which have been modified 50 days before?
I'm trying this:
find -maxdepth 1 -mtime -50
is it the right command to find files that have been modified in the last 50 days?
How can I find all the files which have been modified 50 days before?
I'm trying this:
find -maxdepth 1 -mtime -50
is it the right command to find files that have been modified in the last 50 days?
Use -type f
if you only want regular files. If on a GNU system, the -printf
predicate can show you the date.
find -maxdepth 1 -type f -mtime -50 -printf "%T+ %p\n"
Linux
is just the kernel, what matters here is the utilities shipped with the system. That will be different if that Linux kernel is in a Debian, OpenWRT, Android or ChromeOS system for instance. The "Linux" tag is generally not useful if the question is about a command. – Stéphane Chazelas Dec 02 '14 at 12:48