ds update for FreeBSD

This commit is contained in:
2013-01-15 14:19:37 +03:00
parent 2b1c01cf09
commit c2398350c7

2
.rc
View File

@@ -98,7 +98,7 @@ function vim() {
function ds() {
du -sh "$@" | perl -e '
%byte_order = ( G => 0, M => 1, K => 2, k => 2, 0 => 3 );
print map { $_->[0] } sort { $byte_order{$a->[1]} <=> $byte_order{$b->[1]} || $b->[2] <=> $a->[2] } map { [ $_, /^[\d.]+([MGKk0])/, /^([\d.]+)/ ] } <>'
print map { $_->[0] } sort { $byte_order{$a->[1]} <=> $byte_order{$b->[1]} || $b->[2] <=> $a->[2] } map { [ $_, /^\s*[\d.]+([MGKk0])/, /^\s*([\d.]+)/ ] } <>'
}
function mkcd() {