Skip to content

Instantly share code, notes, and snippets.

@Mexidense
Created March 17, 2022 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mexidense/aa31b3efe365a8052b37d35a7522ff3a to your computer and use it in GitHub Desktop.
Save Mexidense/aa31b3efe365a8052b37d35a7522ff3a to your computer and use it in GitHub Desktop.
Useful server commands
Look for file over 100M:
find <path> -type f -size +100M -printf 1 | wc -c
File size:
du -sh <path>
Count empty files:
find <path> -type f -size 0 -printf 1 | wc -c
Find file by name and get its size:
find . -name "<filename>" -exec ls -lh {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment