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
RHCS6: Reduce a Global Filesystem 2 (GFS2)
Viewed 3529 times since Sun, Jun 3, 2018
LUKS List available methods of encryption for LUKS
Viewed 3088 times since Fri, Jul 13, 2018
Kernel sysctl configuration file for Linux
Viewed 5418 times since Fri, Aug 3, 2018
Linux - How to perform I/O performance test with dd command
Viewed 6198 times since Fri, Jun 8, 2018
How to encrypt a partition using LUKS?
Viewed 1972 times since Fri, Jul 13, 2018
10 Linux rsync Examples to Exclude Files/Directories
Viewed 11087 times since Wed, Oct 31, 2018
Testing TLS/SSL encryption
Viewed 13415 times since Thu, Jan 16, 2020
10 Linux DIG Command Examples for DNS Lookup
Viewed 11254 times since Sun, Sep 30, 2018
Manage SSH Key File With Passphrase
Viewed 2392 times since Tue, Mar 5, 2019
LVM: Reduce SWAP size by shrinking existing Logical Volume
Viewed 6373 times since Sat, Jun 2, 2018
Recently Viewed
BIND for the Small LAN