The find
command doesn’t directly support displaying the modification date of files. However, you can use the -exec
option with the ls
command to display the modification date along with the filename. Here’s how you can do it:
find /var/www/vhosts/ -name "*.php" -newer /tmp/start ! -newer /tmp/end -exec ls -lth {} \;
This command will find all .php files in the /var/www/vhosts/
directory and its subdirectories that were modified between the timestamps of /tmp/start
and /tmp/end
. For each file it finds, it will execute the ls -lth
command to display the file’s details in a long format with human-readable file sizes and sorted by modification time.
Please note that you might need to use sudo
before the find
command if the files require root permissions to read.