How to find the largest files and directories in Linux?

How to find the largest files and directories in Linux?

Answer:

For example, to list out top 10 files and directories inside /opt, you can use the following command:

# du -a /opt| sort -nr | head -n 10

Attachments
There are no attachments for this article.
Related Articles RSS Feed
20 Linux YUM (Yellowdog Updater, Modified) Commands for Package Management YUM
Viewed 11920 times since Thu, Oct 25, 2018
OpenSSL: Check If Private Key Matches SSL Certificate & CSR
Viewed 3823 times since Mon, Feb 18, 2019
RHEL: Manually encrypting a filesystem with LUKS
Viewed 4555 times since Sun, May 27, 2018
watchdog How to restart a process out of crontab on a Linux/Unix
Viewed 6807 times since Tue, Jul 31, 2018
SSH: Execute Remote Command or Script – Linux
Viewed 2985 times since Mon, Feb 18, 2019
Stunnel Setup
Viewed 18760 times since Fri, Sep 28, 2018
Jak wygenerować silne hasła jednorazowe w Linuksie?
Viewed 2909 times since Thu, May 24, 2018
LVM: Extend an existing Logical Volume / Filesystem
Viewed 3115 times since Sat, Jun 2, 2018
Linux - How to get IP and MAC address of ethernet adapter in Linux
Viewed 3321 times since Fri, Jun 8, 2018
Terminal based "The Matrix" like implementation
Viewed 3206 times since Thu, Apr 18, 2019