Skip to content

Instantly share code, notes, and snippets.

@danielcharrua
Last active October 25, 2023 08:53
Show Gist options
  • Save danielcharrua/a43f8e9cf2667b8fab1eef8e4b75d258 to your computer and use it in GitHub Desktop.
Save danielcharrua/a43f8e9cf2667b8fab1eef8e4b75d258 to your computer and use it in GitHub Desktop.
cPanel get last modified files under public_html
<?php
// Create file "find.php" inside public_html, replace the path, open in browser.
// The script will find files modified in the last 2 days.
$files_modifiied = shell_exec('find /home1/cpanel_username/public_html/ -type f -mtime -2');
echo "<pre>$files_modifiied</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment