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
ZFS: Remove an existing zfs filesystem
Viewed 2340 times since Sun, Jun 3, 2018
debian How to check Debian CVE status using python script
Viewed 3807 times since Sun, Sep 23, 2018
Linux Proxy Server Settings – Set Proxy For Command Line
Viewed 3975 times since Mon, Feb 18, 2019
RHEL: Reinstalling Boot Loader on the Master Boot Record (MBR)
Viewed 3669 times since Sun, May 27, 2018
rabbitmq Troubleshooting TLS-enabled Connections
Viewed 2751 times since Sun, Dec 6, 2020
Linux: Disks diagnostic using smartctl
Viewed 15389 times since Wed, Jul 25, 2018
How To Create a Linux Swap File
Viewed 2725 times since Fri, Jun 8, 2018
Secure Secure Shell
Viewed 11241 times since Fri, Aug 21, 2020
Top 20 OpenSSH Server Best Security Practices - good article
Viewed 10925 times since Mon, Oct 1, 2018
What UUIDs can do for you
Viewed 1988 times since Tue, Jul 17, 2018