i managed to further improve the loop:
clear
while true
echo \e\[H
du -h (ls -tr) | tail -20 | sed -e 's/^/'\e'\[K/' | cut -c -(math (tput
cols) - 2)
echo \e\[0J
sleep 2
end
and for anyone interested in the details i wrote it up on my dev-log:
http://societyserver.org/mbaehr/wat
On Tue, Sep 17, 2013 at 10:58:15AM -0700, Andrew Kreps wrote:
> If I'm reading that right, you're trying to get a list of your top 20
> largest folders? What does 'watch' do?
not the 20 largest, but the 20 last modified.
the bash/watch commands sorts them alphabetically, i want to sort by time.
If I'm reading that right, you're trying to get a list of your top 20
largest folders? What does 'watch' do?
On Tue, Sep 17, 2013 at 9:47 AM, Martin Bähr
wrote:
> hi,
>
> i am trying to convert the following watch command to fish:
>
> watch "(for i in *; do du -h \"\$i\"; done| tail -20 | cut -c
hi,
i am trying to convert the following watch command to fish:
watch "(for i in *; do du -h \"\$i\"; done| tail -20 | cut -c
-\$((\$COLUMNS-5)))"
actually, the problem i really wanted to solve is to change the order in
which the files are processed. bash expands * alphabetically, and
because t