Last active
December 14, 2015 03:59
-
-
Save phosphene/5024972 to your computer and use it in GitHub Desktop.
find and delete large files using find, awk and system rm on ubuntu. ubuntu filename is at $8 on 10.10 but at $9 for 11
This file contains hidden or 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
find and delete: | |
find . -type f -size +10000k -exec ls -lh {} \; | awk '{cmd="rm " $9; print cmd; system(cmd) }' | |
or | |
just find and print: | |
find . -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment