bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TR: Improvement for ls


From: LAFARGE Jonathan (Cetelem)
Subject: TR: Improvement for ls
Date: Wed, 2 Apr 2003 08:51:34 +0200

Hello,

 

I firsly wrote to   <mailto:address@hidden> address@hidden and Mr. Brett Smith
told me to write to  address@hidden <mailto:address@hidden> .

I have a suggestion : 

 

For ls, there could be an interesting option that would display the size of
each folder in ls -l mode.

For instance, instead of this :

 

% ls -l
total 152
drwxrwxr-x   25 user1    group1       8192 Mar 11 16:58 CETELEM
drwxrwxrwx    5 user1    group1         96 Sep 19  2002 COFICA
drwxrwxrwx    5 user2    group1         96 Dec  2 16:09 CVS
drwxrwxrwx   13 user3    group1       8192 Sep 19  2002 DICOSE
drwxrwxrwx    2 user4    group1       8192 Feb 13 20:13 DiligenSE
drwxrwxrwx    8 user5    group1       8192 Feb 11 10:00
Documents_et_formations
drwxrwxr-x   25 user1    group1       8192 Feb 12 15:02 International
drwxr-xr-x    2 root     root           96 Aug  4  2002 lost+found
drwxrwxrwx   12 user6    group2       8192 Mar 25 08:00 mekong
drwxrwxrwx   48 user3    group1       8192 Mar 24 10:59 OSIRIS
drwxrwxr-x   15 user1    group1       8192 Mar 18 16:16 Outils
drwxrwxrwx    8 user1    group1       8192 Jan 29 17:52 Partenaires
drwxrwxr-t    6 user6    group1       8192 Dec 11 11:04 pegase
drwxrwxrwx    4 user2    group1       8192 Mar 24 09:30 POLEDONNEE
drwxrwxrwx    4 1319     group1         96 Sep 19  2002 s2p
drwxrwsrwx   39 user1    group2       8192 Mar  3 08:57 se
drwxrwxrwx    5 user1    group1      40960 Mar  6 11:37 temp
drwxrwxr-x    2 user7    od           8192 Mar  6 16:36 TestGenSE
drwxrwx---    5 user1    group1       8192 Dec 11 12:11 Veille-technologique

 

We could have this (with -s doing what I want) :

% ls -sl

total 27178816
drwxrwxr-x  25 user1    group1        ??? Mar 11 16:58 CETELEM
drwxrwxrwx   5 user1    group1       619M Sep 19  2002 COFICA
drwxrwxrwx   5 user2    group1       5.5M Dec  2 16:09 CVS
drwxrwxrwx  13 user3    group1       247M Sep 19  2002 DICOSE
drwxrwxrwx   2 user4    group1        12M Feb 13 20:13 DiligenSE
drwxrwxrwx   8 user5    group1        ??? Feb 11 10:00
Documents_et_formations
drwxrwxr-x  25 user1    group1        ??? Feb 12 15:02 International
drwxr-xr-x   2 root     root            0 Aug  4  2002 lost+found
drwxrwxrwx  12 user6    group2        ??? Mar 25 08:00 mekong
drwxrwxrwx  48 user3    group1       8.8G Mar 24 10:59 OSIRIS
drwxrwxr-x  15 user1    group1        13G Mar 18 16:16 Outils
drwxrwxrwx   8 user1    group1        ??? Jan 29 17:52 Partenaires
drwxrwxr-t   6 user6    group1        ??? Dec 11 11:04 pegase
drwxrwxrwx   4 user2    group1        ??? Mar 24 09:30 POLEDONNEE
drwxrwxrwx   4 1319     group1       2.2G Sep 19  2002 s2p
drwxrwsrwx  39 user1    group2        ??? Mar  3 08:57 se
drwxrwxrwx   5 user1    group1       2.0G Mar  6 11:37 temp
drwxrwxr-x   2 user7    od           4.6M Mar  6 16:36 TestGenSE
drwxrwx---   5 user1    group1       191M Dec 11 12:11 Veille-technologique

 

It displays "???" when it can't go through directories to count size
(permission problems).

 

I created a shell script that do that, using du, but it's pretty slow (see
in attachment). I'm not competent enough to program it in the ls C code. So
I'm just sending you this idea, hoping that someone will develop it !

 

Hope I've been useful,

Regards,

Jonathan.

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]