How to separate 0kb files from the rest!!!

Hi All,

Can you please tell me how to identify a 0kb file from a list a files and redirect only those files to a .txt file.

ls -l shows me all the 0kb files...but how to redirect only those files..

Thanks for ur help,
Kumar

find . -size 0 -print > a.txt

you can use find with -size switch

find . -type f -size 0  -print > out.txt

Thanks a lot for your response Anbu and Ghostdog....it working fine....