Check if files have changed on Hypernode Magento production
We all know it is considered bad practise to edit files directly on the production server. But hey, sometimes it just sort of happens anyway.
The following script is handy to check if any files changes have been made on a Hypernode production server running Magento 2.
- Typical pitfalls will appear in the Magento and nginx folders, so we will search in those folders specifically.
- We do not want to search through media and logs, so we'll exclude those.
- We will search for any fiels altered or created within the last 24 hours (1440 minutes)
MINUTESAGO=1440;find /data/web/magento2 -mindepth 1 -type f -not -path "/data/web/magento2/var/*" -not -path "/data/web/magento2/pub/media/*" -cmin -$MINUTESAGO && find /data/web/nginx -mindepth 1 -type f -cmin -$MINUTESAGO