How to know all last modified files in your cPanel?

Follow the steps to know  all last modified files in your cPanel:

Step::1 Login to cPanel and open File Manager section

Step::2 Go inside your root directory i.e public_html

Step::3 Create a new php file named test.php 

Step::4 Copy the code from the below

<?php

            $edited_files = shell_exec(‘ find /home/cpanel_username/public_html/ -type f -mtime -2 ‘);

            echo “This is string : <br> <pre>$edited_files</pre>”;

            //Convert to Array

            $edited_files = preg_split(‘/s+/’, trim($edited_files));

            echo “<pre>”;

            print_r($edited_files);

            echo “</pre>”;

?>

Step::5 Paste this code in the test.php file

Step::6 Finally click over Save Changes.

Step::7 Now open your browser and hit this test.php and see the result

You will be able to see the last modified files in your cPanel.

Leave a Reply