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
python learning
Viewed 2697 times since Wed, Dec 18, 2019
ubuntu How to Reset Forgotten Passwords in Ubuntu 16.04
Viewed 4972 times since Tue, Dec 8, 2020
How to deal with dmesg timestamps
Viewed 4908 times since Wed, Oct 3, 2018
RHEL: Displaying/setting kernel parameters - ’sysctl’
Viewed 4185 times since Sat, Jun 2, 2018
YUM CRON RHEL7: Configure automatic updates.
Viewed 2740 times since Fri, Oct 26, 2018
OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu
Viewed 3568 times since Thu, May 24, 2018
OpenSSL: Find Out SSL Key Length – Linux Command Line
Viewed 8922 times since Mon, Feb 18, 2019
How to Install and use Lsyncd on CentOS 7 / RHEL 7 rsync
Viewed 5748 times since Wed, Oct 31, 2018
Secure Secure Shell
Viewed 13232 times since Fri, Aug 21, 2020
Fałszujemy rozpoznania skanerów #2
Viewed 3738 times since Mon, May 21, 2018