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
Easily Monitor CPU Utilization in Linux Terminal With Stress Terminal UI
Viewed 1874 times since Thu, Apr 18, 2019
linux aix Killing a process and all of its descendants
Viewed 1416 times since Tue, May 5, 2020
Inxi – A Powerful Feature-Rich Commandline System Information Tool for Linux
Viewed 17651 times since Sat, Jun 2, 2018
6 rsync Examples to Exclude Multiple Files and Directories using exclude-from
Viewed 1768 times since Wed, Oct 31, 2018
SYS: Configure a local repository. local repo
Viewed 9117 times since Mon, Oct 29, 2018
RHEL: Displaying system info (firmware, serial numbers... )
Viewed 9234 times since Sun, May 27, 2018
RHEL: Extending a multipath LUN
Viewed 2276 times since Sun, May 27, 2018
How To Use the Linux Auditing System on CentOS 7
Viewed 1861 times since Fri, Apr 5, 2019
linux-training.be gives you books for free to study Linux
Viewed 3892 times since Sat, Jun 2, 2018
Understanding logrotate utility part 1
Viewed 829 times since Fri, Nov 30, 2018