1
0
Fork 0

Remove weight, add doh

This commit is contained in:
Gregory Eremin 2023-02-22 13:27:23 +01:00
parent 64be233740
commit bb1e28fcb1
2 changed files with 1 additions and 16 deletions

View File

@ -1,5 +1,6 @@
# General # General
alias ll="ls -lAFh --color" alias ll="ls -lAFh --color"
alias duh="du -hs * | sort -rh"
alias dedup="awk '!visited[$0]++'" alias dedup="awk '!visited[$0]++'"
alias dfh="df -h | grep -v '/var/lib/docker\|/snap/\|tmpfs'" alias dfh="df -h | grep -v '/var/lib/docker\|/snap/\|tmpfs'"
alias ,ssh-agent-forwarding="eval \`ssh-agent\` && ssh-add ~/.ssh/id_rsa" alias ,ssh-agent-forwarding="eval \`ssh-agent\` && ssh-add ~/.ssh/id_rsa"

View File

@ -1,16 +0,0 @@
#!/usr/bin/env ruby
files = `du -k -d 1`.scan(/(\d+).*\.\/(.*)/)
maxlen = files.max_by{ |f| f[1].length }[1].length
files.sort_by{ |f| f[0].to_i }.reverse.each do |f|
name = f[1]
size = f[0].to_i
print "%-#{maxlen+1}s" % name
if size < 1024
puts "#{size}K"
else
puts "#{size / 1024}M"
end
end