Last active
January 26, 2024 07:26
-
-
Save sprobejames/5bd9111f840edd1df579b88f4d028f64 to your computer and use it in GitHub Desktop.
Linux find largest file in directory recursively
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
| # @see https://www.cyberciti.biz/faq/linux-find-largest-file-in-directory-recursively-using-find-du/ | |
| # Linux find a biggest files in / | |
| sudo du -a /dir/ | sort -n -r | head -n 20 | |
| sudo du -a / 2>/dev/null | sort -n -r | head -n 20 | |
| # Linux find large files quickly with bash alias | |
| ## shell alias ## | |
| alias ducks='du -cks * | sort -rn | head' | |
| ### run it ### | |
| ducks | |
| # Finding largest file recursively on Linux bash shell using find | |
| sudo find / -type f -printf "%s\t%p\n" | sort -n | tail -1 | |
| find $HOME -type f -printf '%s %p\n' | sort -nr | head -10 | |
| # @see https://www.tomshardware.com/how-to/find-large-files-linux | |
| # Search all filesystems for files larger than 100MB. | |
| sudo find / -type f -size +100M | |
| # Finding the 10 Largest Linux Files on Your Drive | |
| sudo du -aBm / 2>/dev/null | sort -nr | head -n 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment