Using find to locate files modified within yesterday
问题 I would like to get a shell command to find the files with a modification date for yesterday — 24 hours only. That means I would like to find the files which were modified yesterday only. 回答1: Use find with mtime and daystart , it will find files modified 1*24 hours ago, starting calculations from midnight (daystart): find dir -daystart -mtime 1 回答2: This answer assumes you have GNU date and find. It also assumes that if you run the script at any time on 2016-07-14, you want the files