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
ubuntu How to reset lost root password on Ubuntu 16.04 Xenial Xerus Linux
Viewed 9495 times since Tue, Dec 8, 2020
RHEL: Building a custom kernel on RHEL 6
Viewed 5493 times since Sat, Jun 2, 2018
LVM: Reduce SWAP size by removing a Logical Volume
Viewed 3583 times since Sat, Jun 2, 2018
RHCS: Install a two-node basic cluster
Viewed 11718 times since Sun, Jun 3, 2018
RHEL: Services basic management - systemd
Viewed 20360 times since Sat, Jun 2, 2018
debian Install a newer kernel in Debian 9 (stretch) stable
Viewed 2927 times since Sun, Sep 23, 2018
stunnel Howto A Guide to create SSL access to a HTTP-only webserver with stunnel
Viewed 3761 times since Fri, Sep 28, 2018
Learn how to align an SSD on Linux
Viewed 14836 times since Fri, May 15, 2020
Sample logrotate configuration and troubleshooting part 2
Viewed 10727 times since Fri, Nov 30, 2018
30 Handy Bash Shell Aliases For Linux / Unix / MacOS
Viewed 6545 times since Thu, Feb 11, 2021