Recent File changes Using SSH

Asked by:
HubFans / n/a Points
Time:
2015-08-10 7:12 am EST
Category:
Website Troubleshooting
Hits:
88
How would I create a cron job that periodically checks for recent file changes on my web site similar to "find /home/userna5/domains/example.com/public_html/ -type f -ctime -1 -exec ls -ls {} \;". My emails from the cron job keep saying no such file or folder.


*moderator edit: removed identifying information*

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

ScottM
Staff
16,266 Points
2015-08-10 5:16 pm EST
Hello,

Sorry to hear your code is not working when you run a cron. A cron is simply the timing of a script, it has nothing to do with the execution of the script other than kicking it off. Any errors you get for the script are code errors, not the cron itself.

Given the information provided, the path seems a bit off. That is not what our normal path structure looks like and I do not see that you customized the file structure in the manner the path represents. If you want to run something from the public_html folder, then the following would be an accurate path structure (replace userna5 with your own cPanel username):

/home/userna5/public_html/

Kindest Regards,
Scott M

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}