BlogBlog ÜbersichtjailscriptportsoptFreeBSDLinksThermoskanne

Verzeichnisinhalt gruppiert darstellen

Mit Hilfe von dim lassen sich Verzeichnisinhalte nach Dateiendungen und Dateinamen gruppiert darstellen. Im FreeBSD-Portbaum findet man dim unter sysutils/dim:

# cd /usr/ports/sysutils/dim && make install clean

Zeigt man den Inhalt eines Verzeichnisses mit ls(1) an, so wird der Inhalt alphabetisch ausgegeben:

# ls work/mozilla-central/ipc/chromium/src/third_party/libevent/
ChangeLog               epoll.c                 evrpc-internal.h        mac/
Makefile.am             epoll_sub.c             evrpc.c                 min_heap.h
Makefile.in             evbuffer.c              evrpc.h                 missing
README                  evdns.3                 evsignal.h              mkinstalldirs
README.chromium         evdns.c                 evutil.c                poll.c
aclocal.m4              evdns.h                 evutil.h                quotes.patch
autogen.sh              event-config.h          http-internal.h         sample/
buffer.c                event-internal.h        http.c                  select.c
compat/                 event.3                 install-sh              signal.c
config.guess            event.c                 kqueue.c                strlcpy-internal.h
config.h.in             event.h                 libevent.gyp            strlcpy.c
config.sub              event_rpcgen.py*        linux/                  sys-queue-macros.patch
configure*              event_tagging.c         log.c                   test/
configure.in            evhttp.h                log.h
devpoll.c               evport.c                ltmain.sh

Verwendet man dim, so werden die Dateien spaltenweise nach Dateiendungen und falls identische Dateinamen vorhanden sind zeilenweise sortiert dargestellt:

# dim work/mozilla-central/ipc/chromium/src/third_party/libevent/
ChangeLog              Makefile.am            Makefile.in            aclocal.m4             autogen.sh             
README                 README.chromium        config.h.in                                   ltmain.sh              
compat                 buffer.c                                                                                    
config.guess           devpoll.c              config.sub                                                           
configure              epoll.c                configure.in                                                         
                       epoll_sub.c                                                                                 
                       evbuffer.c                                                                                  
evdns.3                evdns.c                evdns.h                                                              
event.3                event.c                event.h                                                              
event_rpcgen.py        event_tagging.c        event-config.h                                                       
install-sh             evport.c               event-internal.h                                                     
libevent.gyp                                  evhttp.h                                                             
linux                  evrpc.c                evrpc.h                                                              
mac                                           evrpc-internal.h                                                     
missing                                       evsignal.h                                                           
mkinstalldirs          evutil.c               evutil.h                                                             
quotes.patch           http.c                 http-internal.h                                                      
sample                 kqueue.c                                                                                    
sys-queue-macros.patch log.c                  log.h                                                                
test                   poll.c                 min_heap.h                                                           
                       select.c               strlcpy-internal.h                                                   
                       signal.c                                                                                    
                       strlcpy.c    

Mit der -s Option wird zusätzlich noch die Dateigrösse angezeigt:

# dim -s work/mozilla-central/ipc/chromium/src/third_party/libevent/
ChangeLog 11k             Makefile.am 3k            Makefile.in 32k           aclocal.m4 .2m            autogen.sh .2k            
README 1k                 README.chromium .9k       config.h.in 6k                                      ltmain.sh .1m             
compat .5k                buffer.c 9k                                                                                             
config.guess 44k          devpoll.c 10k             config.sub 32k                                                                
configure .7m             epoll.c 8k                configure.in 9k                                                               
                          epoll_sub.c 1k                                                                                          
                          evbuffer.c 10k                                                                                          
evdns.3 11k               evdns.c 85k               evdns.h 18k                                                                   
event.3 17k               event.c 22k               event.h 37k                                                                   
event_rpcgen.py 44k       event_tagging.c 9k        event-config.h 7k                                                             
install-sh 4k             evport.c 12k              event-internal.h 3k                                                           
libevent.gyp 1k                                     evhttp.h 11k                                                                  
linux .5k                 evrpc.c 16k               evrpc.h 16k                                                                   
mac .5k                                             evrpc-internal.h 2k                                                           
missing 10k                                         evsignal.h 2k                                                                 
mkinstalldirs .7k         evutil.c 6k               evutil.h 5k                                                                   
quotes.patch .8k          http.c 66k                http-internal.h 4k                                                            
sample .5k                kqueue.c 11k                                                                                            
sys-queue-macros.patch 1k log.c 4k                  log.h 2k                                                                      
test .5k                  poll.c 9k                 min_heap.h 5k                                                                 
                          select.c 8k               strlcpy-internal.h .3k                                                        
                          signal.c 8k                                                                                             
                          strlcpy.c 2k 

Mehr Informationen zu dim erhält man mit der -h Option.

 Permalink

Comments

No new comments allowed (anymore) on this post.