PDA

View Full Version : [SOLVED] cron job understanding



BrianBlaze
August 15th, 2012, 03:42 PM
I need to understand coding better... I have a cron job that is using vnstat... I am curious what is going on, I hope someone can help...



if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ]; then /usr/bin/vnstat -u; fi


Thank you

BrianBlaze
August 15th, 2012, 05:07 PM
If "/usr/bin/vnstat" exists and is executable, and the number of files in "/var/lib/vnstat/" is equal to or greater than one, then run the program "/usr/bin/vnstat" with the update flag...

I love answering my own questions lol