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
logrotate Log Rotate Configuration
Viewed 3019 times since Sun, Jan 12, 2020
UUIDs and Linux: Everything you ever need to know [Update]
Viewed 4802 times since Tue, Jul 17, 2018
Open SSL HowTo: Decode SSL Certificate
Viewed 5924 times since Mon, Feb 18, 2019
systemd Auto-restart a crashed service in systemd
Viewed 2834 times since Fri, Jan 17, 2020
What is yum-cron ?
Viewed 2515 times since Fri, Oct 26, 2018
Using Official Redhat DVD as repository
Viewed 10951 times since Mon, Oct 29, 2018
linux aix Killing a process and all of its descendants
Viewed 3479 times since Tue, May 5, 2020
CentOS / RHEL : Configure yum automatic updates with yum-cron service
Viewed 3386 times since Fri, Oct 26, 2018
RHEL: udev rules basics
Viewed 8068 times since Sat, Jun 2, 2018
RHEL: Resize/disable /dev/shm filesystem
Viewed 14327 times since Sun, May 27, 2018