Friday, May 17, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 687  / 3 Years ago, wed, october 20, 2021, 8:11:21

How can I list the largest 3 directories/files which are directly (not recursive) in my home directory using a command?


More From » command-line

 Answers
5

I found this command which is so fast with respect to other answers



du -sm * | sort -nr | head -3

[#27253] Thursday, October 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
polcomposte

Total Points: 421
Total Questions: 92
Total Answers: 109

Location: Uzbekistan
Member since Mon, Jul 20, 2020
4 Years ago
polcomposte questions
Wed, Dec 14, 22, 02:45, 1 Year ago
Sat, Apr 9, 22, 01:36, 2 Years ago
Mon, Dec 26, 22, 01:52, 1 Year ago
Fri, May 20, 22, 12:03, 2 Years ago
;