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
LVM: Extend an existing Logical Volume / Filesystem
Viewed 2741 times since Sat, Jun 2, 2018
Telnet – Send GET/HEAD HTTP Request
Viewed 3635 times since Mon, Feb 18, 2019
RHEL: Adding a boot entry to GRUB/GRUB2 configuration
Viewed 4955 times since Sun, May 27, 2018
Secure NTP with NTS
Viewed 8688 times since Sun, Dec 6, 2020
bash mistakes This page is a compilation of common mistakes made by bash users. Each example is flawed in some way.
Viewed 9301 times since Sun, Dec 6, 2020
CONFIGURE FOR ASM Linux
Viewed 5747 times since Sat, Jun 2, 2018
Enabling automatic updates in Centos 7 and RHEL 7
Viewed 2710 times since Wed, Oct 17, 2018
stunnel Howto A Guide to create SSL access to a HTTP-only webserver with stunnel
Viewed 2917 times since Fri, Sep 28, 2018
Linux Kernel /etc/sysctl.conf Security Hardening
Viewed 23752 times since Fri, Aug 3, 2018
Df command in Linux not updating actual diskspace, wrong data
Viewed 3083 times since Wed, May 30, 2018