Skip to content

Instantly share code, notes, and snippets.

@AlexNDRmac
Last active June 27, 2019 13:16
Show Gist options
  • Save AlexNDRmac/6cc76125a0ba96a7d51d3e5a26b9ff3b to your computer and use it in GitHub Desktop.
Save AlexNDRmac/6cc76125a0ba96a7d51d3e5a26b9ff3b to your computer and use it in GitHub Desktop.
shell commands

Find all files bigger then XX MB

"du -h" makes better list of files

"sort -n" makes list sorted by file size (desc)

find ./ -size +50M -type f -exec du -h {} \; | sort -k1 -h

Example output:

 14K	./text.md
 84M	./ex_output.dmg
128M	./example.dmg
353M	./macos10.14-x86_64.dmg
1.7G	./Installer.pkg
2.0G	./file.dmg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment