Hello everyone. I am new to this forum and have never done scripting before (in any language). I am on Redhat 5.3. I wrote a script to locate all files over 1GB in a specific directory and it works greate if there actually happens to be a file over 1 GB. The problem is, if there isn't a file over 1GB then it just seems to report random files that aren't even in the directory I'm telling it to look it. Can someone please tell me what I'm doing wrong?
Here's a copy of the script:
find /sxplive/db -size +1G -name livenxt* -print0 | xargs -0 ls -lSh > /sxplive/rd/tmp/dbfilesize.log
cat /sxplive/rd/tmp/dbfilesize.log | mail -s "Review SXPLIVE DB file sizes" firstname.lastname@example.org