3 Aug 2021

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.


1 comment:

  1. How To Get Current Date And Time By Country Name With Ajax in Laravel

    We can get current date and time by any country name using controller, Jquery and Ajax response. Here we use date function and give some format of the date i want and pass the result via json to the ajax and finally you can see the format..

    For More Info:- How To Get Current Date And Time By Country Name With Ajax in Laravel

    ReplyDelete