How can I list the files changed in a directory yesterday via the command line?
I would like to list all files with modification dates for the last n days (or even just after Ymd) in a directory. It should work recursively and across all subdirectories.
How can i do this?
Ideal way out:
file.txt Mar 26 15:15
file2.txt Mar 27 01:15
Valid output:
file.txt
file2.txt
Answered! (Thanks for the help)
$ find . -type f -mtime -1 -exec ls -lah {} \;
-rw-r--rw- 1 apache apache 18K Mar 26 08:22 ./file1.txt
-rw-r--rw- 1 apache apache 12K Mar 26 09:23 ./dir1/file2.txt
-rw-r--rw- 1 apache apache 16K Mar 26 10:24 ./dir1/dir2/file3.txt
+3
source to share
3 answers