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
8 Vim Tips And Tricks That Will Make You A Pro User
Viewed 4132 times since Fri, Apr 19, 2019
HowTo: Create CSR using OpenSSL Without Prompt (Non-Interactive)
Viewed 15523 times since Mon, Feb 18, 2019
Linux PAM configuration that allows or deny login via the sshd server
Viewed 2877 times since Wed, Oct 3, 2018
RHCS6: Extend an existing Logical Volume / GFS2 filesystem
Viewed 4291 times since Sun, Jun 3, 2018
Using Kerberos security with Server for NFS
Viewed 11585 times since Wed, Jun 27, 2018
How to encrypt a partition with DM-Crypt LUKS on Linux
Viewed 9315 times since Fri, Jul 13, 2018
Nagrywanie sesji SSH do pliku
Viewed 3762 times since Thu, May 24, 2018
linux-training.be gives you books for free to study Linux
Viewed 5793 times since Sat, Jun 2, 2018
Linux - How to monitor CPU usage
Viewed 7388 times since Fri, Jun 8, 2018
UUIDs and Linux: Everything you ever need to know [Update]
Viewed 5977 times since Tue, Jul 17, 2018