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
RHEL: How to rebuild and/or patch a RPM package
Viewed 8827 times since Sat, Jun 2, 2018
RHEL: Handling SCSI disks
Viewed 12571 times since Sun, May 27, 2018
LVM: Reduce an existing Logical Volume / Filesystem
Viewed 3624 times since Sat, Jun 2, 2018
RHEL : How to deal with “CLOSE_WAIT” and “TIME_WAIT” connection
Viewed 26353 times since Thu, Feb 14, 2019
Easily Monitor CPU Utilization in Linux Terminal With Stress Terminal UI
Viewed 4181 times since Thu, Apr 18, 2019
Linux: Disks diagnostic using smartctl
Viewed 15192 times since Wed, Jul 25, 2018
Setting up encrypted tunnel using stunnel
Viewed 2572 times since Fri, Sep 28, 2018
Deskshare TLS over Stunnel
Viewed 2858 times since Fri, Sep 28, 2018
Learn how to align an SSD on Linux
Viewed 12573 times since Fri, May 15, 2020
RHCS6: Quorum disk and heuristics
Viewed 4293 times since Sun, Jun 3, 2018