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
Inxi – A Powerful Feature-Rich Commandline System Information Tool for Linux
Viewed 18679 times since Sat, Jun 2, 2018
chrt command: Set / Manipulate Real Time Attributes of a Linux Process
Viewed 10514 times since Mon, Feb 17, 2020
Top 10 darmowych i publicznych serwerów DNS
Viewed 2052 times since Tue, May 22, 2018
Szybkie sprawdzenie zewnętrznego adresu IP i hosta
Viewed 3111 times since Thu, May 24, 2018
SSH ProxyCommand example: Going through one host to reach another server
Viewed 12992 times since Tue, Aug 6, 2019
20 Linux Command Tips and Tricks That Will Save You A Lot of Time linux
Viewed 4280 times since Thu, Apr 18, 2019
Learn Linux System Auditing with Auditd Tool on CentOS/RHEL
Viewed 3887 times since Fri, Apr 5, 2019
How To Find Largest Top 10 Files and Directories On Linux / UNIX / BSD find
Viewed 3389 times since Mon, Oct 29, 2018
Install OpenVPN On CentOS / RHEL 7
Viewed 2731 times since Fri, May 15, 2020
RHEL: udev rules basics
Viewed 7796 times since Sat, Jun 2, 2018