The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 06-05-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,285
You can also use
Code:
find . -name "*.*" -size 0c -exec rm -i {} \;
"rm -i" asks you if you want to delete it or not. Works on Debian Linux and AIX at least.

Btw. that find did not work for me on Debian and AIX. If you encounter the same problem, you might try:
Code:
find . -type f -size -1 -exec rm -i {} \;