find modified files within last 24 hours, minutes, etc
This is a simple one that I tend to forget when I need it most… finding files in a current directory that have been modified within the last 24 hours… while I realize my standard ls -lgat gives me a list of all files, it sucks when your doing a directory of thousands of files..
so in comes find ![]()
——
find -mtime x [where x is how many days]
or
find -mmin x [where x is how many minutes]
——
Lets see this in action on my home directory.
$ find -mmin 1
[ no files found modified within 1 minute ]
$ find -mtime 5
[ no files found modified within 5 days ]
lets create one
$ touch test
$ find -mmin 1
.
./test
Bingo.
$
This can be expanded a bit, modified files are different then the last accessed, etc.
Just a useful one.