Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
[Script] Filesize checking - HELP!
Name: Sc0rpi0N Date: April 12, 2005 at 05:39:38 Pacific OS: OpenServer 5.0.6 CPU/Ram: Dual Xeon 2.4
Comment:
Hi everybody!
I'm trying to make a script that will do the following...
I want the script to be able to check the filesizes in a directory and if it is greater or equal to 1.5gb (1500000000) to send an e-mail to the administrator... How would I go about it?
So far I have the following, but it doesn't seem to be working... any ideas?
if [ `ls -al <directory>/* |awk '{ print $5 }'` -eq 1500000000 ] then echo "Yes!" else echo "No!" fi
The "echo's" are for testing to see if the script works, if it does I can arrange to send an e-mail to the admin, thar's not a problem.
Summary: Hi, I'm trying to create a shell script to check for the existence of a file on an NT box prior to an FTP process. If it doesn't exist then the process sleeps. Can anyone help? Thanks. Cherian ...
Summary: Hi, I need a shell script to check a dynamic ip(from cable company), it will send the ip to my email if the ip changes. The Solaris box is behind the router with a static ip (internal), the router con...
Summary: It seems that it is related to another question that you posted before this available at http://www.computing.net/unix/wwwboard/forum/6744.html . I have posted the script there. Check and let me know...