Skip to content

Instantly share code, notes, and snippets.

@danielsan
Last active July 23, 2016 19:30
Show Gist options
  • Save danielsan/3925c9829783a91de7885022b55f432c to your computer and use it in GitHub Desktop.
Save danielsan/3925c9829783a91de7885022b55f432c to your computer and use it in GitHub Desktop.
sorted by directory name and re-formatted du -hd 1 (disk user human formatted --max-depth=1)
sudo du -hd 1|perl -e 'use Data::Dumper;my %h;while(<>){if(/([\d\.]+\w)\s*(\.\/.+)$/){$h{$2}=$1;}}; for my $k(sort(keys(%h))){printf("%4s | %s\n", $h{$k}, $k)};'
@danielsan
Copy link
Author

Nomal du -hd 1

27M     ./IRPF
152K    ./libs
1.1M    ./perl
2.6M    ./octoshape
369M    ./R
1.3G        ./Xphp
377M    ./tor-browser_en-US
112K    ./hidclient
84K     ./fonts
291M    ./snappydata-0.4.0-PREVIEW-bin
2.2G        ./php
14M     ./letsencrypt
350M    ./ruby
7.7G    ./Hadoop
4.5M    ./lighttpd-1.4.35
92M     ./RaspberryPi
206M    ./go
170M    ./Xapache
2.0M    ./Amazon
221M    ./wireshark-2.0.0
1.9G    ./upsource
250M    ./eclipse-che-4.0.0-beta-13
27G     ./Android
3.6G    ./BigData
2.6M    ./lua-5.3.3
24K     ./Arduino
23M     ./drivers
8.0K    ./Kali
1.9G    ./Scala
160M    ./Netsparker
40M     ./ibus-1.5.13
11M     ./python
387M    ./MongoDB
36K     ./shu
52K     ./SeaHorse
9.2M    ./Workbench-Build119
272M    ./import.io
36K     ./c
48M     ./redis-3.0.7
54M     ./MemSQL
290M    ./apache
9.0M    ./charles
187M    ./java
3.3M    ./pyGeo
195M    ./servo
14M     ./jpeg-9a
2.7G    ./Cassandra
119M    ./js
291M    ./Google
57G .

@danielsan
Copy link
Author

danielsan commented Jul 23, 2016

Sorted and Formatted version:

2.0M | ./Amazon
 27G | ./Android
 24K | ./Arduino
3.6G | ./BigData
2.7G | ./Cassandra
291M | ./Google
7.7G | ./Hadoop
 27M | ./IRPF
8.0K | ./Kali
 54M | ./MemSQL
387M | ./MongoDB
160M | ./Netsparker
369M | ./R
 92M | ./RaspberryPi
1.9G | ./Scala
 52K | ./SeaHorse
9.2M | ./Workbench-Build119
170M | ./Xapache
1.3G | ./Xphp
290M | ./apache
 36K | ./c
9.0M | ./charles
 23M | ./drivers
250M | ./eclipse-che-4.0.0-beta-13
 84K | ./fonts
206M | ./go
112K | ./hidclient
 40M | ./ibus-1.5.13
272M | ./import.io
187M | ./java
 14M | ./jpeg-9a
119M | ./js
 14M | ./letsencrypt
152K | ./libs
4.5M | ./lighttpd-1.4.35
2.6M | ./lua-5.3.3
2.6M | ./octoshape
1.1M | ./perl
2.2G | ./php
3.3M | ./pyGeo
 11M | ./python
 48M | ./redis-3.0.7
350M | ./ruby
195M | ./servo
 36K | ./shu
291M | ./snappydata-0.4.0-PREVIEW-bin
377M | ./tor-browser_en-US
1.9G | ./upsource
221M | ./wireshark-2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment