Created
October 30, 2010 02:05
-
-
Save alexzhan/654805 to your computer and use it in GitHub Desktop.
bash delete file with size 0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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