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
IPTABLES linux
Viewed 17235 times since Sat, Jun 2, 2018
awk printf
Viewed 15536 times since Wed, Aug 19, 2020
Using stunnel and TinyProxy to obfuscate HTTP traffic
Viewed 7135 times since Fri, Sep 28, 2018
Tilix: Advanced Tiling Terminal Emulator for Power Users
Viewed 6724 times since Thu, Apr 18, 2019
Top 20 OpenSSH Server Best Security Practices - good article
Viewed 10842 times since Mon, Oct 1, 2018
OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu
Viewed 2825 times since Thu, May 24, 2018
RHCS6: Mirror/unmirror a GFS2 volume
Viewed 5396 times since Sun, Jun 3, 2018
How do I add ethtool settings to a network device permanently?
Viewed 6860 times since Mon, May 21, 2018
RHCS6: Install a two-node basic cluster
Viewed 3573 times since Sun, Jun 3, 2018
OpenSSL: Check If Private Key Matches SSL Certificate & CSR
Viewed 3331 times since Mon, Feb 18, 2019