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
Linux An introduction to swap space on Linux systems
Viewed 3305 times since Thu, Jan 23, 2020
Linux - How to unlock and reset user’s account
Viewed 6049 times since Fri, Jun 8, 2018
How to Install and use Lsyncd on CentOS 7 / RHEL 7 rsync
Viewed 5505 times since Wed, Oct 31, 2018
“Too many authentication failures” with SSH
Viewed 7134 times since Mon, May 21, 2018
Linux ssh Hide OpenSSH Version Banner
Viewed 57156 times since Wed, Apr 22, 2020
ZPOOL: Grow a zpool by adding new device(s)
Viewed 6991 times since Sun, Jun 3, 2018
Linux Cluster Tutorial
Viewed 2844 times since Sat, Sep 29, 2018
Linux Find Large Files
Viewed 3679 times since Mon, Oct 29, 2018
Extending Linux LVM partitions script
Viewed 7215 times since Wed, Feb 6, 2019
ZFS: Verify/change properties of a zfs filesystem
Viewed 3483 times since Sun, Jun 3, 2018