home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9c970e
)
Reverse display order for largest files/dirs
author
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 10 Jan 2020 19:29:31 +0000
(14:29 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Fri, 10 Jan 2020 19:29:31 +0000
(14:29 -0500)
so that I don't have to scroll up to see the largest even when using a
small screen.
home/lib/login_functions.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
1eaf4d6
..
5cb3709
100644
(file)
--- a/
home/lib/login_functions.sh
+++ b/
home/lib/login_functions.sh
@@
-140,8
+140,8
@@
top_commands() {
# TODO: Consider using numfmt instead of awk
tdu() {
du "$1" \
- | sort -n -k 1
-r
\
- |
head
-50 \
+ | sort -n -k 1 \
+ |
tail
-50 \
| awk '
{
size = $1
@@
-156,8
+156,8
@@
tdu() {
# Top Disk-Using Files
tduf() {
find "$1" -type f -printf '%s\t%p\0' \
- | sort -z -n -k 1
-r
\
- |
head
-z -n 50 \
+ | sort -z -n -k 1 \
+ |
tail
-z -n 50 \
| gawk -v RS='\0' '
{
size = $1
This page took
0.024098 seconds
and
4
git commands to generate.