By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,773 Members | 1,286 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,773 IT Pros & Developers. It's quick & easy.

UNIX and file size

P: 11
Hey guys.

What I need to do is this:

I need write a script to find files that have a certain filesize (for this case a file size of 0 (zero) ) I see that the cksum command will help me find the filesize. I am new to the unix environment and not too sure how ot write a script that does the following:

When I find this file with a filesize of zero I need to echo a statement that tells the user to delete it and not to delete it if the filesize is greater than zero.

I need a little direction here please.

Thanks
Dec 6 '07 #1
Share this Question
Share on Google+
2 Replies

numberwhun
Expert Mod 2.5K+
P: 3,503
Hey guys.

What I need to do is this:

I need write a script to find files that have a certain filesize (for this case a file size of 0 (zero) ) I see that the cksum command will help me find the filesize. I am new to the unix environment and not too sure how ot write a script that does the following:

When I find this file with a filesize of zero I need to echo a statement that tells the user to delete it and not to delete it if the filesize is greater than zero.

I need a little direction here please.

Thanks
Well, why not post the code that you have written thus far. Once we have seen that, we can then guide you in the right direction.

When you post code though, please be sure to use the proper code tags.

Regards,

Jeff
Dec 6 '07 #2

P: 11
I acutally figured it out. Thanks for your help Jeff.
Dec 6 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.