Skip to content

Instantly share code, notes, and snippets.

@alexzhan
Created October 30, 2010 02:05
Show Gist options
  • Save alexzhan/654805 to your computer and use it in GitHub Desktop.
Save alexzhan/654805 to your computer and use it in GitHub Desktop.
bash delete file with size 0
%to just find them and printout:
find . -maxdepth 1 -name '[!.]*' -size 0 -printf 'Name: %16f Size: %6s\n'
%delete them, may be modified to use
find . -maxdepth 1 -name '[!.]*' -size 0 -printf 'Name: %16f Size: %6s\n' | xargs rm
http://content.hccfl.edu/pollock/unix/findcmd.htm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment