Created
March 17, 2022 12:03
-
-
Save Mexidense/aa31b3efe365a8052b37d35a7522ff3a to your computer and use it in GitHub Desktop.
Useful server commands
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
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
https://linuxconfig.org/how-to-use-find-command-to-search-for-files-based-on-file-size