From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: directory tree size browsing with column view Date: Sat, 24 Oct 2009 15:45:32 +0200 Message-ID: <4AE304FC.4090608@alumni.ethz.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N1gwM-0000b0-Al for emacs-orgmode@gnu.org; Sat, 24 Oct 2009 09:45:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N1gwH-0000Y6-7b for emacs-orgmode@gnu.org; Sat, 24 Oct 2009 09:45:53 -0400 Received: from [199.232.76.173] (port=56135 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N1gwH-0000Xz-3w for emacs-orgmode@gnu.org; Sat, 24 Oct 2009 09:45:49 -0400 Received: from mail05.solnet.ch ([212.101.4.139]:52504) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N1gwG-0008TW-DC for emacs-orgmode@gnu.org; Sat, 24 Oct 2009 09:45:48 -0400 Received: from mail05.solnet.ch ([127.0.0.1]) by localhost (mail05.solnet.ch [127.0.0.1]) (SolNet-Check, port 10024) with LMTP id jDp57cF-jzjQ for ; Sat, 24 Oct 2009 13:45:34 +0000 (UTC) Received: from [192.168.1.2] (212-41-91-67.adsl.solnet.ch [212.41.91.67]) by mail05.solnet.ch (Postfix) with ESMTPA id 42A4F3999E for ; Sat, 24 Oct 2009 13:45:34 +0000 (UTC) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi all, I would like to use the column view for browsing a hierarchical tree with a summed up property like e. g. the directory sizes (inclusive cluster waste and subdirectories from `du -sk`) of a directory tree. Just similar (only unsorted) to the upper left pane of this GUI screenshot of WinDirStat here http://windirstat.info/images/windirstat.jpg Let me make an example how I think to do the same with column view when given a directory with the two shell outputs ---------------------------------------- $ ls -lR dir_node total 16 drwxr-xr-x 2 usr grp 136 Oct 24 12:00 a drwxr-xr-x 2 usr grp 102 Oct 24 12:00 b -rw-r--r-- 1 usr grp 9070 Oct 24 13:00 t.txt dir_node/a: total 2400 -rw-r--r-- 1 usr grp 4535 Oct 24 12:00 x.txt -rw-r--r-- 1 usr grp 1217312 Oct 24 12:00 y.txt dir_node/b: total 16 -rw-r--r-- 1 usr grp 4535 Oct 24 12:00 z.txt ---------------------------------------- ---------------------------------------- $ find dir_node -type d -exec du -sk {} \; 1220 dir_node 1200 dir_node/a 8 dir_node/b ---------------------------------------- For this I would like to have `some software' which uses the path to this directory `dir_node' as input and produces the following output file ---------------------------------------- -*- mode: org; eval: (org-columns) -*- #+STARTUP: odd hidestars #+PROPERTY: size #+COLUMNS: %20ITEM %size{+} * dir_node *** a :PROPERTIES: :size: 1200 :END: -rw-r--r-- 1 usr grp 4535 Oct 24 12:00 x.txt -rw-r--r-- 1 usr grp 1217312 Oct 24 12:00 y.txt *** b :PROPERTIES: :size: 8 :END: -rw-r--r-- 1 usr grp 4535 Oct 24 12:00 z.txt *** . :PROPERTIES: :size: 12 :END: -rw-r--r-- 1 usr grp 9070 Oct 24 13:00 t.txt ---------------------------------------- Opening this file in org-mode using column view now is comfortable to browse and can look e. g. like here ---------------------------------------- ITEM | size | * dir_node | 1220 | *** a | 1200 | :PROPERTIES:... -rw-r--r-- 1 usr grp 4535 Oct 24 12:00 x.txt -rw-r--r-- 1 usr grp 1217312 Oct 24 12:00 y.txt *** b | 8 |... *** . | 12 |... ---------------------------------------- where all not of interest can be left hidden and one can see easily that - the directory `a' is by far the largest - most of the disk usage is caused only by the file dir_node/a/y.txt. - etc I would be able to implement this `some software' in a shell script (if I would take the necessary time some day) but not within Emacs itself which would be easier to use and IMHO would not be concerned that much with portability issues. What do you think?