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
LUKS List available methods of encryption for LUKS
Viewed 1263 times since Fri, Jul 13, 2018
20 Practical Examples of RPM Commands in Linux rpm
Viewed 6104 times since Mon, Feb 18, 2019
CentOS / RHEL : How to move a Volume Group from one system to another
Viewed 1803 times since Mon, Jan 28, 2019
RHEL: Force system to prompt for password in Single User mode
Viewed 4035 times since Sat, Jun 2, 2018
ubuntu How to Reset Forgotten Root Password in Ubuntu
Viewed 790 times since Tue, Dec 8, 2020
10 Linux rsync Examples to Exclude Files/Directories
Viewed 9681 times since Wed, Oct 31, 2018
LVM: Reduce SWAP size by shrinking existing Logical Volume
Viewed 4746 times since Sat, Jun 2, 2018
Manage SSH Key File With Passphrase
Viewed 1242 times since Tue, Mar 5, 2019
INSTALACJA MIB SNMP W SYSTEMIE CENTOS/RHEL 6
Viewed 10477 times since Fri, Nov 30, 2018
stunnel basics and pki standards
Viewed 8162 times since Fri, Sep 28, 2018