'lsof' doesn't work in cronjob
I have the following example script set up in a cronjob that runs every minute:
lsof > /root/file
* * * * * /root/lsof.sh | tee /root/thisfile
After every minute, the file '/root/thisfile' is created but there is nothing in it. No matter how many different ways I try I cannot get the output of 'lsof' to show up when running in a cronjob.
Try specifying the full path to lsof inside your script.
I figured that as the script was being run by root whose path includes /usr/sbin that it would have run.
Thanks for your help.... It's been a long day.
|All times are GMT -5. The time now is 04:45 AM.|