Last active
April 6, 2021 11:20
-
-
Save QuynhVir/e888a8a62471954c33e730dce1983aee to your computer and use it in GitHub Desktop.
Find files that are smaller than 50 bytes then delete it
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
# Count: find . -type f -size -50c -printf 1 | wc -c | |
# `b' for 512-byte blocks (this is the default if no suffix is used) | |
# `c' for bytes | |
# `w' for two-byte words | |
# `k' for Kilobytes (units of 1024 bytes) | |
# `M' for Megabytes (units of 1048576 bytes) | |
# `G' for Gigabytes (units of 1073741824 bytes) | |
find . -type f -size -50c -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment