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.
the solution i found still has a problem in that the tab character used
to align the columns does not overwrite anything in its space.
likewise at the end of the line, if the newly written line is shorter
then the remaining part of the old line is not cleared.
so i had to add some sed trickery to clear the path.
the ansi escape sequence "<esc>[K" clears the line before it is rewritten.
this has almost the same effect as clearing the screen, but without the flicker
clear
while true
echo \e\[H
for i in (ls -tr)
du -sh $i
end | tail -20 | sed -e 's/^/'\e'\[K/' | cut -c -(math $COLUMNS - 2)
sleep 2
end
greetings, martin.
--
eKita - the online platform for your entire academic life
hackerspace beijing - http://qike.info
--
chief engineer eKita.co
pike programmer pike.lysator.liu.se caudium.net
foresight developer realss.com foresightlinux.org
unix sysadmin trainer developer societyserver.org
Martin Bähr working in china http://societyserver.org/mbaehr/
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users