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
Using Kerberos security with Server for NFS
Viewed 9496 times since Wed, Jun 27, 2018
Using renice and taskset to manage process priority and CPU affinity with Linux OEL 6.4
Viewed 3517 times since Mon, Feb 17, 2020
RHCS6: Create a new Logical Volume / Global Filesystem 2 (GFS2)
Viewed 2155 times since Sun, Jun 3, 2018
Using Official Redhat DVD as repository
Viewed 11069 times since Mon, Oct 29, 2018
How to convert RAW image to VDI and otherwise
Viewed 14843 times since Wed, Oct 3, 2018
stunnel How To Encrypt Traffic to Redis with Stunnel on Ubuntu 16.04
Viewed 2020 times since Sun, Dec 6, 2020
What Is /dev/shm And Its Practical Usage
Viewed 7867 times since Tue, Mar 12, 2019
debian Debian/Ubuntu Linux: Find If Installed APT Package Includes a Fix/Patch Via CVE Number
Viewed 9359 times since Sun, Sep 23, 2018
Tunnel SSH Connections Over SSL Using ‘Stunnel’ On Debian 7 / Ubuntu 13.10
Viewed 3148 times since Fri, Sep 28, 2018
Use inotify-tools on CentOS 7 or RHEL 7 to watch files and directories for events
Viewed 13946 times since Fri, Jul 27, 2018