find . -mtime -1
  • -mtime -n = finds the files and directories modified less than n days ago
  • -mtime +n = finds the files and directories modified more than n days ago
  • -mtime -n = finds the files and directories modified less than n days ago
  • -type f = if we want to limit the searching only to files, excluding directories, we need to add the -type f expression
  • -newermt ‘yyyy-mm-dd’ = get the files that have been changed earlier than the specified date
find /home/sports -type f -mmin +120

Leia kindlas kaustas 2 tundi (2*60) min tagasi

find . -type f -newermt 2019-07-24 ! -newermt 2019-07-25

Leia failid, mida on muudetud kindlal päeval (2019-07-24).


Viited:

https://www.baeldung.com/linux/recently-changed-files