Damian Brunold
Unterdrücken von Dateien bei ls
2009-10-09 10:05
Das Kommando
ls --hide="*.pyc" cgi-bin
zeigt alle Dateien in cgi-bin an, ausser diejenigen, welche auf *.pyc enden. Das ist z. B. nützlich um einen wordcount zu machen:
damian@damian2:~/www/cgi-bin$ wc -l `ls --hide="*.pyc"` 34 add 34 addbook 34 addgallery 34 addstatic 60 atomupdater.py 141 bookupdater.py 21 config.py 219 datadef.py 47 data.py 76 editbook 79 editentry 72 editgallery 101 editimages 78 editstatic 51 entryupdater.py 189 format.py 82 galleryupdater.py 57 html.py 81 index 189 indexupdater.py 53 listbook 53 listentry 53 listgallery 87 listimages 53 liststatic 71 nav.py 65 newbook 61 newentry 65 newgallery 64 newstatic 35 refresh 56 refreshvideo 81 staticupdater.py 399 storage.py 101 tagsupdater.py 124 testdata.py 265 testdata.txt 79 texts.py 139 utils.py 3583 total
(Womit auch gezeigt ist, dass das Websystem schon einen ganz schön grossen Umfang hat. Zeit für refactoring! ;-)